12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364 |
- #ifndef _TOOLKIT_UNIX_HEADER_H_
- #define _TOOLKIT_UNIX_HEADER_H_
- #ifndef _WIN32
- #include <sys/types.h>
- #include <sys/stat.h>
- #include <fcntl.h>
- #include <dirent.h>
- #include <sys/socket.h>
- #include <netinet/in.h>
- #include <netinet/tcp.h>
- #include <arpa/inet.h>
- #include <netdb.h> /* MAXHOSTNAMELEN on Solaris */
- #include <termios.h>
- #include <pwd.h>
- #if !defined(__MVS__)
- #include <semaphore.h>
- #include <sys/param.h> /* MAXHOSTNAMELEN on Linux and the BSDs */
- #endif
- #include <pthread.h>
- #include <signal.h>
- #ifdef __cplusplus
- extern "C" {
- #endif
- #include <pthread.h>
- #include <semaphore.h>
- typedef pthread_key_t toolkit_key_t;
- typedef pthread_t toolkit_thread_t;
- typedef pthread_mutex_t toolkit_mutex_t;
- typedef pthread_once_t toolkit_once_t;
- typedef pid_t toolkit_pid_t;
- #define TOOLKIT_ONCE_INIT PTHREAD_ONCE_INIT
- typedef struct {
- void* handle;
- char* errmsg;
- } toolkit_lib_t;
- typedef pthread_rwlock_t toolkit_rwlock_t;
- typedef sem_t toolkit_sem_t;
- typedef pthread_cond_t toolkit_cond_t;
- typedef pthread_barrier_t toolkit_barrier_t;
- #ifdef __cplusplus
- } // extern "C" {
- #endif
- #endif //NOT _WIN32
- #endif /** */
|