Provide a way to avoid building with large file support enabled via the compile time define of DONT_DO_LARGEFILE
This commit is contained in:
parent
cddc3f82a6
commit
958ce00b2e
2 changed files with 11 additions and 5 deletions
|
@ -224,13 +224,14 @@ FILE *sim_fopen (const char *file, const char *mode)
|
|||
#if defined (VMS)
|
||||
return fopen (file, mode, "ALQ=32", "DEQ=4096",
|
||||
"MBF=6", "MBC=127", "FOP=cbt,tef", "ROP=rah,wbh", "CTX=stm");
|
||||
#elif defined (__linux) || defined (__linux__) || defined (__hpux)
|
||||
#elif (defined (__linux) || defined (__linux__) || defined (__hpux)) && !defined (DONT_DO_LARGEFILE)
|
||||
return fopen64 (file, mode);
|
||||
#else
|
||||
return fopen (file, mode);
|
||||
#endif
|
||||
}
|
||||
|
||||
#if !defined (DONT_DO_LARGEFILE)
|
||||
/* 64b VMS */
|
||||
|
||||
#if ((defined (__ALPHA) || defined (__ia64)) && defined (VMS) && (__DECC_VER >= 60590001)) || \
|
||||
|
@ -341,6 +342,7 @@ return (t_offset)(ftello (st));
|
|||
}
|
||||
|
||||
#endif /* end Apple OS/X */
|
||||
#endif /* !DONT_DO_LARGEFILE */
|
||||
|
||||
/* Default: no OS-specific routine has been defined */
|
||||
|
||||
|
|
12
sim_fio.h
12
sim_fio.h
|
@ -38,13 +38,17 @@
|
|||
#define fxwrite(a,b,c,d) sim_fwrite (a, b, c, d)
|
||||
|
||||
int32 sim_finit (void);
|
||||
#if defined (__linux) || defined (__linux__) || defined (__hpux) || \
|
||||
(defined (VMS) && (defined (__ALPHA) || defined (__ia64)) && (__DECC_VER >= 60590001)) || \
|
||||
((defined(__sun) || defined(__sun__)) && defined(_LARGEFILE_SOURCE)) || \
|
||||
defined (_WIN32) || defined (__APPLE__) || defined (__FreeBSD__) || defined(__NetBSD__) || defined (__OpenBSD__)
|
||||
#if (defined (__linux) || defined (__linux__) || defined (__hpux) || \
|
||||
(defined (VMS) && (defined (__ALPHA) || defined (__ia64)) && (__DECC_VER >= 60590001)) || \
|
||||
((defined(__sun) || defined(__sun__)) && defined(_LARGEFILE_SOURCE)) || \
|
||||
defined (_WIN32) || defined (__APPLE__) || \
|
||||
defined (__FreeBSD__) || defined(__NetBSD__) || defined (__OpenBSD__)) && !defined (DONT_DO_LARGEFILE)
|
||||
typedef t_int64 t_offset;
|
||||
#else
|
||||
typedef int32 t_offset;
|
||||
#if !defined (DONT_DO_LARGEFILE)
|
||||
#define DONT_DO_LARGEFILE 1
|
||||
#endif
|
||||
#endif
|
||||
FILE *sim_fopen (const char *file, const char *mode);
|
||||
int sim_fseek (FILE *st, t_addr offset, int whence);
|
||||
|
|
Loading…
Add table
Reference in a new issue