Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
N
nx-libs
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
1
Issues
1
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
dimbor
nx-libs
Commits
e5b4532a
Commit
e5b4532a
authored
Aug 07, 2008
by
Adam Jackson
Committed by
Mike Gabriel
Nov 02, 2016
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Drastically simplify TRANS_OPEN_MAX.
If your OS doesn't have sysconf(3), then life is already hard for you. Backported-to-NX-by:
Ulrich Sibiller
<
uli42@gmx.de
>
parent
0ca6e599
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
3 additions
and
54 deletions
+3
-54
Xtransint.h
nx-X11/lib/xtrans/Xtransint.h
+0
-53
Xtranssock.c
nx-X11/lib/xtrans/Xtranssock.c
+3
-1
No files found.
nx-X11/lib/xtrans/Xtransint.h
View file @
e5b4532a
...
...
@@ -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
...
...
nx-X11/lib/xtrans/Xtranssock.c
View file @
e5b4532a
...
...
@@ -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
)
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment