/*********************************************************/ /* Autori: */ /* Pelosi Giovanni, 346787, pelosi */ /* Pesce Agatino, 456868, pesce */ /* */ /* Progetto: Sistemi 2: biblioteca */ /* Data Pr.: 9/2/96 */ /* File: system.h */ /* */ /*********************************************************/ #ifndef _SYSTEM_H #define _SYSTEM_H #ifdef _Windows #define STRICT #include <io.h> #include <winsock.h> #ifndef FIOSNBIO #define FIOSNBIO 0 #endif #ifndef EWOULDBLOCK #define EWOULDBLOCK 0 #endif #ifndef FD_MAX #define FD_MAX FD_SETSIZE #endif #ifndef FDS #define FDS( a ) ( a ) #endif #define LOC_HOST "LOCALHOST" #ifndef SIGPIPE #define SIGPIPE SIGINT #endif #endif #ifdef _LINUS_D_ #include <linux/types.h> #include <linux/time.h> #include <fcntl.h> #include <sys/socket.h> #include <netdb.h> #include <linux/in.h> #include <sys/socket.h> #include <sys/types.h> #include <sys/time.h> #include <unistd.h> #ifndef FD_MAX #define FD_MAX FD_SETSIZE #endif #ifndef FDS #define FDS( a ) ( a ) #endif #define ERROR -1 #define LOC_HOST "LOCALHOST" #endif #ifdef sinix #undef _POSIX_SOURCE #undef _XOPEN_SOURCE #include <sys/time.h> #include <sys/types.h> #include <sys/socket.h> #include <netinet/in.h> #include <fcntl.h> #include <unistd.h> #include <netdb.h> #ifndef ERROR #define ERROR -1 #endif #ifndef FD_MAX #define FD_MAX FD_SETSIZE #endif #ifndef INADDR_NONE #define INADDR_NONE ERROR #endif #ifndef FDS #define FDS( a ) ( a ) #endif #endif #ifdef __HPUX_D__ #include <sys/time.h> #include <sys/types.h> #include <sys/socket.h> #include <netinet/in.h> #include <fcntl.h> #include <unistd.h> #include <netdb.h> #ifndef ERROR #define ERROR -1 #endif #ifndef FD_MAX #define FD_MAX FD_SETSIZE #endif #ifndef FDS #define FDS( a ) ( (int*) a ) #endif #ifndef LOC_HOST #define LOC_HOST "192.1.1.93" #endif #endif #endif