[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

x11proto-core: Changes to 'upstream-unstable'



 DECkeysym.h     |    2 
 HPkeysym.h      |    1 
 Sunkeysym.h     |    2 
 X.h             |    5 
 XF86keysym.h    |    2 
 XWDFile.h       |    1 
 Xalloca.h       |   31 ----
 Xarch.h         |  133 ++++++------------
 Xdefs.h         |    2 
 Xfuncproto.h.in |    2 
 Xfuncs.h        |   81 +++--------
 Xmd.h           |  162 +++++++++-------------
 Xos.h           |  280 +++++++++------------------------------
 Xos_r.h         |  103 ++------------
 Xosdefs.h       |  182 ++++++++-----------------
 Xpoll.h.in      |   41 -----
 Xproto.h        |    4 
 Xprotostr.h     |    1 
 Xthreads.h      |  401 +++++++++++++++++++++++++++-----------------------------
 Xw32defs.h      |  140 +++++++++----------
 Xwindows.h      |   47 ++++--
 Xwinsock.h      |    9 -
 configure.ac    |    2 
 keysym.h        |    3 
 keysymdef.h     |    3 
 25 files changed, 598 insertions(+), 1042 deletions(-)

New commits:
commit 4253e208088d166a8666f673360ef69a3c86f8b0
Author: Alan Coopersmith <alan.coopersmith@sun.com>
Date:   Wed Sep 23 17:04:09 2009 -0700

    xproto 7.0.16
    
    Signed-off-by: Alan Coopersmith <alan.coopersmith@sun.com>

diff --git a/configure.ac b/configure.ac
index eff39c3..a0b44ec 100755
--- a/configure.ac
+++ b/configure.ac
@@ -1,5 +1,5 @@
 AC_PREREQ([2.57])
-AC_INIT([Xproto], [7.0.15], [https://bugs.freedesktop.org/enter_bug.cgi?product=xorg])
+AC_INIT([Xproto], [7.0.16], [https://bugs.freedesktop.org/enter_bug.cgi?product=xorg])
 AM_INIT_AUTOMAKE([foreign dist-bzip2])
 
 AC_CONFIG_HEADER([do-not-use-config.h])

commit 05914c82696432126a72845dd061c7f5e24963c5
Author: Alan Coopersmith <alan.coopersmith@sun.com>
Date:   Wed Sep 23 17:00:18 2009 -0700

    Don't need an #ifdef when both cases just include the same file
    
    Signed-off-by: Alan Coopersmith <alan.coopersmith@sun.com>

diff --git a/Xpoll.h.in b/Xpoll.h.in
index 643c2e1..8275658 100644
--- a/Xpoll.h.in
+++ b/Xpoll.h.in
@@ -56,14 +56,7 @@ from The Open Group.
 
 #include <X11/Xos.h>
 
-/* Below is the monster branch from hell.  Basically, most systems will drop to
- * 'the branch below is the fallthrough for halfway modern systems', and include
- * <sys/select.h>, so we get the FD_* macros. */
-# if defined(SVR4)  && !defined(FD_SETSIZE)
-#  include <sys/select.h>
-# else /* not SVR4/CRAY/AIXv3 */
-#   include <sys/select.h>
-# endif
+#include <sys/select.h>  /* Get the FD_* macros. */
 
 #include <X11/Xmd.h>
 

commit ef37625372546efb32cdb37823b9927cf16b0840
Author: Jon TURNEY <jon.turney@dronecode.org.uk>
Date:   Wed Jun 17 15:28:54 2009 +0100

    Restore macro definition of sleep(), needed by Xming
    
    Removed in error by commit 1defe6b37c23941fe2a67ad4fa66e8ab5f37f9b3
    
    Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk>

diff --git a/Xwindows.h b/Xwindows.h
index 149580e..6318155 100644
--- a/Xwindows.h
+++ b/Xwindows.h
@@ -75,6 +75,10 @@ The Open Group.
 # define RT_CURSOR       ((RESTYPE)5)
 #endif
 
+#ifndef __CYGWIN__
+#define sleep(x) Sleep((x) * 1000)
+#endif
+
 #if defined(WIN32) && (!defined(PATH_MAX) || PATH_MAX < 1024)
 # undef PATH_MAX
 # define PATH_MAX 1024

commit e9df99b12ef9fefdbc1c05ff51bddffe723051e9
Author: Alan Coopersmith <alan.coopersmith@sun.com>
Date:   Sun Jun 14 09:54:58 2009 -0700

    Drop #ifdef USG checks for some truly ancient (pre-SVR4) SysV's
    
    Signed-off-by: Alan Coopersmith <alan.coopersmith@sun.com>

diff --git a/Xos.h b/Xos.h
index e16f473..646716b 100644
--- a/Xos.h
+++ b/Xos.h
@@ -39,14 +39,7 @@ in this Software without prior written authorization from The Open Group.
  * Get major data types (esp. caddr_t)
  */
 
-# ifdef USG
-#  ifndef __TYPES__
-#   include <sys/types.h>			/* forgot to protect it... */
-#   define __TYPES__
-#  endif /* __TYPES__ */
-# else /* USG */
-#  include <sys/types.h>
-# endif /* USG */
+# include <sys/types.h>
 
 # if defined(__SCO__) || defined(__UNIXWARE__)
 #  include <stdint.h>
@@ -100,56 +93,32 @@ in this Software without prior written authorization from The Open Group.
  * Get struct timeval and struct tm
  */
 
-# if defined(SYSV)
-
-#  ifndef USL
-#   include <sys/time.h>
-#  endif
-#  include <time.h>
-#  if defined(USG)
-struct timeval {
-    long tv_sec;
-    long tv_usec;
-};
-#   ifndef USL_SHARELIB
-struct timezone {
-    int tz_minuteswest;
-    int tz_dsttime;
-};
-#   endif /* USL_SHARELIB */
-#  endif /* USG */
-
-
-# else /* not SYSV */
-
-#  if defined(_POSIX_SOURCE) && defined(SVR4)
+# if defined(_POSIX_SOURCE) && defined(SVR4)
 /* need to omit _POSIX_SOURCE in order to get what we want in SVR4 */
-#   undef _POSIX_SOURCE
-#   include <sys/time.h>
-#   define _POSIX_SOURCE
-#  elif defined(WIN32)
-#   include <time.h>
-#   if !defined(_WINSOCKAPI_) && !defined(_WILLWINSOCK_) && !defined(_TIMEVAL_DEFINED) && !defined(_STRUCT_TIMEVAL)
+#  undef _POSIX_SOURCE
+#  include <sys/time.h>
+#  define _POSIX_SOURCE
+# elif defined(WIN32)
+#  include <time.h>
+#  if !defined(_WINSOCKAPI_) && !defined(_WILLWINSOCK_) && !defined(_TIMEVAL_DEFINED) && !defined(_STRUCT_TIMEVAL)
 struct timeval {
     long    tv_sec;         /* seconds */
     long    tv_usec;        /* and microseconds */
 };
-#    define _TIMEVAL_DEFINED
-#   endif
-#   include <sys/timeb.h>
-#   define gettimeofday(t) \
+#   define _TIMEVAL_DEFINED
+#  endif
+#  include <sys/timeb.h>
+#  define gettimeofday(t) \
 { \
     struct _timeb _gtodtmp; \
     _ftime (&_gtodtmp); \
     (t)->tv_sec = _gtodtmp.time; \
     (t)->tv_usec = _gtodtmp.millitm * 1000; \
 }
-#  else
-#   include <sys/time.h>
-#   include <time.h>
-#  endif /* defined(_POSIX_SOURCE) && defined(SVR4) */
-
-# endif /* SYSV */
+# else
+#  include <sys/time.h>
+#  include <time.h>
+# endif /* defined(_POSIX_SOURCE) && defined(SVR4) */
 
 /* define X_GETTIMEOFDAY macro, a portable gettimeofday() */
 # if defined(_XOPEN_XPG4) || defined(_XOPEN_UNIX) /* _XOPEN_UNIX is XPG4.2 */
diff --git a/Xos_r.h b/Xos_r.h
index 96e14cd..f963b64 100644
--- a/Xos_r.h
+++ b/Xos_r.h
@@ -535,7 +535,7 @@ typedef int _Xgetservbynameparams; /* dummy */
 
 #if defined(X_INCLUDE_DIRENT_H) && !defined(_XOS_INCLUDED_DIRENT_H)
 # include <sys/types.h>
-# if !defined(X_NOT_POSIX) || defined(SYSV) || defined(USG)
+# if !defined(X_NOT_POSIX) || defined(SYSV)
 #  include <dirent.h>
 # else
 #  include <sys/dir.h>

commit 385c1343f7e0782b89e40fa17e378bc1f75ce62e
Author: Alan Coopersmith <alan.coopersmith@sun.com>
Date:   Sun Jun 14 09:43:53 2009 -0700

    Get rid of unneeded && clause in list of LP64 ifdefs in Xmd.h
    
    Signed-off-by: Alan Coopersmith <alan.coopersmith@sun.com>

diff --git a/Xmd.h b/Xmd.h
index bc14787..f3868b3 100644
--- a/Xmd.h
+++ b/Xmd.h
@@ -57,12 +57,11 @@ SOFTWARE.
 #  include <sys/isa_defs.h> /* Solaris: defines _LP64 if necessary */
 # endif
 
-# if defined (_LP64) || \
+# if defined (_LP64) || defined(__LP64__) || \
      defined(__alpha) || defined(__alpha__) || \
      defined(__ia64__) || defined(ia64) || \
      defined(__sparc64__) || \
      defined(__s390x__) || \
-     defined(__hppa__) && defined(__LP64__) || \
      defined(__amd64__) || defined(amd64) || \
      defined(__powerpc64__)
 #  define LONG64				/* 32/64-bit architecture */

commit 5aaec3c7a583354a07ec765327fd0edd6216981f
Author: Alan Coopersmith <alan.coopersmith@sun.com>
Date:   Sun Jun 14 09:33:16 2009 -0700

    Drop support for SunOS 4 and Solaris releases older than 2.5 (1995)
    
    Includes changing remaining sun ifdef's to check for standard-conformant /
    non-namespace-polluting #ifdef __sun instead of older #ifdef sun.
    
    Signed-off-by: Alan Coopersmith <alan.coopersmith@sun.com>

diff --git a/Xalloca.h b/Xalloca.h
index 02d8e11..1919884 100644
--- a/Xalloca.h
+++ b/Xalloca.h
@@ -88,7 +88,7 @@ from The Open Group.
  * Test is easy, the new one is named __builtin_alloca and comes
  * from alloca.h which #defines alloca.
  */
-#      if defined(sun) || defined(alloca)
+#      if defined(__sun) || defined(alloca)
 /*
  * Some System V boxes extract alloca.o from /lib/libPW.a; if you
  * decide that you don't want to use alloca, you might want to fix it here.
diff --git a/Xarch.h b/Xarch.h
index 3548105..58fb9a5 100644
--- a/Xarch.h
+++ b/Xarch.h
@@ -39,10 +39,8 @@
 
 # else
 
-#  ifdef SVR4
-#   if !defined(sun)
-#    include <sys/byteorder.h>
-#   endif
+#  if defined(SVR4) || defined(__SVR4)
+#   include <sys/byteorder.h>
 #  elif defined(CSRG_BASED)
 #   if defined(__NetBSD__) || defined(__OpenBSD__)
 #    include <sys/types.h>
@@ -75,7 +73,7 @@
 #   define LITTLE_ENDIAN 1234
 #   define BIG_ENDIAN    4321
 
-#   if defined(sun) && defined(SVR4)
+#   if defined(__sun) && defined(__SVR4)
 #    include <sys/isa_defs.h>
 #    ifdef _LITTLE_ENDIAN
 #     define BYTE_ORDER LITTLE_ENDIAN
diff --git a/Xfuncs.h b/Xfuncs.h
index 1dead0c..354b663 100644
--- a/Xfuncs.h
+++ b/Xfuncs.h
@@ -37,53 +37,28 @@ void bcopy();
 void bzero();
 int bcmp();
 #  else
-#   if defined(SYSV) && !defined(__SCO__) && !defined(sun) && !defined(__UNIXWARE__)
+#   if defined(SYSV) && !defined(__SCO__) && !defined(__sun) && !defined(__UNIXWARE__)
 #    include <memory.h>
 void bcopy();
 #    define bzero(b,len) memset(b, 0, len)
 #    define bcmp(b1,b2,len) memcmp(b1, b2, len)
 #   else
 #    include <string.h>
-#    if defined(__SCO__) || defined(sun) || defined(__UNIXWARE__)
+#    if defined(__SCO__) || defined(__sun) || defined(__UNIXWARE__)
 #     include <strings.h>
 #    endif
 #    define _XFUNCS_H_INCLUDED_STRING_H
-#    if defined(sun)
-#     define bcopy(b1,b2,len) memmove(b2, b1, (size_t)(len))
-#     define bzero(b,len) memset(b, 0, (size_t)(len))
-#     define bcmp(b1,b2,len) memcmp(b1, b2, (size_t)(len))
-#    endif
 #   endif
 #  endif /* X_USEBFUNCS */
 
 /* the new Xfuncs.h */
 
-#  if (!defined(sun) || defined(SVR4))
 /* the ANSI C way */
-#   ifndef _XFUNCS_H_INCLUDED_STRING_H
-#    include <string.h>
-#   endif
-#   undef bzero
-#   define bzero(b,len) memset(b,0,len)
-#  else
-#   if defined(SYSV) || defined(sun)
-#    include <memory.h>
-#    define memmove(dst,src,len) bcopy((char *)(src),(char *)(dst),(int)(len))
-#    if defined(SYSV) && defined(_XBCOPYFUNC)
-#     undef memmove
-#     define memmove(dst,src,len) _XBCOPYFUNC((char *)(src),(char *)(dst),(int)(len))
-#     define _XNEEDBCOPYFUNC
-#    endif
-#   else /* else vanilla BSD */
-#    define memmove(dst,src,len) bcopy((char *)(src),(char *)(dst),(int)(len))
-#    define memcpy(dst,src,len) bcopy((char *)(src),(char *)(dst),(int)(len))
-#    define memcmp(b1,b2,len) bcmp((char *)(b1),(char *)(b2),(int)(len))
-#   endif /* SYSV else */
-#  endif
-
-#  if (defined(sun) && !defined(SVR4))
-#   define atexit(f) on_exit(f, 0)
+#  ifndef _XFUNCS_H_INCLUDED_STRING_H
+#   include <string.h>
 #  endif
+#  undef bzero
+#  define bzero(b,len) memset(b,0,len)
 
 #  if defined WIN32 && defined __MINGW32__
 #   define bcopy(b1,b2,len) memmove(b2, b1, (size_t)(len))
diff --git a/Xmd.h b/Xmd.h
index 3975c01..bc14787 100644
--- a/Xmd.h
+++ b/Xmd.h
@@ -53,7 +53,7 @@ SOFTWARE.
 /*
  * Special per-machine configuration flags.
  */
-# if defined(sun) && defined(__SVR4)
+# if defined(__sun) && defined(__SVR4)
 #  include <sys/isa_defs.h> /* Solaris: defines _LP64 if necessary */
 # endif
 
diff --git a/Xos.h b/Xos.h
index a07e5e2..e16f473 100644
--- a/Xos.h
+++ b/Xos.h
@@ -67,12 +67,9 @@ in this Software without prior written authorization from The Open Group.
  */
 
 # include <string.h>
-# if defined(__SCO__) || defined(__UNIXWARE__)
+# if defined(__SCO__) || defined(__UNIXWARE__) || defined(__sun)
 #  include <strings.h>
 # else
-#  if (defined(sun) && defined(__SVR4))
-#   include <strings.h>
-#  endif
 #  ifndef index
 #   define index(s,c) (strchr((s),(c)))
 #  endif
@@ -82,18 +79,6 @@ in this Software without prior written authorization from The Open Group.
 # endif
 
 /*
- * strerror()
- */
-# if (defined(sun) && !defined(SVR4)) && !defined(__GLIBC__)
-#  ifndef strerror
-extern char *sys_errlist[];
-extern int sys_nerr;
-#   define strerror(n) \
-    (((n) >= 0 && (n) < sys_nerr) ? sys_errlist[n] : "unknown error")
-#  endif
-# endif
-
-/*
  * Get open(2) constants
  */
 # if defined(X_NOT_POSIX)
@@ -170,7 +155,7 @@ struct timeval {
 # if defined(_XOPEN_XPG4) || defined(_XOPEN_UNIX) /* _XOPEN_UNIX is XPG4.2 */
 #  define X_GETTIMEOFDAY(t) gettimeofday(t, (struct timezone*)0)
 # else
-#  if defined(SVR4) || defined(WIN32)
+#  if defined(SVR4) || defined(__SVR4) || defined(WIN32)
 #   define X_GETTIMEOFDAY(t) gettimeofday(t)
 #  else
 #   define X_GETTIMEOFDAY(t) gettimeofday(t, (struct timezone*)0)
diff --git a/Xos_r.h b/Xos_r.h
index 32997f7..96e14cd 100644
--- a/Xos_r.h
+++ b/Xos_r.h
@@ -192,7 +192,7 @@ extern void XtProcessUnlock(
  * uses the older SVR4 thread-safe functions unless the POSIX ones
  * are specifically requested.  Fix the feature test macro.
  */
-#if defined(sun) && defined(_POSIX_THREAD_SAFE_FUNCTIONS) && \
+#if defined(__sun) && defined(_POSIX_THREAD_SAFE_FUNCTIONS) && \
 	(_POSIX_C_SOURCE - 0 < 199506L) && !defined(_POSIX_PTHREAD_SEMANTICS)
 # undef _POSIX_THREAD_SAFE_FUNCTIONS
 #endif
@@ -915,7 +915,7 @@ typedef struct tm _Xltimeparams;
 # define _XGmtime(t,p)		(gmtime_r((t),&(p)) ? NULL : &(p))
 # define _XLocaltime(t,p)	(localtime_r((t),&(p)) ? NULL : &(p))
 
-#elif !defined(_POSIX_THREAD_SAFE_FUNCTIONS) && defined(sun)
+#elif !defined(_POSIX_THREAD_SAFE_FUNCTIONS) && defined(__sun)
 /* Returns NULL on failure.  Solaris 2.5
  *
  * extern char *asctime_r(const struct tm *tm,char *buf, int buflen);
@@ -1038,7 +1038,7 @@ typedef struct {
    (_Xos_processUnlock), \
    (p).pgrp )
 
-#elif !defined(_POSIX_THREAD_SAFE_FUNCTIONS) && defined(sun) 
+#elif !defined(_POSIX_THREAD_SAFE_FUNCTIONS) && defined(__sun)
 /* Non-POSIX API.  Solaris.
  *
  * extern struct group *getgrgid_r(gid_t, struct group *, char *, int);
diff --git a/Xosdefs.h b/Xosdefs.h
index bbd395a..33eaee4 100644
--- a/Xosdefs.h
+++ b/Xosdefs.h
@@ -43,7 +43,7 @@ in this Software without prior written authorization from The Open Group.
 # ifdef __i386__
 #  ifdef SYSV
 #   if !defined(__SCO__) && \
-	!defined(__UNIXWARE__) && !defined(sun)
+	!defined(__UNIXWARE__) && !defined(__sun)
 #    if !defined(_POSIX_SOURCE)
 #     define X_NOT_POSIX
 #    endif
@@ -51,7 +51,7 @@ in this Software without prior written authorization from The Open Group.
 #  endif
 # endif
 
-# ifdef sun
+# ifdef __sun
 /* Imake configs define SVR4 on Solaris, but cc & gcc only define __SVR4
  * This check allows non-Imake configured programs to build correctly.
  */
diff --git a/Xthreads.h b/Xthreads.h
index 7381815..3d44208 100644
--- a/Xthreads.h
+++ b/Xthreads.h
@@ -77,7 +77,7 @@ extern xthread_t (*_x11_thr_self)();
 #   define xthread_yield() thr_yield()
 #   define xthread_exit(v) thr_exit(v)
 #   define xthread_key_create(kp,d) thr_keycreate(kp,d)
-#   ifdef sun
+#   ifdef __sun
 #    define xthread_key_delete(k) 0
 #   else
 #    define xthread_key_delete(k) thr_keydelete(k)

commit 5bad478221c54c0dbf682ef2569f6ca5ac050049
Author: Alan Coopersmith <alan.coopersmith@sun.com>
Date:   Sun Jun 14 09:10:06 2009 -0700

    Use indentation to provide a map through the twisty maze of ifdefs, all alike
    
    git diff -w shows no changes other than whitespace in this patch
    
    Signed-off-by: Alan Coopersmith <alan.coopersmith@sun.com>

diff --git a/Xarch.h b/Xarch.h
index 406877c..3548105 100644
--- a/Xarch.h
+++ b/Xarch.h
@@ -1,5 +1,5 @@
 #ifndef _XARCH_H_
-#define _XARCH_H_
+# define _XARCH_H_
 
 /*
  * Copyright 1997 Metro Link Incorporated
@@ -32,64 +32,64 @@
  */
 
 /* See if it is set in the imake config first */
-#ifdef X_BYTE_ORDER
+# ifdef X_BYTE_ORDER
 
-#define X_BIG_ENDIAN 4321
-#define X_LITTLE_ENDIAN 1234
+#  define X_BIG_ENDIAN 4321
+#  define X_LITTLE_ENDIAN 1234
 
-#else
+# else
 
-#ifdef SVR4
-#if !defined(sun)
-#include <sys/byteorder.h>
-#endif
-#elif defined(CSRG_BASED)
-#if defined(__NetBSD__) || defined(__OpenBSD__)
-#include <sys/types.h>
-#endif
-#include <machine/endian.h>
-#elif defined(linux)
-#if defined __STRICT_ANSI__
-#undef __STRICT_ANSI__
-#include <endian.h>
-#define __STRICT_ANSI__
-#else
-#include <endian.h>
-#endif
+#  ifdef SVR4
+#   if !defined(sun)
+#    include <sys/byteorder.h>
+#   endif
+#  elif defined(CSRG_BASED)
+#   if defined(__NetBSD__) || defined(__OpenBSD__)
+#    include <sys/types.h>
+#   endif
+#   include <machine/endian.h>
+#  elif defined(linux)
+#   if defined __STRICT_ANSI__
+#    undef __STRICT_ANSI__
+#    include <endian.h>
+#    define __STRICT_ANSI__
+#   else
+#    include <endian.h>
+#   endif
 /* 'endian.h' might have been included before 'Xarch.h' */
-#if !defined(LITTLE_ENDIAN) && defined(__LITTLE_ENDIAN)
-#define LITTLE_ENDIAN __LITTLE_ENDIAN
-#endif
-#if !defined(BIG_ENDIAN) && defined(__BIG_ENDIAN)
-#define BIG_ENDIAN __BIG_ENDIAN
-#endif
-#if !defined(PDP_ENDIAN) && defined(__PDP_ENDIAN)
-#define PDP_ENDIAN __PDP_ENDIAN
-#endif
-#if !defined(BYTE_ORDER) && defined(__BYTE_ORDER)
-#define BYTE_ORDER __BYTE_ORDER
-#endif
-#endif
+#   if !defined(LITTLE_ENDIAN) && defined(__LITTLE_ENDIAN)
+#    define LITTLE_ENDIAN __LITTLE_ENDIAN
+#   endif
+#   if !defined(BIG_ENDIAN) && defined(__BIG_ENDIAN)
+#    define BIG_ENDIAN __BIG_ENDIAN
+#   endif
+#   if !defined(PDP_ENDIAN) && defined(__PDP_ENDIAN)
+#    define PDP_ENDIAN __PDP_ENDIAN
+#   endif
+#   if !defined(BYTE_ORDER) && defined(__BYTE_ORDER)
+#    define BYTE_ORDER __BYTE_ORDER
+#   endif
+#  endif
 
-#ifndef BYTE_ORDER
-#define LITTLE_ENDIAN 1234
-#define BIG_ENDIAN    4321
+#  ifndef BYTE_ORDER
+#   define LITTLE_ENDIAN 1234
+#   define BIG_ENDIAN    4321
 
-#if defined(sun) && defined(SVR4) 
-#include <sys/isa_defs.h>
-#ifdef _LITTLE_ENDIAN
-#define BYTE_ORDER LITTLE_ENDIAN
-#endif
-#ifdef _BIG_ENDIAN
-#define BYTE_ORDER BIG_ENDIAN
-#endif
-#endif /* sun */
-#endif /* BYTE_ORDER */
+#   if defined(sun) && defined(SVR4)
+#    include <sys/isa_defs.h>
+#    ifdef _LITTLE_ENDIAN
+#     define BYTE_ORDER LITTLE_ENDIAN
+#    endif
+#    ifdef _BIG_ENDIAN
+#     define BYTE_ORDER BIG_ENDIAN
+#    endif
+#   endif /* sun */
+#  endif /* BYTE_ORDER */
 
-#define X_BYTE_ORDER BYTE_ORDER
-#define X_BIG_ENDIAN BIG_ENDIAN
-#define X_LITTLE_ENDIAN LITTLE_ENDIAN
+#  define X_BYTE_ORDER BYTE_ORDER
+#  define X_BIG_ENDIAN BIG_ENDIAN
+#  define X_LITTLE_ENDIAN LITTLE_ENDIAN
 
-#endif /* not in imake config */
+# endif /* not in imake config */
 
 #endif /* _XARCH_H_ */
diff --git a/Xfuncs.h b/Xfuncs.h
index d86f474..1dead0c 100644
--- a/Xfuncs.h
+++ b/Xfuncs.h
@@ -25,70 +25,70 @@ in this Software without prior written authorization from The Open Group.
  */
 
 #ifndef _XFUNCS_H_
-#define _XFUNCS_H_
+# define _XFUNCS_H_
 
-#include <X11/Xosdefs.h>
+# include <X11/Xosdefs.h>
 
 /* the old Xfuncs.h, for pre-R6 */
-#if !(defined(XFree86LOADER) && defined(IN_MODULE))
+# if !(defined(XFree86LOADER) && defined(IN_MODULE))
 
-#ifdef X_USEBFUNCS
+#  ifdef X_USEBFUNCS
 void bcopy();
 void bzero();
 int bcmp();
-#else
-#if defined(SYSV) && !defined(__SCO__) && !defined(sun) && !defined(__UNIXWARE__)
-#include <memory.h>
+#  else
+#   if defined(SYSV) && !defined(__SCO__) && !defined(sun) && !defined(__UNIXWARE__)
+#    include <memory.h>
 void bcopy();
-#define bzero(b,len) memset(b, 0, len)
-#define bcmp(b1,b2,len) memcmp(b1, b2, len)
-#else
-#include <string.h>
-#if defined(__SCO__) || defined(sun) || defined(__UNIXWARE__)
-#include <strings.h>
-#endif
-#define _XFUNCS_H_INCLUDED_STRING_H
-#if defined(sun)
-#define bcopy(b1,b2,len) memmove(b2, b1, (size_t)(len))
-#define bzero(b,len) memset(b, 0, (size_t)(len))
-#define bcmp(b1,b2,len) memcmp(b1, b2, (size_t)(len))
-#endif
-#endif
-#endif /* X_USEBFUNCS */
+#    define bzero(b,len) memset(b, 0, len)
+#    define bcmp(b1,b2,len) memcmp(b1, b2, len)
+#   else
+#    include <string.h>
+#    if defined(__SCO__) || defined(sun) || defined(__UNIXWARE__)
+#     include <strings.h>
+#    endif
+#    define _XFUNCS_H_INCLUDED_STRING_H
+#    if defined(sun)
+#     define bcopy(b1,b2,len) memmove(b2, b1, (size_t)(len))
+#     define bzero(b,len) memset(b, 0, (size_t)(len))
+#     define bcmp(b1,b2,len) memcmp(b1, b2, (size_t)(len))
+#    endif
+#   endif
+#  endif /* X_USEBFUNCS */
 
 /* the new Xfuncs.h */
 
-#if (!defined(sun) || defined(SVR4))
+#  if (!defined(sun) || defined(SVR4))
 /* the ANSI C way */
-#ifndef _XFUNCS_H_INCLUDED_STRING_H
-#include <string.h>
-#endif
-#undef bzero
-#define bzero(b,len) memset(b,0,len)
-#else
-#if defined(SYSV) || defined(sun) 
-#include <memory.h>
-#define memmove(dst,src,len) bcopy((char *)(src),(char *)(dst),(int)(len))
-#if defined(SYSV) && defined(_XBCOPYFUNC)
-#undef memmove
-#define memmove(dst,src,len) _XBCOPYFUNC((char *)(src),(char *)(dst),(int)(len))
-#define _XNEEDBCOPYFUNC
-#endif
-#else /* else vanilla BSD */
-#define memmove(dst,src,len) bcopy((char *)(src),(char *)(dst),(int)(len))
-#define memcpy(dst,src,len) bcopy((char *)(src),(char *)(dst),(int)(len))
-#define memcmp(b1,b2,len) bcmp((char *)(b1),(char *)(b2),(int)(len))
-#endif /* SYSV else */
-#endif 
+#   ifndef _XFUNCS_H_INCLUDED_STRING_H
+#    include <string.h>
+#   endif
+#   undef bzero
+#   define bzero(b,len) memset(b,0,len)
+#  else
+#   if defined(SYSV) || defined(sun)
+#    include <memory.h>
+#    define memmove(dst,src,len) bcopy((char *)(src),(char *)(dst),(int)(len))
+#    if defined(SYSV) && defined(_XBCOPYFUNC)
+#     undef memmove
+#     define memmove(dst,src,len) _XBCOPYFUNC((char *)(src),(char *)(dst),(int)(len))
+#     define _XNEEDBCOPYFUNC
+#    endif
+#   else /* else vanilla BSD */
+#    define memmove(dst,src,len) bcopy((char *)(src),(char *)(dst),(int)(len))
+#    define memcpy(dst,src,len) bcopy((char *)(src),(char *)(dst),(int)(len))
+#    define memcmp(b1,b2,len) bcmp((char *)(b1),(char *)(b2),(int)(len))
+#   endif /* SYSV else */
+#  endif
 
-#if (defined(sun) && !defined(SVR4))
-#define atexit(f) on_exit(f, 0)
-#endif
+#  if (defined(sun) && !defined(SVR4))
+#   define atexit(f) on_exit(f, 0)
+#  endif
 
-#if defined WIN32 && defined __MINGW32__
-#define bcopy(b1,b2,len) memmove(b2, b1, (size_t)(len))
-#endif
+#  if defined WIN32 && defined __MINGW32__
+#   define bcopy(b1,b2,len) memmove(b2, b1, (size_t)(len))
+#  endif
 
-#endif /* !(defined(XFree86LOADER) && defined(IN_MODULE)) */
+# endif /* !(defined(XFree86LOADER) && defined(IN_MODULE)) */
 
 #endif /* _XFUNCS_H_ */
diff --git a/Xmd.h b/Xmd.h
index a3afc6f..3975c01 100644
--- a/Xmd.h
+++ b/Xmd.h
@@ -45,7 +45,7 @@ SOFTWARE.
 
 ******************************************************************/
 #ifndef XMD_H
-#define XMD_H 1
+# define XMD_H 1
 /*
  *  Xmd.h: MACHINE DEPENDENT DECLARATIONS.
  */
@@ -53,28 +53,28 @@ SOFTWARE.
 /*
  * Special per-machine configuration flags.
  */
-#if defined(sun) && defined(__SVR4)
-# include <sys/isa_defs.h> /* Solaris: defines _LP64 if necessary */
-#endif
-
-#if defined (_LP64) || \
-    defined(__alpha) || defined(__alpha__) || \
-    defined(__ia64__) || defined(ia64) || \
-    defined(__sparc64__) || \
-    defined(__s390x__) || \
-    defined(__hppa__) && defined(__LP64__) || \
-    defined(__amd64__) || defined(amd64) || \
-    defined(__powerpc64__) 
-#define LONG64				/* 32/64-bit architecture */
-#endif
+# if defined(sun) && defined(__SVR4)
+#  include <sys/isa_defs.h> /* Solaris: defines _LP64 if necessary */
+# endif
+
+# if defined (_LP64) || \
+     defined(__alpha) || defined(__alpha__) || \
+     defined(__ia64__) || defined(ia64) || \
+     defined(__sparc64__) || \
+     defined(__s390x__) || \
+     defined(__hppa__) && defined(__LP64__) || \
+     defined(__amd64__) || defined(amd64) || \
+     defined(__powerpc64__)
+#  define LONG64				/* 32/64-bit architecture */
+# endif
 
 /*
  * Stuff to handle large architecture machines; the constants were generated
  * on a 32-bit machine and must correspond to the protocol.
  */
-#ifdef WORD64
-#define MUSTCOPY
-#endif /* WORD64 */
+# ifdef WORD64
+#  define MUSTCOPY
+# endif /* WORD64 */
 
 
 /*
@@ -91,49 +91,49 @@ SOFTWARE.
  * The extra indirection is to get macro arguments to expand correctly before
  * the concatenation, rather than afterward.
  */
-#define _SIZEOF(x) sz_##x
-#define SIZEOF(x) _SIZEOF(x)
+# define _SIZEOF(x) sz_##x
+# define SIZEOF(x) _SIZEOF(x)
 
 /*
  * Bitfield suffixes for the protocol structure elements, if you
  * need them.  Note that bitfields are not guaranteed to be signed
  * (or even unsigned) according to ANSI C.
  */
-#ifdef WORD64
+# ifdef WORD64
 typedef long INT64;
 typedef unsigned long CARD64;
-#define B32 :32
-#define B16 :16
-#ifdef UNSIGNEDBITFIELDS
+#  define B32 :32
+#  define B16 :16
+#  ifdef UNSIGNEDBITFIELDS
 typedef unsigned int INT32;
 typedef unsigned int INT16;
-#else
+#  else
 typedef signed int INT32;
 typedef signed int INT16;
-#endif
-#else
-#define B32
-#define B16
-#ifdef LONG64
+#  endif
+# else
+#  define B32
+#  define B16
+#  ifdef LONG64
 typedef long INT64;
 typedef int INT32;
-#else
+#  else
 typedef long INT32;
-#endif
+#  endif
 typedef short INT16;
-#endif
+# endif
 
 typedef signed char    INT8;
 
-#ifdef LONG64
+# ifdef LONG64
 typedef unsigned long CARD64;
 typedef unsigned int CARD32;
-#else
+# else
 typedef unsigned long CARD32;
-#endif
-#if !defined(WORD64) && !defined(LONG64)
+# endif
+# if !defined(WORD64) && !defined(LONG64)
 typedef unsigned long long CARD64;
-#endif
+# endif
 typedef unsigned short CARD16;
 typedef unsigned char  CARD8;
 
@@ -146,41 +146,41 @@ typedef CARD8		BOOL;
 /*
  * definitions for sign-extending bitfields on 64-bit architectures
  */
-#if defined(WORD64) && defined(UNSIGNEDBITFIELDS)
-#define cvtINT8toInt(val)   (((val) & 0x00000080) ? ((val) | 0xffffffffffffff00) : (val))
-#define cvtINT16toInt(val)  (((val) & 0x00008000) ? ((val) | 0xffffffffffff0000) : (val))
-#define cvtINT32toInt(val)  (((val) & 0x80000000) ? ((val) | 0xffffffff00000000) : (val))
-#define cvtINT8toShort(val)  cvtINT8toInt(val)
-#define cvtINT16toShort(val) cvtINT16toInt(val)
-#define cvtINT32toShort(val) cvtINT32toInt(val)
-#define cvtINT8toLong(val)  cvtINT8toInt(val)
-#define cvtINT16toLong(val) cvtINT16toInt(val)
-#define cvtINT32toLong(val) cvtINT32toInt(val)
-#else
-#define cvtINT8toInt(val) (val)
-#define cvtINT16toInt(val) (val)
-#define cvtINT32toInt(val) (val)
-#define cvtINT8toShort(val) (val)
-#define cvtINT16toShort(val) (val)
-#define cvtINT32toShort(val) (val)
-#define cvtINT8toLong(val) (val)
-#define cvtINT16toLong(val) (val)
-#define cvtINT32toLong(val) (val)
-#endif /* WORD64 and UNSIGNEDBITFIELDS */
-
-
-
-#ifdef MUSTCOPY
+# if defined(WORD64) && defined(UNSIGNEDBITFIELDS)
+#  define cvtINT8toInt(val)   (((val) & 0x00000080) ? ((val) | 0xffffffffffffff00) : (val))
+#  define cvtINT16toInt(val)  (((val) & 0x00008000) ? ((val) | 0xffffffffffff0000) : (val))
+#  define cvtINT32toInt(val)  (((val) & 0x80000000) ? ((val) | 0xffffffff00000000) : (val))
+#  define cvtINT8toShort(val)  cvtINT8toInt(val)
+#  define cvtINT16toShort(val) cvtINT16toInt(val)
+#  define cvtINT32toShort(val) cvtINT32toInt(val)
+#  define cvtINT8toLong(val)  cvtINT8toInt(val)
+#  define cvtINT16toLong(val) cvtINT16toInt(val)
+#  define cvtINT32toLong(val) cvtINT32toInt(val)
+# else
+#  define cvtINT8toInt(val) (val)
+#  define cvtINT16toInt(val) (val)
+#  define cvtINT32toInt(val) (val)
+#  define cvtINT8toShort(val) (val)
+#  define cvtINT16toShort(val) (val)
+#  define cvtINT32toShort(val) (val)
+#  define cvtINT8toLong(val) (val)
+#  define cvtINT16toLong(val) (val)
+#  define cvtINT32toLong(val) (val)
+# endif /* WORD64 and UNSIGNEDBITFIELDS */
+
+
+
+# ifdef MUSTCOPY
 /*
  * This macro must not cast or else pointers will get aligned and be wrong
  */
-#define NEXTPTR(p,t)  (((char *) p) + SIZEOF(t))
-#else /* else not MUSTCOPY, this is used for 32-bit machines */
+#  define NEXTPTR(p,t)  (((char *) p) + SIZEOF(t))
+# else /* else not MUSTCOPY, this is used for 32-bit machines */
 /*
  * this version should leave result of type (t *), but that should only be
  * used when not in MUSTCOPY
  */
-#define NEXTPTR(p,t) (((t *)(p)) + 1)
-#endif /* MUSTCOPY - used machines whose C structs don't line up with proto */
+#  define NEXTPTR(p,t) (((t *)(p)) + 1)
+# endif /* MUSTCOPY - used machines whose C structs don't line up with proto */
 
 #endif /* XMD_H */
diff --git a/Xos.h b/Xos.h
index 2fbe07d..a07e5e2 100644
--- a/Xos.h
+++ b/Xos.h
@@ -1,5 +1,5 @@
 /*
- * 
+ *
 Copyright 1987, 1998  The Open Group
 
 Permission to use, copy, modify, distribute, and sell this software and its
@@ -31,26 +31,26 @@ in this Software without prior written authorization from The Open Group.
  */
 
 #ifndef _XOS_H_
-#define _XOS_H_
+# define _XOS_H_
 
-#include <X11/Xosdefs.h>
+# include <X11/Xosdefs.h>
 
 /*
  * Get major data types (esp. caddr_t)
  */
 
-#ifdef USG
-#ifndef __TYPES__
-#include <sys/types.h>			/* forgot to protect it... */
-#define __TYPES__
-#endif /* __TYPES__ */
-#else /* USG */
-# include <sys/types.h>
-#endif /* USG */
+# ifdef USG
+#  ifndef __TYPES__
+#   include <sys/types.h>			/* forgot to protect it... */
+#   define __TYPES__
+#  endif /* __TYPES__ */
+# else /* USG */
+#  include <sys/types.h>
+# endif /* USG */
 
-#if defined(__SCO__) || defined(__UNIXWARE__)
-#include <stdint.h>
-#endif
+# if defined(__SCO__) || defined(__UNIXWARE__)
+#  include <stdint.h>
+# endif
 
 
 /*
@@ -66,129 +66,129 @@ in this Software without prior written authorization from The Open Group.
  * which can be really inconvenient. :-(
  */


Reply to: