(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:
Markus Armbruster 2003-12-17 21:14:00 +00:00
parent 1a3a8d993a
commit 5f3b32fd36
3 changed files with 9 additions and 51 deletions

View file

@ -25,49 +25,24 @@
* *
* --- * ---
* *
* dtable.c: machine-dependent descriptor table management * dtable.c: Machine-dependant descriptor table management
* *
* Known contributors to this file: * Known contributors to this file:
* Steve McClure, 1998 * Steve McClure, 1998
*/ */
#ifdef hpux #if !defined(_WIN32)
#include <stdio.h> #include <unistd.h>
#endif #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 int
getfdtablesize() getfdtablesize(void)
{ {
#ifdef hpux #if defined(_WIN32)
return _NFILE; return (_NFILE);
#elif defined(hpux)
return (int)sysconf(_SC_OPEN_MAX);
#else #else
#ifdef _WIN32
return _NFILE;
#else
int getdtablesize();
return getdtablesize(); return getdtablesize();
#endif #endif
#endif
} }

View file

@ -32,26 +32,10 @@
*/ */
#if !defined(_WIN32) #if !defined(_WIN32)
#include <unistd.h> /* getdtablesize */ #include <unistd.h>
#endif #endif
#include "gen.h" #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 int
getfdtablesize(void) getfdtablesize(void)
{ {

View file

@ -204,7 +204,6 @@ char *argv[];
#else #else
srand(now); srand(now);
#endif /* _WIN32 */ #endif /* _WIN32 */
setfdtablesize(32, 256);
global_init(); global_init();
shutdown_init(); shutdown_init();
player_init(); player_init();