From 4a680cf8c091828ee78a7a7a18daa7069df932b9 Mon Sep 17 00:00:00 2001 From: Ulrich Sibiller Date: Sun, 5 May 2024 22:07:56 +0200 Subject: os: unifdef GPROF and X_NOT_POSIX just like xorg-xserver in commit 446fe9eecddd1337f9d5164dd7c301e1ba3dfe32 Author: Daniel Stone Date: Thu Jul 17 21:37:50 2008 +0300 Dead code removal Remove a whole bunch of code that was never built, be it entire files or just dead ifdefs. --- nx-X11/programs/Xserver/os/connection.c | 4 ---- nx-X11/programs/Xserver/os/osdep.h | 3 --- nx-X11/programs/Xserver/os/osinit.c | 7 ------- nx-X11/programs/Xserver/os/utils.c | 15 --------------- 4 files changed, 29 deletions(-) diff --git a/nx-X11/programs/Xserver/os/connection.c b/nx-X11/programs/Xserver/os/connection.c index 4d30dd86f..78ce8e03f 100644 --- a/nx-X11/programs/Xserver/os/connection.c +++ b/nx-X11/programs/Xserver/os/connection.c @@ -111,11 +111,7 @@ SOFTWARE. #include #endif -#ifdef X_NOT_POSIX -#define Pid_t int -#else #define Pid_t pid_t -#endif int lastfdesc; /* maximum file descriptor */ diff --git a/nx-X11/programs/Xserver/os/osdep.h b/nx-X11/programs/Xserver/os/osdep.h index e106c5544..f2279dd6c 100644 --- a/nx-X11/programs/Xserver/os/osdep.h +++ b/nx-X11/programs/Xserver/os/osdep.h @@ -60,7 +60,6 @@ SOFTWARE. #include -#ifndef X_NOT_POSIX #ifdef _POSIX_SOURCE #include #else @@ -68,8 +67,6 @@ SOFTWARE. #include #undef _POSIX_SOURCE #endif -#else /* X_NOT_POSIX */ -#endif /* X_NOT_POSIX */ #ifndef OPEN_MAX #ifdef SVR4 diff --git a/nx-X11/programs/Xserver/os/osinit.c b/nx-X11/programs/Xserver/os/osinit.c index 367635f6c..0313a8990 100644 --- a/nx-X11/programs/Xserver/os/osinit.c +++ b/nx-X11/programs/Xserver/os/osinit.c @@ -138,15 +138,8 @@ OsInit(void) #endif } -#ifndef X_NOT_POSIX if (getpgrp () == 0) setpgid (0, 0); -#else -#if !defined(SYSV) - if (getpgrp (0) == 0) - setpgrp (0, getpid ()); -#endif -#endif #ifdef RLIMIT_DATA if (limitDataSpace >= 0) diff --git a/nx-X11/programs/Xserver/os/utils.c b/nx-X11/programs/Xserver/os/utils.c index da4e9fb40..d6a23375d 100644 --- a/nx-X11/programs/Xserver/os/utils.c +++ b/nx-X11/programs/Xserver/os/utils.c @@ -276,9 +276,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); @@ -289,7 +286,6 @@ OsSignal(sig, handler) if (sigaction(sig, &act, &oact)) perror("sigaction"); return oact.sa_handler; -#endif } #ifdef SERVER_LOCK @@ -474,13 +470,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; } @@ -497,10 +486,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; } -- cgit v1.2.3