diff options
Diffstat (limited to 'winsup/mingw/include/stdio.h')
-rw-r--r-- | winsup/mingw/include/stdio.h | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/winsup/mingw/include/stdio.h b/winsup/mingw/include/stdio.h index 65db38dedaf..7a09250fbb6 100644 --- a/winsup/mingw/include/stdio.h +++ b/winsup/mingw/include/stdio.h @@ -261,6 +261,19 @@ int fseek (FILE*, long, int); long ftell (FILE*); void rewind (FILE*); +#ifdef __USE_MINGW_FSEEK /* These are in libmingwex.a */ +/* + * Workaround for limitations on win9x where a file contents are + * not zero'd out if you seek past the end and then write. + */ + +int __mingw_fseek (FILE *, long, int); +int __mingw_fwrite (const void*, size_t, size_t, FILE*); +#define fseek(fp, offset, whence) __mingw_fseek(fp, offset, whence) +#define fwrite(buffer, size, count, fp) __mingw_fwrite(buffer, size, count, fp) +#endif /* __USE_MINGW_FSEEK */ + + /* * An opaque data type used for storing file positions... The contents of * this type are unknown, but we (the compiler) need to know the size |