diff options
Diffstat (limited to 'nx-X11/programs/Xserver')
-rw-r--r-- | nx-X11/programs/Xserver/os/access.c | 12 | ||||
-rw-r--r-- | nx-X11/programs/Xserver/os/io.c | 2 | ||||
-rw-r--r-- | nx-X11/programs/Xserver/os/osinit.c | 5 | ||||
-rw-r--r-- | nx-X11/programs/Xserver/os/utils.c | 49 |
4 files changed, 6 insertions, 62 deletions
diff --git a/nx-X11/programs/Xserver/os/access.c b/nx-X11/programs/Xserver/os/access.c index 9497d84a7..f5c2d661d 100644 --- a/nx-X11/programs/Xserver/os/access.c +++ b/nx-X11/programs/Xserver/os/access.c @@ -80,9 +80,9 @@ SOFTWARE. #include <sys/ioctl.h> #include <ctype.h> -#if defined(TCPCONN) || defined(__SCO__) +#if defined(TCPCONN) #include <netinet/in.h> -#endif /* TCPCONN || __SCO__ */ +#endif /* TCPCONN */ #ifdef HAS_GETPEERUCRED # include <ucred.h> @@ -91,10 +91,10 @@ SOFTWARE. # endif #endif -#if defined(SVR4) || (defined(SYSV) && defined(i386)) || defined(__GNU__) +#if defined(SVR4) || (defined(SYSV) && defined(__i386__)) || defined(__GNU__) # include <sys/utsname.h> #endif -#if defined(SYSV) && defined(i386) +#if defined(SYSV) && defined(__i386__) # include <sys/stream.h> #endif #ifdef __GNU__ @@ -154,10 +154,6 @@ SOFTWARE. #endif #endif -#ifdef __SCO__ -/* The system defined value is wrong. MAXPATHLEN is set in sco5.cf. */ -#undef PATH_MAX -#endif #define X_INCLUDE_NETDB_H #include <nx-X11/Xos_r.h> diff --git a/nx-X11/programs/Xserver/os/io.c b/nx-X11/programs/Xserver/os/io.c index 02a47f135..847352c64 100644 --- a/nx-X11/programs/Xserver/os/io.c +++ b/nx-X11/programs/Xserver/os/io.c @@ -358,7 +358,7 @@ ReadRequestFromClient(ClientPtr client) { if ((result < 0) && ETEST(errno)) { -#if defined(SVR4) && defined(i386) && !defined(sun) +#if defined(SVR4) && defined(__i386__) && !defined(sun) if (0) #endif { diff --git a/nx-X11/programs/Xserver/os/osinit.c b/nx-X11/programs/Xserver/os/osinit.c index a660337ca..269225568 100644 --- a/nx-X11/programs/Xserver/os/osinit.c +++ b/nx-X11/programs/Xserver/os/osinit.c @@ -65,9 +65,6 @@ SOFTWARE. #endif #endif -#if defined(__SCO__) -#include <sys/wait.h> -#endif #if !defined(SYSV) && !defined(WIN32) #include <sys/resource.h> @@ -104,7 +101,7 @@ OsInit(void) InitNotifyFds(); -#if !defined(__SCO__) && !defined(__CYGWIN__) && !defined(__UNIXWARE__) +#if !defined(__CYGWIN__) && !defined(__UNIXWARE__) fclose(stdin); fclose(stdout); #endif diff --git a/nx-X11/programs/Xserver/os/utils.c b/nx-X11/programs/Xserver/os/utils.c index f9b06de2d..f7bce64ae 100644 --- a/nx-X11/programs/Xserver/os/utils.c +++ b/nx-X11/programs/Xserver/os/utils.c @@ -2232,52 +2232,3 @@ CheckUserAuthorization(void) #endif } -#ifdef __SCO__ -#include <fcntl.h> - -static void -lockit (int fd, short what) -{ - struct flock lck; - - lck.l_whence = 0; - lck.l_start = 0; - lck.l_len = 1; - lck.l_type = what; - - (void)fcntl (fd, F_SETLKW, &lck); -} - -/* SCO OpenServer 5 lacks pread/pwrite. Emulate them. */ -ssize_t -pread (int fd, void *buf, size_t nbytes, off_t offset) -{ - off_t saved; - ssize_t ret; - - lockit (fd, F_RDLCK); - saved = lseek (fd, 0, SEEK_CUR); - lseek (fd, offset, SEEK_SET); - ret = read (fd, buf, nbytes); - lseek (fd, saved, SEEK_SET); - lockit (fd, F_UNLCK); - - return ret; -} - -ssize_t -pwrite (int fd, const void *buf, size_t nbytes, off_t offset) -{ - off_t saved; - ssize_t ret; - - lockit (fd, F_WRLCK); - saved = lseek (fd, 0, SEEK_CUR); - lseek (fd, offset, SEEK_SET); - ret = write (fd, buf, nbytes); - lseek (fd, saved, SEEK_SET); - lockit (fd, F_UNLCK); - - return ret; -} -#endif /* __SCO__ */ |