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