compat_unix.h 1.0 KB

123456789101112131415161718192021222324252627282930313233343536
  1. /*
  2. * Copyright (c) 2004-2007 Sergey Lyubka <valenok@gmail.com>
  3. * All rights reserved
  4. *
  5. * "THE BEER-WARE LICENSE" (Revision 42):
  6. * Sergey Lyubka wrote this file. As long as you retain this notice you
  7. * can do whatever you want with this stuff. If we meet some day, and you think
  8. * this stuff is worth it, you can buy me a beer in return.
  9. */
  10. #include <sys/wait.h>
  11. #include <sys/socket.h>
  12. #include <sys/select.h>
  13. #include <sys/mman.h>
  14. #include <netinet/in.h>
  15. #include <arpa/inet.h>
  16. #include <sys/time.h>
  17. #include <pwd.h>
  18. #include <unistd.h>
  19. #include <dirent.h>
  20. #include <dlfcn.h>
  21. #if !defined(NO_THREADS)
  22. #include "pthread.h"
  23. #define _beginthread(a, b, c) do { pthread_t tid; \
  24. pthread_create(&tid, NULL, (void *(*)(void *))a, c); } while (0)
  25. #endif /* !NO_THREADS */
  26. //#define SSL_LIB "/usr/lib/x86_64-linux-gnu/libssl.so.1.0.0"
  27. #define SSL_LIB "/lib/libssl.so.1.0.0"
  28. #define DIRSEP '/'
  29. #define IS_DIRSEP_CHAR(c) ((c) == '/')
  30. #define O_BINARY 0
  31. #define closesocket(a) close(a)
  32. #define ERRNO errno