[PATCH xserver 1/2] os, xfree86: Stop being so weird about <limits.h>
Adam Jackson
ajax at redhat.com
Thu May 11 21:17:54 UTC 2017
Whatever problem this is trying to fix, we don't care. Just include the
thing and stop worrying about whether _POSIX_SOURCE is defined.
Signed-off-by: Adam Jackson <ajax at redhat.com>
---
hw/xfree86/os-support/xf86_OSlib.h | 6 ------
hw/xfree86/parser/scan.c | 7 -------
os/osdep.h | 7 -------
os/utils.c | 12 ------------
4 files changed, 32 deletions(-)
diff --git a/hw/xfree86/os-support/xf86_OSlib.h b/hw/xfree86/os-support/xf86_OSlib.h
index 5d78c66e3..159c8064c 100644
--- a/hw/xfree86/os-support/xf86_OSlib.h
+++ b/hw/xfree86/os-support/xf86_OSlib.h
@@ -337,13 +337,7 @@ struct pcvtid {
#define MAXHOSTNAMELEN 32
#endif /* !MAXHOSTNAMELEN */
-#if defined(_POSIX_SOURCE)
#include <limits.h>
-#else
-#define _POSIX_SOURCE
-#include <limits.h>
-#undef _POSIX_SOURCE
-#endif /* _POSIX_SOURCE */
#ifndef DEV_MEM
#define DEV_MEM "/dev/mem"
diff --git a/hw/xfree86/parser/scan.c b/hw/xfree86/parser/scan.c
index 6d46a5621..1eb35ed73 100644
--- a/hw/xfree86/parser/scan.c
+++ b/hw/xfree86/parser/scan.c
@@ -65,14 +65,7 @@
#include <stdarg.h>
#include <X11/Xdefs.h>
#include <X11/Xfuncproto.h>
-
-#if defined(_POSIX_SOURCE)
#include <limits.h>
-#else
-#define _POSIX_SOURCE
-#include <limits.h>
-#undef _POSIX_SOURCE
-#endif /* _POSIX_SOURCE */
#if !defined(MAXHOSTNAMELEN)
#define MAXHOSTNAMELEN 32
diff --git a/os/osdep.h b/os/osdep.h
index a0d57b8db..c5bec3f56 100644
--- a/os/osdep.h
+++ b/os/osdep.h
@@ -55,14 +55,7 @@ SOFTWARE.
#include <X11/Xdmcp.h>
#endif
-#ifdef _POSIX_SOURCE
#include <limits.h>
-#else
-#define _POSIX_SOURCE
-#include <limits.h>
-#undef _POSIX_SOURCE
-#endif
-
#include <stddef.h>
#include <X11/Xos.h>
diff --git a/os/utils.c b/os/utils.c
index 611e8ac23..1972aa120 100644
--- a/os/utils.c
+++ b/os/utils.c
@@ -83,19 +83,7 @@ __stdcall unsigned long GetTickCount(void);
#include <X11/fonts/libxfont2.h>
#include "osdep.h"
#include "extension.h"
-#ifdef X_POSIX_C_SOURCE
-#define _POSIX_C_SOURCE X_POSIX_C_SOURCE
#include <signal.h>
-#undef _POSIX_C_SOURCE
-#else
-#if defined(_POSIX_SOURCE)
-#include <signal.h>
-#else
-#define _POSIX_SOURCE
-#include <signal.h>
-#undef _POSIX_SOURCE
-#endif
-#endif
#ifndef WIN32
#include <sys/wait.h>
#endif
--
2.12.2
More information about the xorg-devel
mailing list