(setfdtablesize): Remove. This may drop support for Sequent.
(getfdtablesize) [hpux]: Client and server had different versions. Standardize on server's.
This commit is contained in:
parent
1a3a8d993a
commit
5f3b32fd36
3 changed files with 9 additions and 51 deletions
|
@ -25,49 +25,24 @@
|
|||
*
|
||||
* ---
|
||||
*
|
||||
* dtable.c: machine-dependent descriptor table management
|
||||
* dtable.c: Machine-dependant descriptor table management
|
||||
*
|
||||
* Known contributors to this file:
|
||||
* Steve McClure, 1998
|
||||
*/
|
||||
|
||||
#ifdef hpux
|
||||
#include <stdio.h>
|
||||
#if !defined(_WIN32)
|
||||
#include <unistd.h>
|
||||
#endif
|
||||
#ifdef _WIN32
|
||||
#include <stdio.h>
|
||||
#endif
|
||||
|
||||
/*ARGSUSED*/
|
||||
void
|
||||
setfdtablesize(min, start)
|
||||
int min;
|
||||
int start;
|
||||
{
|
||||
#ifdef sequent
|
||||
extern int errno;
|
||||
|
||||
while (start >= min) {
|
||||
if (setdtablesize(start) < 0)
|
||||
break;
|
||||
start -= 16;
|
||||
}
|
||||
errno = 0;
|
||||
#endif
|
||||
}
|
||||
|
||||
int
|
||||
getfdtablesize()
|
||||
getfdtablesize(void)
|
||||
{
|
||||
#ifdef hpux
|
||||
return _NFILE;
|
||||
#if defined(_WIN32)
|
||||
return (_NFILE);
|
||||
#elif defined(hpux)
|
||||
return (int)sysconf(_SC_OPEN_MAX);
|
||||
#else
|
||||
#ifdef _WIN32
|
||||
return _NFILE;
|
||||
#else
|
||||
int getdtablesize();
|
||||
|
||||
return getdtablesize();
|
||||
#endif
|
||||
#endif
|
||||
}
|
||||
|
|
|
@ -32,26 +32,10 @@
|
|||
*/
|
||||
|
||||
#if !defined(_WIN32)
|
||||
#include <unistd.h> /* getdtablesize */
|
||||
#include <unistd.h>
|
||||
#endif
|
||||
#include "gen.h"
|
||||
|
||||
/*ARGSUSED*/
|
||||
void
|
||||
setfdtablesize(int min, int start)
|
||||
{
|
||||
#ifdef sequent
|
||||
extern int errno;
|
||||
|
||||
while (start >= min) {
|
||||
if (setdtablesize(start) > 0)
|
||||
break;
|
||||
start -= 16;
|
||||
}
|
||||
errno = 0;
|
||||
#endif
|
||||
}
|
||||
|
||||
int
|
||||
getfdtablesize(void)
|
||||
{
|
||||
|
|
|
@ -204,7 +204,6 @@ char *argv[];
|
|||
#else
|
||||
srand(now);
|
||||
#endif /* _WIN32 */
|
||||
setfdtablesize(32, 256);
|
||||
global_init();
|
||||
shutdown_init();
|
||||
player_init();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue