File indexing completed on 2025-01-18 10:14:34
0001
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012
0013
0014
0015
0016
0017
0018
0019
0020
0021
0022
0023
0024
0025
0026
0027
0028
0029
0030
0031
0032
0033 #ifndef _XOS_H_
0034 # define _XOS_H_
0035
0036 # include <X11/Xosdefs.h>
0037
0038
0039
0040
0041
0042 # include <sys/types.h>
0043
0044 # if defined(__SCO__) || defined(__UNIXWARE__)
0045 # include <stdint.h>
0046 # endif
0047
0048
0049
0050
0051
0052
0053
0054
0055
0056
0057
0058
0059
0060
0061
0062 # include <string.h>
0063 # if defined(__SCO__) || defined(__UNIXWARE__) || defined(__sun) || defined(__CYGWIN__) || defined(_AIX) || defined(__APPLE__)
0064 # include <strings.h>
0065 # else
0066 # ifndef index
0067 # define index(s,c) (strchr((s),(c)))
0068 # endif
0069 # ifndef rindex
0070 # define rindex(s,c) (strrchr((s),(c)))
0071 # endif
0072 # endif
0073
0074
0075
0076
0077 # if defined(X_NOT_POSIX)
0078 # include <fcntl.h>
0079 # if defined(USL) || defined(__i386__) && (defined(SYSV) || defined(SVR4))
0080 # include <unistd.h>
0081 # endif
0082 # ifdef WIN32
0083 # include <X11/Xw32defs.h>
0084 # else
0085 # include <sys/file.h>
0086 # endif
0087 # else
0088 # include <fcntl.h>
0089 # include <unistd.h>
0090 # endif
0091
0092
0093
0094
0095
0096 # if defined(_POSIX_SOURCE) && defined(SVR4)
0097
0098 # undef _POSIX_SOURCE
0099 # include <sys/time.h>
0100 # define _POSIX_SOURCE
0101 # elif defined(WIN32)
0102 # include <time.h>
0103 # if !defined(_WINSOCKAPI_) && !defined(_WILLWINSOCK_) && !defined(_TIMEVAL_DEFINED) && !defined(_STRUCT_TIMEVAL)
0104 struct timeval {
0105 long tv_sec;
0106 long tv_usec;
0107 };
0108 # define _TIMEVAL_DEFINED
0109 # endif
0110 # include <sys/timeb.h>
0111 # define gettimeofday(t) \
0112 { \
0113 struct _timeb _gtodtmp; \
0114 _ftime (&_gtodtmp); \
0115 (t)->tv_sec = _gtodtmp.time; \
0116 (t)->tv_usec = _gtodtmp.millitm * 1000; \
0117 }
0118 # else
0119 # include <sys/time.h>
0120 # include <time.h>
0121 # endif
0122
0123
0124 # if defined(_XOPEN_XPG4) || defined(_XOPEN_UNIX)
0125 # define X_GETTIMEOFDAY(t) gettimeofday(t, (struct timezone*)0)
0126 # else
0127 # if defined(SVR4) || defined(__SVR4) || defined(WIN32)
0128 # define X_GETTIMEOFDAY(t) gettimeofday(t)
0129 # else
0130 # define X_GETTIMEOFDAY(t) gettimeofday(t, (struct timezone*)0)
0131 # endif
0132 # endif
0133
0134
0135 # ifdef __GNU__
0136 # define PATH_MAX 4096
0137 # define MAXPATHLEN 4096
0138 # define OPEN_MAX 256
0139 # endif
0140
0141
0142 # if defined(X_NOT_POSIX) && defined(SYSV) && !defined(SIGCHLD)
0143 # define SIGCHLD SIGCLD
0144 # endif
0145
0146 # include <X11/Xarch.h>
0147
0148 #endif