... | ... |
@@ -18746,7 +18746,6 @@ else |
18746 | 18746 |
|
18747 | 18747 |
#define _LARGEFILE_SOURCE |
18748 | 18748 |
#define _LARGEFILE64_SOURCE |
18749 |
-#define _FILE_OFFSET_BITS 64 |
|
18750 | 18749 |
#include <stdio.h> |
18751 | 18750 |
#include <sys/types.h> |
18752 | 18751 |
#include <sys/stat.h> |
... | ... |
@@ -18777,7 +18776,7 @@ if test "$enable_stat64" != "no"; then |
18777 | 18777 |
|
18778 | 18778 |
$as_echo "#define HAVE_STAT64 1" >>confdefs.h |
18779 | 18779 |
|
18780 |
-CFLAGS="$CFLAGS -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64" |
|
18780 |
+CFLAGS="$CFLAGS -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE" |
|
18781 | 18781 |
fi |
18782 | 18782 |
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_stat64" >&5 |
18783 | 18783 |
$as_echo "$enable_stat64" >&6; } |
... | ... |
@@ -1495,7 +1495,6 @@ AC_MSG_CHECKING([stat64]) |
1495 | 1495 |
AC_TRY_RUN([ |
1496 | 1496 |
#define _LARGEFILE_SOURCE |
1497 | 1497 |
#define _LARGEFILE64_SOURCE |
1498 |
-#define _FILE_OFFSET_BITS 64 |
|
1499 | 1498 |
#include <stdio.h> |
1500 | 1499 |
#include <sys/types.h> |
1501 | 1500 |
#include <sys/stat.h> |
... | ... |
@@ -1518,7 +1517,7 @@ int main(void) { |
1518 | 1518 |
|
1519 | 1519 |
if test "$enable_stat64" != "no"; then |
1520 | 1520 |
AC_DEFINE([HAVE_STAT64],1,[enable stat64]) |
1521 |
-CFLAGS="$CFLAGS -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64" |
|
1521 |
+CFLAGS="$CFLAGS -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE" |
|
1522 | 1522 |
fi |
1523 | 1523 |
AC_MSG_RESULT([$enable_stat64]) |
1524 | 1524 |
|
... | ... |
@@ -587,8 +587,8 @@ EXTRA_DIST = c++/Makefile.nollvm.in $(am__append_4) regex/engine.c \ |
587 | 587 |
@ENABLE_UNRAR_TRUE@IFACEDEP = libclamunrar_iface.la |
588 | 588 |
libclamav_internal_utils_la_SOURCES = str.c\ |
589 | 589 |
str.h\ |
590 |
- iowrap.c\ |
|
591 |
- iowrap.h\ |
|
590 |
+ iowrap.c \ |
|
591 |
+ iowrap.h \ |
|
592 | 592 |
md5.c\ |
593 | 593 |
md5.h\ |
594 | 594 |
others_common.c \ |
... | ... |
@@ -609,8 +609,8 @@ libclamav_internal_utils_la_LDFLAGS = -static |
609 | 609 |
libclamav_internal_utils_la_CFLAGS = $(AM_CFLAGS) -fPIC -DPIC |
610 | 610 |
libclamav_internal_utils_nothreads_la_SOURCES = str.c\ |
611 | 611 |
str.h\ |
612 |
- iowrap.c\ |
|
613 |
- iowrap.h\ |
|
612 |
+ iowrap.c \ |
|
613 |
+ iowrap.h \ |
|
614 | 614 |
md5.c\ |
615 | 615 |
md5.h\ |
616 | 616 |
others_common.c \ |
... | ... |
@@ -32,13 +32,17 @@ |
32 | 32 |
#define STAT stat64 |
33 | 33 |
#define LSTAT lstat64 |
34 | 34 |
#define FSTAT fstat64 |
35 |
- |
|
35 |
+#define safe_open(a, b) open(a, b|O_LARGEFILE) |
|
36 | 36 |
#else |
37 | 37 |
|
38 | 38 |
#define STATBUF struct stat |
39 | 39 |
#define STAT stat |
40 | 40 |
#define LSTAT lstat |
41 | 41 |
#define FSTAT fstat |
42 |
+/* Nothing is safe in windows, not even open, safe_open defined under /win32 */ |
|
43 |
+#ifndef _WIN32 |
|
44 |
+#define safe_open open |
|
45 |
+#endif |
|
42 | 46 |
|
43 | 47 |
#endif |
44 | 48 |
|
... | ... |
@@ -38,8 +38,6 @@ typedef unsigned int in_addr_t; |
38 | 38 |
#define CONFDIR_FRESHCLAM CONFDIR PATHSEP "freshclam.conf" |
39 | 39 |
#define CONFDIR_MILTER CONFDIR PATHSEP "clamav-milter.conf" |
40 | 40 |
|
41 |
-/* Nothing is safe in windows, not even open */ |
|
42 |
-#define safe_open open |
|
43 | 41 |
#define cli_to_utf8_maybe_alloc(x) (x) |
44 | 42 |
#define cli_strdup_to_utf8(x) strdup(x) |
45 | 43 |
#ifndef WORDS_BIGENDIAN |