[PATCH:libX11] Make sure internal headers include required headers

Peter Hutterer peter.hutterer at who-t.net
Sun May 19 16:07:53 PDT 2013


On Fri, May 17, 2013 at 03:28:04PM -0700, Alan Coopersmith wrote:
> From: Niveditha Rau <Niveditha.Rau at Oracle.COM>
> 
> Fixes builds with Solaris Studio 12.3 when lint is enabled, since it no
> longer ignores *.h files, but complains when they reference undefined
> typedefs or macros.
> 
> Signed-off-by: Niveditha Rau <Niveditha.Rau at Oracle.COM>
> Signed-off-by: Alan Coopersmith <alan.coopersmith at oracle.com>

Reviewed-by: Peter Hutterer <peter.hutterer at who-t.net>

Cheers,
   Peter

> ---
>  src/Cmap.h         |    2 ++
>  src/Cr.h           |    2 ++
>  src/Key.h          |    3 +++
>  src/Xintatom.h     |    1 +
>  src/Xintconn.h     |    1 +
>  src/Xprivate.h     |    2 ++
>  src/Xresinternal.h |    2 ++
>  src/locking.h      |    2 ++
>  8 files changed, 15 insertions(+)
> 
> diff --git a/src/Cmap.h b/src/Cmap.h
> index 062b538..78cc3ea 100644
> --- a/src/Cmap.h
> +++ b/src/Cmap.h
> @@ -2,6 +2,8 @@
>  #ifndef _CMAP_H_
>  #define _CMAP_H_
>  
> +#include <X11/Xlib.h>
> +
>  extern void
>  _XcmsDeleteCmapRec(
>      Display *dpy,
> diff --git a/src/Cr.h b/src/Cr.h
> index 800c9ab..635e9e4 100644
> --- a/src/Cr.h
> +++ b/src/Cr.h
> @@ -2,6 +2,8 @@
>  #ifndef _CR_H_
>  #define _CR_H_
>  
> +#include <X11/Xlib.h>
> +
>  extern int _XUpdateGCCache(
>      register GC gc,
>      register unsigned long mask,
> diff --git a/src/Key.h b/src/Key.h
> index 0fe89ba..bb25439 100644
> --- a/src/Key.h
> +++ b/src/Key.h
> @@ -2,6 +2,9 @@
>  #ifndef _KEY_H_
>  #define _KEY_H_
>  
> +#include <X11/Xlib.h>
> +#include <X11/Xresource.h>
> +
>  #ifndef NEEDKTABLE
>  extern const unsigned char _XkeyTable[];
>  #endif
> diff --git a/src/Xintatom.h b/src/Xintatom.h
> index 82dba36..516a72b 100644
> --- a/src/Xintatom.h
> +++ b/src/Xintatom.h
> @@ -2,6 +2,7 @@
>  #ifndef _XINTATOM_H_
>  #define _XINTATOM_H_ 1
>  
> +#include <X11/Xlib.h>
>  #include <X11/Xfuncproto.h>
>  
>  /* IntAtom.c */
> diff --git a/src/Xintconn.h b/src/Xintconn.h
> index db59061..cd9aee3 100644
> --- a/src/Xintconn.h
> +++ b/src/Xintconn.h
> @@ -3,6 +3,7 @@
>  #define _XINTCONN_H_ 1
>  
>  #include <X11/Xfuncproto.h>
> +#include <X11/Xlib.h>
>  
>  _XFUNCPROTOBEGIN
>  
> diff --git a/src/Xprivate.h b/src/Xprivate.h
> index 006b170..6bfe70b 100644
> --- a/src/Xprivate.h
> +++ b/src/Xprivate.h
> @@ -8,6 +8,8 @@
>  #ifndef XPRIVATE_H
>  #define XPRIVATE_H
>  
> +#include <X11/Xlib.h>
> +
>  extern _X_HIDDEN void _XIDHandler(Display *dpy);
>  extern _X_HIDDEN void _XSeqSyncFunction(Display *dpy);
>  extern _X_HIDDEN void _XSetPrivSyncFunction(Display *dpy);
> diff --git a/src/Xresinternal.h b/src/Xresinternal.h
> index c2f355f..b5cc7ff 100644
> --- a/src/Xresinternal.h
> +++ b/src/Xresinternal.h
> @@ -2,6 +2,8 @@
>  #ifndef _XRESINTERNAL_H_
>  #define _XRESINTERNAL_H_
>  
> +#include <X11/Xlib.h>
> +#include <X11/Xresource.h>
>  #include <inttypes.h>
>  
>  /* type defines */
> diff --git a/src/locking.h b/src/locking.h
> index 96019fc..5251a60 100644
> --- a/src/locking.h
> +++ b/src/locking.h
> @@ -36,6 +36,8 @@ in this Software without prior written authorization from The Open Group.
>  
>  #define xmalloc(s) Xmalloc(s)
>  #define xfree(s) Xfree(s)
> +#include <X11/Xlib.h>
> +#include <X11/Xlibint.h>
>  #include <X11/Xthreads.h>
>  
>  struct _XCVList {
> -- 
> 1.7.9.2
> 
> _______________________________________________
> xorg-devel at lists.x.org: X.Org development
> Archives: http://lists.x.org/archives/xorg-devel
> Info: http://lists.x.org/mailman/listinfo/xorg-devel
> 


More information about the xorg-devel mailing list