diff options
author | Daniel Stone <daniel@fooishbar.org> | 2008-07-17 21:37:50 +0300 |
---|---|---|
committer | Daniel Stone <daniel@fooishbar.org> | 2008-07-17 21:37:50 +0300 |
commit | 446fe9eecddd1337f9d5164dd7c301e1ba3dfe32 (patch) | |
tree | e749fe520d2226df0397a407e7353c065bbc5248 /os/utils.c | |
parent | 0564b5454ac101d9e1218767bbbc2c2d9f3e0696 (diff) |
Dead code removal
Remove a whole bunch of code that was never built, be it entire files or
just dead ifdefs.
Diffstat (limited to 'os/utils.c')
-rw-r--r-- | os/utils.c | 35 |
1 files changed, 2 insertions, 33 deletions
diff --git a/os/utils.c b/os/utils.c index f547926fd..c5339cc90 100644 --- a/os/utils.c +++ b/os/utils.c @@ -83,7 +83,7 @@ OR PERFORMANCE OF THIS SOFTWARE. #include <signal.h> #undef _POSIX_C_SOURCE #else -#if defined(X_NOT_POSIX) || defined(_POSIX_SOURCE) +#if defined(_POSIX_SOURCE) #include <signal.h> #else #define _POSIX_SOURCE @@ -101,11 +101,6 @@ OR PERFORMANCE OF THIS SOFTWARE. #include <ctype.h> /* for isspace */ #include <stdarg.h> -#if defined(DGUX) -#include <sys/resource.h> -#include <netdb.h> -#endif - #include <stdlib.h> /* for malloc() */ #if defined(TCPCONN) || defined(STREAMSCONN) @@ -261,9 +256,6 @@ OsSignal(sig, handler) int sig; OsSigHandlerPtr handler; { -#ifdef X_NOT_POSIX - return signal(sig, handler); -#else struct sigaction act, oact; sigemptyset(&act.sa_mask); @@ -274,10 +266,8 @@ OsSignal(sig, handler) if (sigaction(sig, &act, &oact)) perror("sigaction"); return oact.sa_handler; -#endif } - -#ifdef SERVER_LOCK + /* * Explicit support for a server lock file like the ones used for UUCP. * For architectures with virtual terminals that can run more than one @@ -289,11 +279,6 @@ OsSignal(sig, handler) #define LOCK_PREFIX "/.X" #define LOCK_SUFFIX "-lock" -#if defined(DGUX) -#include <limits.h> -#include <sys/param.h> -#endif - #ifndef PATH_MAX #include <sys/param.h> #ifndef PATH_MAX @@ -369,11 +354,7 @@ LockServer(void) FatalError("Could not create lock file in %s\n", tmp); (void) sprintf(pid_str, "%10ld\n", (long)getpid()); (void) write(lfd, pid_str, 11); -#ifndef USE_CHMOD - (void) fchmod(lfd, 0444); -#else (void) chmod(tmp, 0444); -#endif (void) close(lfd); /* @@ -455,7 +436,6 @@ UnlockServer(void) (void) unlink(LockFile); } } -#endif /* SERVER_LOCK */ /* Force connections to close on SIGHUP from init */ @@ -467,13 +447,6 @@ AutoResetServer (int sig) dispatchException |= DE_RESET; isItTimeToYield = TRUE; -#ifdef GPROF - chdir ("/tmp"); - exit (0); -#endif -#if defined(SYSV) && defined(X_NOT_POSIX) - OsSignal (SIGHUP, AutoResetServer); -#endif errno = olderrno; } @@ -487,10 +460,6 @@ GiveUp(int sig) dispatchException |= DE_TERMINATE; isItTimeToYield = TRUE; -#if defined(SYSV) && defined(X_NOT_POSIX) - if (sig) - OsSignal(sig, SIG_IGN); -#endif errno = olderrno; } |