14 #if defined(unix) || defined(__unix) || defined (__unix__) 22 #ifndef HAVE_GETHOSTBYNAME_R 23 struct hostent *gethostbyname_r (
const char *name,
struct hostent
24 *result,
char *buffer,
int buflen,
29 char *
strtok_r(
char *s1,
char *s2,
char **lasts);
32 #if !defined(ETIMEDOUT) && defined(ETIME) 33 #define ETIMEDOUT ETIME 36 #if !defined(ETIME) && defined(ETIMEDOUT) 37 #define ETIME ETIMEDOUT 41 #define DIR_SEPARATOR "/" 50 #define INFINITE ULONG_MAX 53 #ifndef WaitForMultipleObjects 54 #define WaitForMultipleObjects(n, tid, b, f) \ 57 for (_i = 0; _i < n; _i++) { \ 59 pthread_join(tid[_i], NULL); \ 67 #define startupSocket() 72 #define closesocket close 76 #define FILE_SOCKET FILE 80 #define fdopen_socket(f, g) fdopen(f, g) 84 #define fclose_socket(f) fclose(f) 88 #define getc_socket(f) getc(f) 92 #define write_socket(r, s, l) write(r, s, l) 105 #include <winsock2.h> 107 #if (_MSC_VER > 1900) 112 # include <sys/timeb.h> 113 # include <sys/stat.h> 114 # include <process.h> 135 #define snprintf _snprintf 139 #define usleep(s) _sleep((s)/1000) 159 #define pclose _pclose 162 #ifndef _WIN32 // Conflicts with glib under windows 164 #define pipe(p) _pipe(p, 256, O_BINARY) 169 #define S_IRWXU S_IWRITE 173 #define waitpid(pid, status, act) _cwait(status, pid, act) 181 #define getpid _getpid 185 #define bcopy(s, t, n) memcpy(t, s, n) 193 #define PATH_MAX 1024 196 #ifndef DIR_SEPARATOR 197 #define DIR_SEPARATOR "\\" 201 #define VERSION "1.0" 205 #define SIGBUS SIGINT 209 #define SIGHUP SIGINT 213 #define SIGPIPE SIGINT 222 #ifndef HAVE_BOOLEAN_T 223 #define HAVE_BOOLEAN_T 232 typedef unsigned long u_long;
233 typedef unsigned int u_int;
234 typedef unsigned short u_short;
235 typedef unsigned char u_char;
237 typedef char * caddr_t;
238 typedef long fd_mask;
240 #define NFDBITS (sizeof(fd_mask) * NBBY) 242 #define howmany(x, y) (((x) + ((y) - 1)) / (y)) 259 typedef struct timespec {
270 #define SIGKILL SIGTERM 276 #ifndef startupSocket 277 #define startupSocket() {WSADATA wsaData; \ 278 if (WSAStartup(0x0101, &wsaData)) \ 279 printf("Could not open start up windows socket.\n"); } 283 #define FILE_SOCKET int 286 #ifndef fdopen_socket 287 #define fdopen_socket(f, g) &f 290 #ifndef fclose_socket 291 #define fclose_socket(f) closesocket(*f) 294 #ifndef gethostbyname_r 295 #define gethostbyname_r(h,a,b,c,d) gethostbyname(h) 298 extern int getc_socket(FILE_SOCKET *f);
299 extern ssize_t write_socket(
int fildes,
const void *buf,
size_t nbyte);
316 #error "Not Unix or WIN32 -- what system is this?" 321 #define REMOVE_PROXY 0
int uname(struct utsname *name)
char * strtok_r(char *s1, char *s2, char **lasts)
long uid_t
Definition: utilNT.h:33
uid_t gid_t
Definition: utilNT.h:34
long pid_t
Definition: utilNT.h:31