diff options
Diffstat (limited to 'os/utils.c')
-rw-r--r-- | os/utils.c | 26 |
1 files changed, 4 insertions, 22 deletions
diff --git a/os/utils.c b/os/utils.c index dd5acd34b..3bb7dbeba 100644 --- a/os/utils.c +++ b/os/utils.c @@ -297,9 +297,7 @@ OsSignal(sig, handler) * server at a time. This keeps the servers from stomping on each other * if the user forgets to give them different display numbers. */ -#ifndef __UNIXOS2__ #define LOCK_DIR "/tmp" -#endif #define LOCK_TMP_PREFIX "/.tX" #define LOCK_PREFIX "/.X" #define LOCK_SUFFIX "-lock" @@ -309,10 +307,6 @@ OsSignal(sig, handler) #include <sys/param.h> #endif -#ifdef __UNIXOS2__ -#define link rename -#endif - #ifndef PATH_MAX #ifndef Lynx #include <sys/param.h> @@ -351,14 +345,7 @@ LockServer(void) /* * Path names */ -#ifndef __UNIXOS2__ tmppath = LOCK_DIR; -#else - /* OS/2 uses TMP directory, must also prepare for 8.3 names */ - tmppath = getenv("TMP"); - if (!tmppath) - FatalError("No TMP dir found\n"); -#endif sprintf(port, "%d", atoi(display)); len = strlen(LOCK_PREFIX) > strlen(LOCK_TMP_PREFIX) ? strlen(LOCK_PREFIX) : @@ -399,13 +386,11 @@ 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 __UNIXOS2__ #ifndef USE_CHMOD (void) fchmod(lfd, 0444); #else (void) chmod(tmp, 0444); #endif -#endif (void) close(lfd); /* @@ -484,9 +469,6 @@ UnlockServer(void) if (!StillLocking){ -#ifdef __UNIXOS2__ - (void) chmod(LockFile,S_IREAD|S_IWRITE); -#endif /* __UNIXOS2__ */ (void) unlink(LockFile); } } @@ -914,7 +896,7 @@ ProcessCommandLine(int argc, char *argv[]) #ifdef SERVER_LOCK else if ( strcmp ( argv[i], "-nolock") == 0) { -#if !defined(WIN32) && !defined(__UNIXOS2__) && !defined(__CYGWIN__) +#if !defined(WIN32) && !defined(__CYGWIN__) if (getuid() != 0) ErrorF("Warning: the -nolock option can only be used by root\n"); else @@ -1246,7 +1228,7 @@ ExpandCommandLine(int *pargc, char ***pargv) { int i; -#if !defined(WIN32) && !defined(__UNIXOS2__) && !defined(__CYGWIN__) +#if !defined(WIN32) && !defined(__CYGWIN__) if (getuid() != geteuid()) return; #endif @@ -1677,7 +1659,7 @@ OsReleaseSignals (void) #endif } -#if !defined(WIN32) && !defined(__UNIXOS2__) +#if !defined(WIN32) /* * "safer" versions of system(3), popen(3) and pclose(3) which give up * all privs before running a command. @@ -1952,7 +1934,7 @@ Fclose(pointer iop) #endif } -#endif /* !WIN32 && !__UNIXOS2__ */ +#endif /* !WIN32 */ /* |