diff options
-rw-r--r-- | nx-X11/lib/xtrans/Xtransint.h | 53 | ||||
-rw-r--r-- | nx-X11/lib/xtrans/Xtranssock.c | 4 |
2 files changed, 3 insertions, 54 deletions
diff --git a/nx-X11/lib/xtrans/Xtransint.h b/nx-X11/lib/xtrans/Xtransint.h index 203e5fabe..19cd86062 100644 --- a/nx-X11/lib/xtrans/Xtransint.h +++ b/nx-X11/lib/xtrans/Xtransint.h @@ -103,59 +103,6 @@ from The Open Group. # include <sys/utsname.h> # endif -/* - * makedepend screws up on #undef OPEN_MAX, so we define a new symbol - */ - -# ifndef TRANS_OPEN_MAX - -# ifndef X_NOT_POSIX -# ifdef _POSIX_SOURCE -# include <limits.h> -# else -# define _POSIX_SOURCE -# include <limits.h> -# undef _POSIX_SOURCE -# endif -# endif -# ifndef OPEN_MAX -# if defined(_SC_OPEN_MAX) && !defined(__UNIXOS2__) -# define OPEN_MAX (sysconf(_SC_OPEN_MAX)) -# else -# ifdef SVR4 -# define OPEN_MAX 256 -# else -# include <sys/param.h> -# ifndef OPEN_MAX -# ifdef __OSF1__ -# define OPEN_MAX 256 -# else -# ifdef NOFILE -# define OPEN_MAX NOFILE -# else -# if !defined(__UNIXOS2__) -# define OPEN_MAX NOFILES_MAX -# else -# define OPEN_MAX 256 -# endif -# endif -# endif -# endif -# endif -# endif -# endif -# if defined(_SC_OPEN_MAX) -# define TRANS_OPEN_MAX OPEN_MAX -# else /* !__GNU__ */ -# if OPEN_MAX > 256 -# define TRANS_OPEN_MAX 256 -# else -# define TRANS_OPEN_MAX OPEN_MAX -# endif -# endif /*__GNU__*/ - -# endif /* TRANS_OPEN_MAX */ - # define ESET(val) errno = val # define EGET() errno diff --git a/nx-X11/lib/xtrans/Xtranssock.c b/nx-X11/lib/xtrans/Xtranssock.c index 3e4896fce..cdc421a1e 100644 --- a/nx-X11/lib/xtrans/Xtranssock.c +++ b/nx-X11/lib/xtrans/Xtranssock.c @@ -141,6 +141,8 @@ from the copyright holders. #include <sys/stropts.h> #endif +#include <unistd.h> + #else /* !WIN32 */ #include <nx-X11/Xwinsock.h> @@ -993,7 +995,7 @@ TRANS(SocketOpen) (int i, int type) Sockettrans2devtab[i].protocol)) < 0 #ifndef WIN32 #if (defined(X11_t) && !defined(USE_POLL)) || defined(FS_t) || defined(FONT_t) - || ciptr->fd >= TRANS_OPEN_MAX + || ciptr->fd >= sysconf(_SC_OPEN_MAX) #endif #endif ) { |