sysdep1.h 1.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071
  1. #ifndef SYSDEP_H_INCLUDED
  2. #define SYSDEP_H_INCLUDED
  3. #undef USE_LARGEFILE
  4. #ifndef NO_LONG_LONG
  5. #ifdef __sun__
  6. #define USE_LARGEFILE
  7. #define OFF_T off64_t
  8. #endif
  9. #ifdef __linux__
  10. #define USE_LARGEFILE
  11. #define OFF_T off64_t
  12. #endif
  13. #ifdef _AIX43
  14. #define _LARGE_FILES
  15. #define _LARGE_FILE_API
  16. #define USE_LARGEFILE
  17. #endif /*_AIX43*/
  18. #ifdef __hpux
  19. #define _FILE64
  20. #define _LARGEFILE64_SOURCE
  21. #define USE_LARGEFILE
  22. #endif /*__hpux*/
  23. #ifdef __sgi
  24. #define USE_LARGEFILE
  25. #endif /*__sgi*/
  26. #ifdef __FreeBSD__
  27. #define OFF_T off_t
  28. #define FSEEK fseeko
  29. #define FTELL ftello
  30. #endif
  31. #ifdef __ANDROID__
  32. #undef USE_LARGEFILE
  33. #define OFF_T off64_t
  34. #endif
  35. #ifdef USE_LARGEFILE
  36. #ifndef OFF_T
  37. #define OFF_T off64_t
  38. #endif
  39. #define _LARGEFILE_SOURCE
  40. #define _LARGEFILE64_SOURCE
  41. #include <sys/types.h>
  42. #include <sys/stat.h>
  43. #define FOPEN fopen64
  44. #define FREOPEN freopen64
  45. #define FSEEK fseeko64
  46. #define FSTAT fstat64
  47. #define FTELL ftello64
  48. #define FTRUNCATE ftruncate64
  49. #define STAT stat64
  50. #define STAT_ST stat64
  51. #endif /*USE_LARGEFILE*/
  52. #endif /*NO_LONG_LONG*/
  53. #ifndef NON_UNIX_STDIO
  54. #ifndef USE_LARGEFILE
  55. #define _INCLUDE_POSIX_SOURCE /* for HP-UX */
  56. #define _INCLUDE_XOPEN_SOURCE /* for HP-UX */
  57. #include "sys/types.h"
  58. #include "sys/stat.h"
  59. #endif
  60. #endif
  61. #endif /*SYSDEP_H_INCLUDED*/