sysdep1.h 1.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566
  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 USE_LARGEFILE
  32. #ifndef OFF_T
  33. #define OFF_T off64_t
  34. #endif
  35. #define _LARGEFILE_SOURCE
  36. #define _LARGEFILE64_SOURCE
  37. #include <sys/types.h>
  38. #include <sys/stat.h>
  39. #define FOPEN fopen64
  40. #define FREOPEN freopen64
  41. #define FSEEK fseeko64
  42. #define FSTAT fstat64
  43. #define FTELL ftello64
  44. #define FTRUNCATE ftruncate64
  45. #define STAT stat64
  46. #define STAT_ST stat64
  47. #endif /*USE_LARGEFILE*/
  48. #endif /*NO_LONG_LONG*/
  49. #ifndef NON_UNIX_STDIO
  50. #ifndef USE_LARGEFILE
  51. #define _INCLUDE_POSIX_SOURCE /* for HP-UX */
  52. #define _INCLUDE_XOPEN_SOURCE /* for HP-UX */
  53. #include "ctype.h"
  54. //#include "sys/stat.h"
  55. #endif
  56. #endif
  57. #endif /*SYSDEP_H_INCLUDED*/