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)
|
#if defined (VMS)
|
||||||
return fopen (file, mode, "ALQ=32", "DEQ=4096",
|
return fopen (file, mode, "ALQ=32", "DEQ=4096",
|
||||||
"MBF=6", "MBC=127", "FOP=cbt,tef", "ROP=rah,wbh", "CTX=stm");
|
"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);
|
return fopen64 (file, mode);
|
||||||
#else
|
#else
|
||||||
return fopen (file, mode);
|
return fopen (file, mode);
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#if !defined (DONT_DO_LARGEFILE)
|
||||||
/* 64b VMS */
|
/* 64b VMS */
|
||||||
|
|
||||||
#if ((defined (__ALPHA) || defined (__ia64)) && defined (VMS) && (__DECC_VER >= 60590001)) || \
|
#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 /* end Apple OS/X */
|
||||||
|
#endif /* !DONT_DO_LARGEFILE */
|
||||||
|
|
||||||
/* Default: no OS-specific routine has been defined */
|
/* 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)
|
#define fxwrite(a,b,c,d) sim_fwrite (a, b, c, d)
|
||||||
|
|
||||||
int32 sim_finit (void);
|
int32 sim_finit (void);
|
||||||
#if defined (__linux) || defined (__linux__) || defined (__hpux) || \
|
#if (defined (__linux) || defined (__linux__) || defined (__hpux) || \
|
||||||
(defined (VMS) && (defined (__ALPHA) || defined (__ia64)) && (__DECC_VER >= 60590001)) || \
|
(defined (VMS) && (defined (__ALPHA) || defined (__ia64)) && (__DECC_VER >= 60590001)) || \
|
||||||
((defined(__sun) || defined(__sun__)) && defined(_LARGEFILE_SOURCE)) || \
|
((defined(__sun) || defined(__sun__)) && defined(_LARGEFILE_SOURCE)) || \
|
||||||
defined (_WIN32) || defined (__APPLE__) || defined (__FreeBSD__) || defined(__NetBSD__) || defined (__OpenBSD__)
|
defined (_WIN32) || defined (__APPLE__) || \
|
||||||
|
defined (__FreeBSD__) || defined(__NetBSD__) || defined (__OpenBSD__)) && !defined (DONT_DO_LARGEFILE)
|
||||||
typedef t_int64 t_offset;
|
typedef t_int64 t_offset;
|
||||||
#else
|
#else
|
||||||
typedef int32 t_offset;
|
typedef int32 t_offset;
|
||||||
|
#if !defined (DONT_DO_LARGEFILE)
|
||||||
|
#define DONT_DO_LARGEFILE 1
|
||||||
|
#endif
|
||||||
#endif
|
#endif
|
||||||
FILE *sim_fopen (const char *file, const char *mode);
|
FILE *sim_fopen (const char *file, const char *mode);
|
||||||
int sim_fseek (FILE *st, t_addr offset, int whence);
|
int sim_fseek (FILE *st, t_addr offset, int whence);
|
||||||
|
|
Loading…
Add table
Reference in a new issue