Skip to content

Commit

Permalink
os, xfree86: Stop being so weird about <limits.h>
Browse files Browse the repository at this point in the history
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@redhat.com>
Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Reviewed-by: Julien Cristau <jcristau@debian.org>
Tested-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
  • Loading branch information
nwnk committed May 12, 2017
1 parent d9e23ea commit 152375f
Show file tree
Hide file tree
Showing 4 changed files with 0 additions and 32 deletions.
6 changes: 0 additions & 6 deletions hw/xfree86/os-support/xf86_OSlib.h
Expand Up @@ -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"
Expand Down
7 changes: 0 additions & 7 deletions hw/xfree86/parser/scan.c
Expand Up @@ -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
Expand Down
7 changes: 0 additions & 7 deletions os/osdep.h
Expand Up @@ -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>

Expand Down
12 changes: 0 additions & 12 deletions os/utils.c
Expand Up @@ -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
Expand Down

0 comments on commit 152375f

Please sign in to comment.