blob: dc26b934ae404d7f1a111c58a737959e77d1c670 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
|
--- src/file_buffer.h.orig Mon Aug 25 17:17:41 2003
+++ src/file_buffer.h Tue Apr 6 19:32:32 2004
@@ -51,6 +51,7 @@
#endif
#include <stdio.h> /* fopen, fread, fseek*, fclose */
+#include <sys/types.h>
/* figure out which fseek/ftell we need */
#undef FSEEK
@@ -70,6 +71,10 @@
/* figure out off_t formatting */
#undef OFF_T_FORMAT
#undef ATOL
+#if defined(__FreeBSD__)
+# define OFF_T_FORMAT "llu"
+# define ATOL(arg) strtoll(arg, NULL, 10)
+#else
#if _FILE_OFFSET_BITS==64
# define OFF_T_FORMAT "llu"
# define ATOL(arg) atoll(arg)
@@ -77,6 +82,7 @@
# warning "Not compiling for large file (>2G) support!"
# define OFF_T_FORMAT "lu"
# define ATOL(arg) atol(arg)
+#endif
#endif
#define DEFAULT_FILE_BUFFER_SIZE (1024*512)
|