xserver: Branch 'master' - 4 commits

Adam Jackson ajax at kemper.freedesktop.org
Wed Jul 23 08:47:04 PDT 2008


 hw/kdrive/src/kmap.c                |    6 --
 hw/kdrive/src/vga.c                 |   11 ----
 hw/xfree86/common/compiler.h        |   90 ++++--------------------------------
 hw/xfree86/common/xf86Configure.c   |   10 ----
 hw/xfree86/common/xf86Events.c      |   26 ----------
 hw/xfree86/common/xf86cmap.c        |    3 -
 hw/xfree86/os-support/assyntax.h    |    2 
 hw/xfree86/os-support/xf86_OSlib.h  |   67 --------------------------
 hw/xfree86/os-support/xf86_OSproc.h |    4 -
 hw/xfree86/utils/xorgcfg/startx.c   |    5 --
 hw/xfree86/x86emu/sys.c             |   68 ++-------------------------
 include/os.h                        |    6 --
 include/servermd.h                  |    4 -
 mi/miinitext.c                      |    3 -
 os/access.c                         |   17 ------
 os/osdep.h                          |    3 -
 os/osinit.c                         |    2 
 os/utils.c                          |    5 --
 xkb/xkbAccessX.c                    |    3 -
 19 files changed, 29 insertions(+), 306 deletions(-)

New commits:
commit b699364b1c807d29666633523f5b5a608a07a8ee
Author: Adam Jackson <ajax at redhat.com>
Date:   Wed Jul 23 11:43:59 2008 -0400

    Unifdef VXWORKS.

diff --git a/hw/kdrive/src/kmap.c b/hw/kdrive/src/kmap.c
index ce1e28a..60e8ae1 100644
--- a/hw/kdrive/src/kmap.c
+++ b/hw/kdrive/src/kmap.c
@@ -75,9 +75,6 @@ KdMapDevice (CARD32 addr, CARD32 size)
 		    strerror (errno));
     return a;
 #endif
-#ifdef VXWORKS
-    return (void *) addr;
-#endif
 }
 
 void
@@ -90,9 +87,6 @@ KdUnmapDevice (void *addr, CARD32 size)
 #ifdef linux
     munmap (addr, size);
 #endif
-#ifdef VXWORKS
-    ;
-#endif
 }
 
 #ifdef HAVE_ASM_MTRR_H
diff --git a/hw/kdrive/src/vga.c b/hw/kdrive/src/vga.c
index 862f074..5a0a967 100644
--- a/hw/kdrive/src/vga.c
+++ b/hw/kdrive/src/vga.c
@@ -43,17 +43,6 @@
 #define _VgaBytePort(a)	(a)
 #endif
 
-#ifdef VXWORKS
-#define _VgaInb(r)  0
-#define _VgaOutb(v,r)   0
-
-#define _VgaByteAddr(a)     ((VGAVOL8 *) ((VGA32) (a) ^ 3))
-#define _VgaBytePort(a)	    0
-
-#undef stderr
-#define stderr stdout
-
-#endif
 
 #undef VGA_DEBUG_REGISTERS
 #ifdef VGA_DEBUG_REGISTERS
commit 2e3c43d306616f8accdeaffec9c108ba88324805
Author: Adam Jackson <ajax at redhat.com>
Date:   Wed Jul 23 11:35:06 2008 -0400

    Assume __GNUC__ >= 3.
    
    gcc 3.0 was seven years ago.  Get with the times.

diff --git a/hw/xfree86/common/compiler.h b/hw/xfree86/common/compiler.h
index 040d8cd..24f9ae6 100644
--- a/hw/xfree86/common/compiler.h
+++ b/hw/xfree86/common/compiler.h
@@ -212,7 +212,7 @@ struct __una_u16 { unsigned short x __attribute__((packed)); };
 
 static __inline__ unsigned long ldq_u(unsigned long * r11)
 {
-#    if defined(__GNUC__) && ((__GNUC__ > 2) || (__GNUC_MINOR__ >= 91))
+#    if defined(__GNUC__)
 	const struct __una_u64 *ptr = (const struct __una_u64 *) r11;
 	return ptr->x;
 #    else
@@ -231,7 +231,7 @@ static __inline__ unsigned long ldq_u(unsigned long * r11)
 
 static __inline__ unsigned long ldl_u(unsigned int * r11)
 {
-#    if defined(__GNUC__) && ((__GNUC__ > 2) || (__GNUC_MINOR__ >= 91))
+#    if defined(__GNUC__)
 	const struct __una_u32 *ptr = (const struct __una_u32 *) r11;
 	return ptr->x;
 #    else
@@ -250,7 +250,7 @@ static __inline__ unsigned long ldl_u(unsigned int * r11)
 
 static __inline__ unsigned long ldw_u(unsigned short * r11)
 {
-#    if defined(__GNUC__) && ((__GNUC__ > 2) || (__GNUC_MINOR__ >= 91))
+#    if defined(__GNUC__)
 	const struct __una_u16 *ptr = (const struct __una_u16 *) r11;
 	return ptr->x;
 #    else
@@ -273,7 +273,7 @@ static __inline__ unsigned long ldw_u(unsigned short * r11)
 
 static __inline__ void stq_u(unsigned long r5, unsigned long * r11)
 {
-#    if defined(__GNUC__) && ((__GNUC__ > 2) || (__GNUC_MINOR__ >= 91))
+#    if defined(__GNUC__)
 	struct __una_u64 *ptr = (struct __una_u64 *) r11;
 	ptr->x = r5;
 #    else
@@ -298,7 +298,7 @@ static __inline__ void stq_u(unsigned long r5, unsigned long * r11)
 
 static __inline__ void stl_u(unsigned long r5, unsigned int * r11)
 {
-#    if defined(__GNUC__) && ((__GNUC__ > 2) || (__GNUC_MINOR__ >= 91))
+#    if defined(__GNUC__)
 	struct __una_u32 *ptr = (struct __una_u32 *) r11;
 	ptr->x = r5;
 #    else
@@ -323,7 +323,7 @@ static __inline__ void stl_u(unsigned long r5, unsigned int * r11)
 
 static __inline__ void stw_u(unsigned long r5, unsigned short * r11)
 {
-#    if defined(__GNUC__) && ((__GNUC__ > 2) || (__GNUC_MINOR__ >= 91))
+#    if defined(__GNUC__)
 	struct __una_u16 *ptr = (struct __una_u16 *) r11;
 	ptr->x = r5;
 #    else
@@ -780,7 +780,7 @@ struct __una_u16 { unsigned short x __attribute__((packed)); };
 
 static __inline__ unsigned long ldq_u(unsigned long *p)
 {
-#    if defined(__GNUC__) && ((__GNUC__ > 2) || (__GNUC_MINOR__ >= 91))
+#    if defined(__GNUC__)
 #     if defined(__arch64__) || defined(__sparcv9)
 	const struct __una_u64 *ptr = (const struct __una_u64 *) p;
 #     else
@@ -796,7 +796,7 @@ static __inline__ unsigned long ldq_u(unsigned long *p)
 
 static __inline__ unsigned long ldl_u(unsigned int *p)
 {
-#    if defined(__GNUC__) && ((__GNUC__ > 2) || (__GNUC_MINOR__ >= 91))
+#    if defined(__GNUC__)
 	const struct __una_u32 *ptr = (const struct __una_u32 *) p;
 	return ptr->x;
 #    else
@@ -808,7 +808,7 @@ static __inline__ unsigned long ldl_u(unsigned int *p)
 
 static __inline__ unsigned long ldw_u(unsigned short *p)
 {
-#    if defined(__GNUC__) && ((__GNUC__ > 2) || (__GNUC_MINOR__ >= 91))
+#    if defined(__GNUC__)
 	const struct __una_u16 *ptr = (const struct __una_u16 *) p;
 	return ptr->x;
 #    else
@@ -820,7 +820,7 @@ static __inline__ unsigned long ldw_u(unsigned short *p)
 
 static __inline__ void stq_u(unsigned long val, unsigned long *p)
 {
-#    if defined(__GNUC__) && ((__GNUC__ > 2) || (__GNUC_MINOR__ >= 91))
+#    if defined(__GNUC__)
 #     if defined(__arch64__) || defined(__sparcv9)
 	struct __una_u64 *ptr = (struct __una_u64 *) p;
 #     else
@@ -835,7 +835,7 @@ static __inline__ void stq_u(unsigned long val, unsigned long *p)
 
 static __inline__ void stl_u(unsigned long val, unsigned int *p)
 {
-#    if defined(__GNUC__) && ((__GNUC__ > 2) || (__GNUC_MINOR__ >= 91))
+#    if defined(__GNUC__)
 	struct __una_u32 *ptr = (struct __una_u32 *) p;
 	ptr->x = val;
 #    else
@@ -846,7 +846,7 @@ static __inline__ void stl_u(unsigned long val, unsigned int *p)
 
 static __inline__ void stw_u(unsigned long val, unsigned short *p)
 {
-#    if defined(__GNUC__) && ((__GNUC__ > 2) || (__GNUC_MINOR__ >= 91))
+#    if defined(__GNUC__)
 	struct __una_u16 *ptr = (struct __una_u16 *) p;
 	ptr->x = val;
 #    else
diff --git a/hw/xfree86/x86emu/sys.c b/hw/xfree86/x86emu/sys.c
index 4d90ea3..e15fb09 100644
--- a/hw/xfree86/x86emu/sys.c
+++ b/hw/xfree86/x86emu/sys.c
@@ -68,7 +68,7 @@ X86EMU_intrFuncs	_X86EMU_intrTab[256];
  * packed structures to talk about such things with.
  */
 
-#if defined(__GNUC__) && ((__GNUC__ > 2) || (__GNUC_MINOR__ >= 91))
+#if defined(__GNUC__)
 struct __una_u64 { unsigned long  x __attribute__((packed)); };
 struct __una_u32 { unsigned int   x __attribute__((packed)); };
 struct __una_u16 { unsigned short x __attribute__((packed)); };
@@ -76,7 +76,7 @@ struct __una_u16 { unsigned short x __attribute__((packed)); };
 
 static __inline__ unsigned long ldq_u(unsigned long * r11)
 {
-#if defined(__GNUC__) && ((__GNUC__ > 2) || (__GNUC_MINOR__ >= 91))
+#if defined(__GNUC__)
 	const struct __una_u64 *ptr = (const struct __una_u64 *) r11;
 	return ptr->x;
 #else
@@ -95,7 +95,7 @@ static __inline__ unsigned long ldq_u(unsigned long * r11)
 
 static __inline__ unsigned long ldl_u(unsigned int * r11)
 {
-#if defined(__GNUC__) && ((__GNUC__ > 2) || (__GNUC_MINOR__ >= 91))
+#if defined(__GNUC__)
 	const struct __una_u32 *ptr = (const struct __una_u32 *) r11;
 	return ptr->x;
 #else
@@ -114,7 +114,7 @@ static __inline__ unsigned long ldl_u(unsigned int * r11)
 
 static __inline__ unsigned long ldw_u(unsigned short * r11)
 {
-#if defined(__GNUC__) && ((__GNUC__ > 2) || (__GNUC_MINOR__ >= 91))
+#if defined(__GNUC__)
 	const struct __una_u16 *ptr = (const struct __una_u16 *) r11;
 	return ptr->x;
 #else
@@ -137,7 +137,7 @@ static __inline__ unsigned long ldw_u(unsigned short * r11)
 
 static __inline__ void stq_u(unsigned long r5, unsigned long * r11)
 {
-#if defined(__GNUC__) && ((__GNUC__ > 2) || (__GNUC_MINOR__ >= 91))
+#if defined(__GNUC__)
 	struct __una_u64 *ptr = (struct __una_u64 *) r11;
 	ptr->x = r5;
 #else
@@ -162,7 +162,7 @@ static __inline__ void stq_u(unsigned long r5, unsigned long * r11)
 
 static __inline__ void stl_u(unsigned long r5, unsigned int * r11)
 {
-#if defined(__GNUC__) && ((__GNUC__ > 2) || (__GNUC_MINOR__ >= 91))
+#if defined(__GNUC__)
 	struct __una_u32 *ptr = (struct __una_u32 *) r11;
 	ptr->x = r5;
 #else
@@ -187,7 +187,7 @@ static __inline__ void stl_u(unsigned long r5, unsigned int * r11)
 
 static __inline__ void stw_u(unsigned long r5, unsigned short * r11)
 {
-#if defined(__GNUC__) && ((__GNUC__ > 2) || (__GNUC_MINOR__ >= 91))
+#if defined(__GNUC__)
 	struct __una_u16 *ptr = (struct __una_u16 *) r11;
 	ptr->x = r5;
 #else
@@ -209,60 +209,6 @@ static __inline__ void stw_u(unsigned long r5, unsigned short * r11)
 		:"r" (r5), "r" (r11));
 #endif
 }
-
-#elif defined(__GNUC__) && ((__GNUC__ < 3)) && \
-             (defined (__ia64__) || defined (ia64__))
-#define IA64_UALOADS
-/*
- * EGCS 1.1 knows about arbitrary unaligned loads.  Define some
- * packed structures to talk about such things with.
- */
-struct __una_u64 { unsigned long  x __attribute__((packed)); };
-struct __una_u32 { unsigned int   x __attribute__((packed)); };
-struct __una_u16 { unsigned short x __attribute__((packed)); };
-
-static __inline__ unsigned long
-__uldq (const unsigned long * r11)
-{
-    const struct __una_u64 *ptr = (const struct __una_u64 *) r11;
-    return ptr->x;
-}
-
-static __inline__ unsigned long
-uldl (const unsigned int * r11)
-{
-    const struct __una_u32 *ptr = (const struct __una_u32 *) r11;
-    return ptr->x;
-}
-
-static __inline__ unsigned long
-uldw (const unsigned short * r11)
-{
-    const struct __una_u16 *ptr = (const struct __una_u16 *) r11;
-    return ptr->x;
-}
-
-static __inline__ void
-ustq (unsigned long r5, unsigned long * r11)
-{
-    struct __una_u64 *ptr = (struct __una_u64 *) r11;
-    ptr->x = r5;
-}
-
-static __inline__ void
-ustl (unsigned long r5, unsigned int * r11)
-{
-    struct __una_u32 *ptr = (struct __una_u32 *) r11;
-    ptr->x = r5;
-}
-
-static __inline__ void
-ustw (unsigned long r5, unsigned short * r11)
-{
-    struct __una_u16 *ptr = (struct __una_u16 *) r11;
-    ptr->x = r5;
-}
-
 #endif
 
 /****************************************************************************
diff --git a/include/os.h b/include/os.h
index eff9b52..0a23a73 100644
--- a/include/os.h
+++ b/include/os.h
@@ -476,8 +476,7 @@ typedef enum {
 } MessageType;
 
 /* XXX Need to check which GCC versions have the format(printf) attribute. */
-#if defined(__GNUC__) && \
-    ((__GNUC__ > 2) || ((__GNUC__ == 2) && (__GNUC_MINOR__ > 4)))
+#if defined(__GNUC__) && (__GNUC__ > 2)
 #define _printf_attribute(a,b) __attribute((format(__printf__,a,b)))
 #else
 #define _printf_attribute(a,b) /**/
@@ -498,8 +497,7 @@ extern void FreeAuditTimer(void);
 extern void AuditF(const char *f, ...) _printf_attribute(1,2);
 extern void VAuditF(const char *f, va_list args);
 extern void FatalError(const char *f, ...) _printf_attribute(1,2)
-#if defined(__GNUC__) && \
-    ((__GNUC__ > 2) || ((__GNUC__ == 2) && (__GNUC_MINOR__ > 4)))
+#if defined(__GNUC__) && (__GNUC__ > 2)
 __attribute((noreturn))
 #endif
 ;
commit 0c1c9d75089aac0cf673820db83801d3cab5bfc7
Author: Adam Jackson <ajax at redhat.com>
Date:   Wed Jul 23 09:11:40 2008 -0400

    Remove some broken debugging scaffolding.

diff --git a/hw/xfree86/common/compiler.h b/hw/xfree86/common/compiler.h
index fe041c7..040d8cd 100644
--- a/hw/xfree86/common/compiler.h
+++ b/hw/xfree86/common/compiler.h
@@ -75,20 +75,6 @@
 #  endif
 # endif /* __inline */
 
-# if defined(IODEBUG) && defined(__GNUC__)
-#  define outb RealOutb
-#  define outw RealOutw
-#  define outl RealOutl
-#  define inb RealInb
-#  define inw RealInw
-#  define inl RealInl
-# endif
-
-
-# if defined(__SUNPRO_C)
-#  define DO_PROTOTYPES
-# endif
-
 # if defined(NO_INLINE) || defined(DO_PROTOTYPES)
 
 #  if !defined(__arm__)
@@ -1527,23 +1513,6 @@ inl(unsigned short port)
 #   define write_mem_barrier()   /* NOP */
 #  endif /* __GNUC__ */
 
-
-#  if defined(IODEBUG) && defined(__GNUC__)
-#   undef inb
-#   undef inw
-#   undef inl
-#   undef outb
-#   undef outw
-#   undef outl
-#   define inb(a) __extension__ ({unsigned char __c=RealInb(a); ErrorF("inb(0x%03x) = 0x%02x\t@ line %4d, file %s\n", a, __c, __LINE__, __FILE__);__c;})
-#   define inw(a) __extension__ ({unsigned short __c=RealInw(a); ErrorF("inw(0x%03x) = 0x%04x\t@ line %4d, file %s\n", a, __c, __LINE__, __FILE__);__c;})
-#   define inl(a) __extension__ ({unsigned int __c=RealInl(a); ErrorF("inl(0x%03x) = 0x%08x\t@ line %4d, file %s\n", a, __c, __LINE__, __FILE__);__c;})
-
-#   define outb(a,b) (ErrorF("outb(0x%03x, 0x%02x)\t@ line %4d, file %s\n", a, b, __LINE__, __FILE__),RealOutb(a,b))
-#   define outw(a,b) (ErrorF("outw(0x%03x, 0x%04x)\t@ line %4d, file %s\n", a, b, __LINE__, __FILE__),RealOutw(a,b))
-#   define outl(a,b) (ErrorF("outl(0x%03x, 0x%08x)\t@ line %4d, file %s\n", a, b, __LINE__, __FILE__),RealOutl(a,b))
-#  endif
-
 # endif /* NO_INLINE */
 
 # ifdef __alpha__
commit 0ff5bc404842f7264a8e77f9e2a0bd8d0b051356
Author: Adam Jackson <ajax at redhat.com>
Date:   Wed Jul 23 09:09:11 2008 -0400

    Unifdef QNX.
    
    Again, hasn't worked since at least 7.0.

diff --git a/hw/xfree86/common/compiler.h b/hw/xfree86/common/compiler.h
index 9e9234f..fe041c7 100644
--- a/hw/xfree86/common/compiler.h
+++ b/hw/xfree86/common/compiler.h
@@ -84,30 +84,6 @@
 #  define inl RealInl
 # endif
 
-# if defined(QNX4) /* Do this for now to keep Watcom happy */
-#  define outb outp
-#  define outw outpw
-#  define outl outpd 
-#  define inb inp
-#  define inw inpw
-#  define inl inpd
-
-/* Define the ffs function for inlining */
-extern int ffs(unsigned long);
-#  pragma aux ffs_ = \
-        "bsf edx, eax"          \
-        "jnz bits_set"          \
-        "xor eax, eax"          \
-        "jmp exit1"             \
-        "bits_set:"             \
-        "mov eax, edx"          \
-        "inc eax"               \
-        "exit1:"                \
-        __parm [eax]            \
-        __modify [eax edx]      \
-        __value [eax]           \
-        ;
-# endif
 
 # if defined(__SUNPRO_C)
 #  define DO_PROTOTYPES
@@ -1511,7 +1487,6 @@ inl(unsigned short port)
 #   endif /* ix86 */
 
 #  else /* !GNUC */
-#   if !defined(QNX4)
 #    if defined(__STDC__) && (__STDC__ == 1)
 #     ifndef asm
 #      define asm __asm
@@ -1542,7 +1517,6 @@ inl(unsigned short port)
 #     pragma asm partial_optimization inw
 #     pragma asm partial_optimization inb
 #    endif
-#   endif
 #   define ldq_u(p)	(*((unsigned long  *)(p)))
 #   define ldl_u(p)	(*((unsigned int   *)(p)))
 #   define ldw_u(p)	(*((unsigned short *)(p)))
@@ -1553,15 +1527,6 @@ inl(unsigned short port)
 #   define write_mem_barrier()   /* NOP */
 #  endif /* __GNUC__ */
 
-#  if defined(QNX4)
-#   include <sys/types.h>
-extern unsigned  inb(unsigned port);
-extern unsigned  inw(unsigned port);
-extern unsigned  inl(unsigned port);
-extern void outb(unsigned port, unsigned val);
-extern void outw(unsigned port, unsigned val);
-extern void outl(unsigned port, unsigned val);
-#  endif /* QNX4 */
 
 #  if defined(IODEBUG) && defined(__GNUC__)
 #   undef inb
diff --git a/hw/xfree86/common/xf86Configure.c b/hw/xfree86/common/xf86Configure.c
index 536f897..119a0a8 100644
--- a/hw/xfree86/common/xf86Configure.c
+++ b/hw/xfree86/common/xf86Configure.c
@@ -76,12 +76,6 @@ static char *DFLT_MOUSE_PROTO = "OSMouse";
 #elif defined(__UNIXWARE__)
 static char *DFLT_MOUSE_PROTO = "OSMouse";
 static char *DFLT_MOUSE_DEV = "/dev/mouse";
-#elif defined(QNX4)
-static char *DFLT_MOUSE_PROTO = "OSMouse";
-static char *DFLT_MOUSE_DEV = "/dev/mouse";
-#elif defined(__QNXNTO__)
-static char *DFLT_MOUSE_PROTO = "OSMouse";
-static char *DFLT_MOUSE_DEV = "/dev/devi/mouse0";
 #elif defined(__FreeBSD__) || defined(__FreeBSD_kernel__) || defined(__DragonFly__)
 static char *DFLT_MOUSE_DEV = "/dev/sysmouse";
 static char *DFLT_MOUSE_PROTO = "auto";
@@ -797,11 +791,7 @@ DoConfigure()
 
       	if (home[0] == '/' && home[1] == '\0')
             home[0] = '\0';
-#ifndef QNX4
 	sprintf(filename, "%s/%s", home,configfile);
-#else
-	sprintf(filename, "//%d%s/%s", getnid(),home,configfile);
-#endif
 	
     }
 
diff --git a/hw/xfree86/common/xf86Events.c b/hw/xfree86/common/xf86Events.c
index 6385b78..832de10 100644
--- a/hw/xfree86/common/xf86Events.c
+++ b/hw/xfree86/common/xf86Events.c
@@ -285,12 +285,8 @@ xf86ProcessActionEvent(ActionEvent action, void *arg)
 #if defined(__SCO__) || defined(__UNIXWARE__)
 	    vtno--;
 #endif
-#if defined(QNX4)
-	    xf86Info.vtRequestsPending = vtno;
-#else
 	    if (ioctl(xf86Info.consoleFd, VT_ACTIVATE, vtno) < 0)
 		ErrorF("Failed to switch consoles (%s)\n", strerror(errno));
-#endif
 	}
 	break;
     case ACTION_SWITCHSCREEN_NEXT:
@@ -373,7 +369,6 @@ xf86CommonSpecialKey(int key, Bool down, int modifiers)
 void
 xf86Wakeup(pointer blockData, int err, pointer pReadmask)
 {
-#if !defined(__QNX__)
     fd_set* LastSelectMask = (fd_set*)pReadmask;
     fd_set devicesWithInput;
     InputInfoPtr pInfo;
@@ -400,27 +395,6 @@ xf86Wakeup(pointer blockData, int err, pointer pReadmask)
 	    }
 	}
     }
-#else   /* __QNX__ */
-
-    InputInfoPtr pInfo;
-
-    pInfo = xf86InputDevs;
-    while (pInfo) {
-		if (pInfo->read_input && pInfo->fd >= 0) {
-		    int sigstate = xf86BlockSIGIO();
-
-		    pInfo->read_input(pInfo);
-		    xf86UnblockSIGIO(sigstate);
-		    /*
-		     * Must break here because more than one device may share
-		     * the same file descriptor.
-		     */
-		    break;
-		}
-		pInfo = pInfo->next;
-    }
-
-#endif  /* __QNX__ */
 
     if (err >= 0) { /* we don't want the handlers called if select() */
 	IHPtr ih;   /* returned with an error condition, do we?      */
diff --git a/hw/xfree86/common/xf86cmap.c b/hw/xfree86/common/xf86cmap.c
index 764647e..8ae193a 100644
--- a/hw/xfree86/common/xf86cmap.c
+++ b/hw/xfree86/common/xf86cmap.c
@@ -29,8 +29,7 @@
 #include <xorg-config.h>
 #endif
 
-#if defined(_XOPEN_SOURCE) || defined(__QNXNTO__) \
-	|| (defined(sun) && defined(__SVR4))
+#if defined(_XOPEN_SOURCE) || defined(sun) && defined(__SVR4)
 #include <math.h>
 #else
 #define _XOPEN_SOURCE   /* to get prototype for pow on some systems */
diff --git a/hw/xfree86/os-support/assyntax.h b/hw/xfree86/os-support/assyntax.h
index 2d7e17f..4f8bbbf 100644
--- a/hw/xfree86/os-support/assyntax.h
+++ b/hw/xfree86/os-support/assyntax.h
@@ -236,7 +236,7 @@
 #endif /* ACK_ASSEMBLER */
 
 
-#if defined(__QNX__) || (defined(SYSV) || defined(SVR4)) && !defined(ACK_ASSEMBLER) || defined(__ELF__) || defined(__GNU__)
+#if (defined(SYSV) || defined(SVR4)) && !defined(ACK_ASSEMBLER) || defined(__ELF__) || defined(__GNU__)
 #define GLNAME(a)       a
 #else
 #define GLNAME(a)       CONCAT(_,a)
diff --git a/hw/xfree86/os-support/xf86_OSlib.h b/hw/xfree86/os-support/xf86_OSlib.h
index b43c14d..7469d55 100644
--- a/hw/xfree86/os-support/xf86_OSlib.h
+++ b/hw/xfree86/os-support/xf86_OSlib.h
@@ -477,73 +477,6 @@
 /* __FreeBSD_kernel__ || __NetBSD__ || __OpenBSD__ || __bsdi__ */
 
 /**************************************************************************/
-/* QNX4                                                                   */
-/**************************************************************************/
-/* This is the QNX code for Watcom 10.6 and QNX 4.x */
-#if defined(QNX4)
-#include <signal.h>
-#include <errno.h>
-#include <sys/stat.h>
-#include <termios.h>
-#include <ioctl.h>
-#include <sys/param.h>
-
-/* Warning: by default, the fd_set size is 32 in QNX!  */
-#define FD_SETSIZE 256
-#include <sys/select.h>
-
-  /* keyboard types */
-# define KB_84                   1
-# define KB_101                  2
-# define KB_OTHER                3
-
-  /* LEDs */
-#  define LED_CAP 0x04
-#  define LED_NUM 0x02
-#  define LED_SCR 0x01
-
-# define POSIX_TTY
-
-#define TIOCM_DTR       0x0001            /* data terminal ready */
-#define TIOCM_RTS       0x0002            /* request to send */
-#define TIOCM_CTS       0x1000            /* clear to send */
-#define TIOCM_DSR       0x2000            /* data set ready */
-#define TIOCM_RI        0x4000            /* ring */
-#define TIOCM_RNG       TIOCM_RI
-#define TIOCM_CD        0x8000            /* carrier detect */
-#define TIOCM_CAR       TIOCM_CD
-#define TIOCM_LE        0x0100            /* line enable */
-#define TIOCM_ST        0x0200            /* secondary transmit */
-#define TIOCM_SR        0x0400            /* secondary receive */
-
-#endif
-
-/**************************************************************************/
-/* QNX/Neutrino                                                           */
-/**************************************************************************/
-/* This is the Neutrino code for for NTO2.0 and GCC */
-#if defined(__QNXNTO__)
-#include <signal.h>
-#include <errno.h>
-#include <sys/stat.h>
-#include <termios.h>
-#include <ioctl.h>
-#include <sys/param.h>
-
-/* Warning: by default, the fd_set size is 32 in NTO!  */
-#define FD_SETSIZE 256
-#include <sys/select.h>
-
-  /* keyboard types */
-# define KB_84                   1
-# define KB_101                  2
-# define KB_OTHER                3
-
-# define POSIX_TTY
-
-#endif
-
-/**************************************************************************/
 /* IRIX                                                                   */
 /**************************************************************************/
 #if defined(sgi)
diff --git a/hw/xfree86/os-support/xf86_OSproc.h b/hw/xfree86/os-support/xf86_OSproc.h
index abf5a47..74c2dc0 100644
--- a/hw/xfree86/os-support/xf86_OSproc.h
+++ b/hw/xfree86/os-support/xf86_OSproc.h
@@ -151,10 +151,6 @@ extern void xf86EnableInterrupts(void);
 extern void xf86SetTVOut(int);
 extern void xf86SetRGBOut(void);
 extern void xf86OSRingBell(int, int, int);
-#if defined(QNX4)
-#pragma aux xf86BusToMem modify [eax ebx ecx edx esi edi];
-#pragma aux xf86MemToBus modify [eax ebx ecx edx esi edi];
-#endif
 extern void xf86BusToMem(unsigned char *, unsigned char *, int);
 extern void xf86MemToBus(unsigned char *, unsigned char *, int);
 extern void xf86IODelay(void);
diff --git a/hw/xfree86/utils/xorgcfg/startx.c b/hw/xfree86/utils/xorgcfg/startx.c
index 507afbf..47713ff 100644
--- a/hw/xfree86/utils/xorgcfg/startx.c
+++ b/hw/xfree86/utils/xorgcfg/startx.c
@@ -82,12 +82,7 @@ startx(void)
 	if ((home = getenv("HOME")) == NULL)
 	    home = "/";
 
-#ifndef QNX4
 	XmuSnprintf(filename, sizeof(filename), "%s/"__XCONFIGFILE__".new", home);
-#else
-	XmuSnprintf(filename, sizeof(filename), "//%d%s/"__XCONFIGFILE__".new",
-		    getnid(), home);
-#endif
 
 	/* this memory is never released, even if the value of XF86Config_path is
 	 * changed.
diff --git a/include/servermd.h b/include/servermd.h
index 6624cd9..13414f7 100644
--- a/include/servermd.h
+++ b/include/servermd.h
@@ -234,9 +234,9 @@ SOFTWARE.
 /* ???? */
 #endif /* AMD64 */
 
-#if	(defined(SVR4) && (defined(__i386__) || (defined(__i386)))) ||	\
+#if	defined(SVR4) && (defined(__i386__) || defined(__i386) ) ||	\
 	defined(__alpha__) || defined(__alpha) || \
-	defined(__i386__) || defined(__QNX__) || \
+	defined(__i386__) || \
 	defined(__s390x__) || defined(__s390__)
   
 #ifndef IMAGE_BYTE_ORDER
diff --git a/mi/miinitext.c b/mi/miinitext.c
index 67249dc..cd0a843 100644
--- a/mi/miinitext.c
+++ b/mi/miinitext.c
@@ -83,9 +83,6 @@ SOFTWARE.
 #include "micmap.h"
 #include "globals.h"
 
-#if defined(QNX4) /* sleaze for Watcom on QNX4 ... */
-#undef GLXEXT
-#endif
 
 extern Bool noTestExtensions;
 
diff --git a/os/access.c b/os/access.c
index 93e33b5..c973cb1 100644
--- a/os/access.c
+++ b/os/access.c
@@ -95,7 +95,7 @@ SOFTWARE.
 # endif
 #endif
 
-#if defined(hpux) || defined(QNX4)
+#if defined(hpux) 
 # include <sys/utsname.h>
 # ifdef HAS_IFREQ
 #  include <net/if.h>
@@ -350,7 +350,7 @@ ifioctl (int fd, int cmd, char *arg)
  * for this fd and add them to the selfhosts list.
  */
 
-#if !defined(SIOCGIFCONF) || (defined (hpux) && ! defined (HAS_IFREQ)) || defined(QNX4)
+#if !defined(SIOCGIFCONF) || defined (hpux) && ! defined (HAS_IFREQ) 
 void
 DefineSelf (int fd)
 {
@@ -393,19 +393,11 @@ DefineSelf (int fd)
      * uname() lets me access to the whole string (it smashes release, you
      * see), whereas gethostname() kindly truncates it for me.
      */
-#ifndef QNX4
 #ifndef WIN32
     uname(&name);
 #else
     gethostname(name.nodename, sizeof(name.nodename));
 #endif
-#else
-    /* QNX4's uname returns node number in name.nodename, not the hostname
-       have to overwrite it */
-    char hname[1024];
-    gethostname(hname, 1024);
-    name.nodename = hname;
-#endif
 
     hp = _XGethostbyname(name.nodename, hparams);
     if (hp != NULL)
@@ -514,14 +506,9 @@ DefineLocalHost:
 		      p->ifr_addr.sa_len - sizeof (p->ifr_addr) : 0))
 #define ifraddr_size(a) (a.sa_len)
 #else
-#ifdef QNX4
-#define ifr_size(p) (p->ifr_addr.sa_len + IFNAMSIZ)
-#define ifraddr_size(a) (a.sa_len)
-#else
 #define ifr_size(p) (sizeof (ifr_type))
 #define ifraddr_size(a) (sizeof (a))
 #endif
-#endif
 
 #if defined(DEF_SELF_DEBUG) || (defined(IPv6) && defined(AF_INET6))
 #include <arpa/inet.h>
diff --git a/os/osdep.h b/os/osdep.h
index 2f7bd75..1b8dcf7 100644
--- a/os/osdep.h
+++ b/os/osdep.h
@@ -68,9 +68,6 @@ SOFTWARE.
 #endif
 #endif
 
-#ifdef __QNX__
-#define NOFILES_MAX 256
-#endif
 #ifndef OPEN_MAX
 #ifdef SVR4
 #define OPEN_MAX 256
diff --git a/os/osinit.c b/os/osinit.c
index 7a16c0b..93e1d03 100644
--- a/os/osinit.c
+++ b/os/osinit.c
@@ -71,7 +71,7 @@ SOFTWARE.
 #include <sys/wait.h>
 #endif
 
-#if !defined(SYSV) && !defined(WIN32) && !defined(QNX4)
+#if !defined(SYSV) && !defined(WIN32) 
 #include <sys/resource.h>
 #endif
 
diff --git a/os/utils.c b/os/utils.c
index 67ab6d9..35f1e84 100644
--- a/os/utils.c
+++ b/os/utils.c
@@ -94,7 +94,7 @@ OR PERFORMANCE OF THIS SOFTWARE.
 #ifndef WIN32
 #include <sys/wait.h>
 #endif
-#if !defined(SYSV) && !defined(WIN32) && !defined(QNX4)
+#if !defined(SYSV) && !defined(WIN32) 
 #include <sys/resource.h>
 #endif
 #include <sys/stat.h>
@@ -1823,9 +1823,6 @@ CheckUserParameters(int argc, char **argv, char **envp)
     enum BadCode bad = NotBad;
     int i = 0, j;
     char *a, *e = NULL;
-#if defined(__QNX__) && !defined(__QNXNTO__)
-    char cmd_name[64];
-#endif
 
 #if CHECK_EUID
     if (geteuid() == 0 && getuid() != geteuid())
diff --git a/xkb/xkbAccessX.c b/xkb/xkbAccessX.c
index 3f45e23..658e41f 100644
--- a/xkb/xkbAccessX.c
+++ b/xkb/xkbAccessX.c
@@ -30,9 +30,6 @@ THE USE OR PERFORMANCE OF THIS SOFTWARE.
 
 #include <stdio.h>
 #include <math.h>
-#ifdef __QNX__
-#include <limits.h>
-#endif
 #define NEED_EVENTS 1
 #include <X11/X.h>
 #include <X11/Xproto.h>


More information about the xorg-commit mailing list