#include <windows.h>
#include <io.h>
-#ifdef _MSC_VER
-#define fstat(a,b) _fstat(a,b)
-#endif
+#define fstat(a,b) _fstati64(a,b)
+#define stat _stati64
#endif
if (st.st_size == 0)
{
file->length = 0;
- file->contents = "";
+ file->contents = NULL;
close (fd);
return file;
}
* Note that the contents may not be zero-terminated,
* even if the #GMappedFile is backed by a text file.
*
- * Returns: the contents of @file.
+ * If the file is empty then %NULL is returned.
+ *
+ * Returns: the contents of @file, or %NULL.
*
* Since: 2.8
*/