autoconf AC_SYS_LARGEFILE
<hat mode="debian maintainer" package="dar">
Hello,
I am trying to get long file names to work in dar (uptodate
debian/unstable).
So far, I don't think I have had any success (at least I
don't see any evidence...).
I have traced it to the AC_SYS_LARGEFILE autoconf macro (autoconf 2.57),
it outputs the following in config.log:
---cut---
configure:19615: checking for special C compiler options needed for large files
configure:19695: result: no
configure:19701: checking for _FILE_OFFSET_BITS value needed for large files
configure:19733: i386-linux-g++ -c -g -O2 conftest.cc >&5
configure:19767: warning: left shift count >= width of type
configure:19767: warning: left shift count >= width of type
configure:19768: warning: left shift count >= width of type
configure:19768: warning: left shift count >= width of type
configure:19769: error: size of array `off_t_is_large' is negative
configure:19736: $? = 1
configure: failed program was:
| #line 19708 "configure"
| /* confdefs.h. */
|
| #define PACKAGE_NAME "DAR"
| #define PACKAGE_TARNAME "dar"
| #define PACKAGE_VERSION "2.0.1"
| #define PACKAGE_STRING "DAR 2.0.1"
| #define PACKAGE_BUGREPORT "http://sourceforge.net/tracker/?group_id=65612&atid=511612"
| #define DAR_VERSION "2.0.1"
| #define PACKAGE "dar"
| #define VERSION "2.0.1"
| #ifdef __cplusplus
| #include <stdlib.h>
| #endif
| #define STDC_HEADERS 1
| #define HAVE_SYS_TYPES_H 1
| #define HAVE_SYS_STAT_H 1
| #define HAVE_STDLIB_H 1
| #define HAVE_STRING_H 1
| #define HAVE_MEMORY_H 1
| #define HAVE_STRINGS_H 1
| #define HAVE_INTTYPES_H 1
| #define HAVE_STDINT_H 1
| #define HAVE_UNISTD_H 1
| #define HAVE_DLFCN_H 1
| #define HAVE_LIBZ 1
| #define HAVE_LIBBZ2 1
| #define HAVE_LIBDL 1
| #define HAVE_DIRENT_H 1
| #define STDC_HEADERS 1
| #define HAVE_SYS_WAIT_H 1
| #define HAVE_FCNTL_H 1
| #define HAVE_NETINET_IN_H 1
| #define HAVE_STDINT_H 1
| #define HAVE_STDLIB_H 1
| #define HAVE_STRING_H 1
| #define HAVE_SYS_IOCTL_H 1
| #define HAVE_SYS_SOCKET_H 1
| #define HAVE_TERMIOS_H 1
| #define HAVE_UNISTD_H 1
| #define HAVE_UTIME_H 1
| #define HAVE_SYS_TYPES_H 1
| #define HAVE_SIGNAL_H 1
| #define HAVE_ERRNO_H 1
| #define HAVE_SYS_UN_H 1
| #define HAVE_SYS_STAT_H 1
| #define HAVE_TIME_H 1
| #define HAVE_FNMATCH_H 1
| #define HAVE_REGEX_H 1
| #define HAVE_PWD_H 1
| #define HAVE_GRP_H 1
| #define HAVE_GETOPT_H 1
| #define HAVE_STDIO_H 1
| /* end confdefs.h. */
| #include <sys/types.h>
| /* Check that off_t can represent 2**63 - 1 correctly.
| We can't simply define LARGE_OFF_T to be 9223372036854775807,
| since some C++ compilers masquerading as C compilers
| incorrectly reject 9223372036854775807. */
| #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
| int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
| && LARGE_OFF_T % 2147483647 == 1)
| ? 1 : -1];
| int
| main ()
| {
|
| ;
| return 0;
| }
configure:19777: i386-linux-g++ -c -g -O2 conftest.cc >&5
configure:19811: warning: left shift count >= width of type
configure:19811: warning: left shift count >= width of type
configure:19812: warning: left shift count >= width of type
configure:19812: warning: left shift count >= width of type
configure:19813: error: size of array `off_t_is_large' is negative
configure:19780: $? = 1
configure: failed program was:
| #line 19751 "configure"
| /* confdefs.h. */
|
| #define PACKAGE_NAME "DAR"
| #define PACKAGE_TARNAME "dar"
| #define PACKAGE_VERSION "2.0.1"
| #define PACKAGE_STRING "DAR 2.0.1"
| #define PACKAGE_BUGREPORT "http://sourceforge.net/tracker/?group_id=65612&atid=511612"
| #define DAR_VERSION "2.0.1"
| #define PACKAGE "dar"
| #define VERSION "2.0.1"
| #ifdef __cplusplus
| #include <stdlib.h>
| #endif
| #define STDC_HEADERS 1
| #define HAVE_SYS_TYPES_H 1
| #define HAVE_SYS_STAT_H 1
| #define HAVE_STDLIB_H 1
| #define HAVE_STRING_H 1
| #define HAVE_MEMORY_H 1
| #define HAVE_STRINGS_H 1
| #define HAVE_INTTYPES_H 1
| #define HAVE_STDINT_H 1
| #define HAVE_UNISTD_H 1
| #define HAVE_DLFCN_H 1
| #define HAVE_LIBZ 1
| #define HAVE_LIBBZ2 1
| #define HAVE_LIBDL 1
| #define HAVE_DIRENT_H 1
| #define STDC_HEADERS 1
| #define HAVE_SYS_WAIT_H 1
| #define HAVE_FCNTL_H 1
| #define HAVE_NETINET_IN_H 1
| #define HAVE_STDINT_H 1
| #define HAVE_STDLIB_H 1
| #define HAVE_STRING_H 1
| #define HAVE_SYS_IOCTL_H 1
| #define HAVE_SYS_SOCKET_H 1
| #define HAVE_TERMIOS_H 1
| #define HAVE_UNISTD_H 1
| #define HAVE_UTIME_H 1
| #define HAVE_SYS_TYPES_H 1
| #define HAVE_SIGNAL_H 1
| #define HAVE_ERRNO_H 1
| #define HAVE_SYS_UN_H 1
| #define HAVE_SYS_STAT_H 1
| #define HAVE_TIME_H 1
| #define HAVE_FNMATCH_H 1
| #define HAVE_REGEX_H 1
| #define HAVE_PWD_H 1
| #define HAVE_GRP_H 1
| #define HAVE_GETOPT_H 1
| #define HAVE_STDIO_H 1
| /* end confdefs.h. */
| #define _FILE_OFFSET_BITS 64
| #include <sys/types.h>
| /* Check that off_t can represent 2**63 - 1 correctly.
| We can't simply define LARGE_OFF_T to be 9223372036854775807,
| since some C++ compilers masquerading as C compilers
| incorrectly reject 9223372036854775807. */
| #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
| int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
| && LARGE_OFF_T % 2147483647 == 1)
| ? 1 : -1];
| int
| main ()
| {
|
| ;
| return 0;
| }
configure:19798: result: no
configure:19808: checking for _LARGE_FILES value needed for large files
configure:19840: i386-linux-g++ -c -g -O2 conftest.cc >&5
configure:19874: warning: left shift count >= width of type
configure:19874: warning: left shift count >= width of type
configure:19875: warning: left shift count >= width of type
configure:19875: warning: left shift count >= width of type
configure:19876: error: size of array `off_t_is_large' is negative
configure:19843: $? = 1
configure: failed program was:
| #line 19815 "configure"
| /* confdefs.h. */
|
| #define PACKAGE_NAME "DAR"
| #define PACKAGE_TARNAME "dar"
| #define PACKAGE_VERSION "2.0.1"
| #define PACKAGE_STRING "DAR 2.0.1"
| #define PACKAGE_BUGREPORT "http://sourceforge.net/tracker/?group_id=65612&atid=511612"
| #define DAR_VERSION "2.0.1"
| #define PACKAGE "dar"
| #define VERSION "2.0.1"
| #ifdef __cplusplus
| #include <stdlib.h>
| #endif
| #define STDC_HEADERS 1
| #define HAVE_SYS_TYPES_H 1
| #define HAVE_SYS_STAT_H 1
| #define HAVE_STDLIB_H 1
| #define HAVE_STRING_H 1
| #define HAVE_MEMORY_H 1
| #define HAVE_STRINGS_H 1
| #define HAVE_INTTYPES_H 1
| #define HAVE_STDINT_H 1
| #define HAVE_UNISTD_H 1
| #define HAVE_DLFCN_H 1
| #define HAVE_LIBZ 1
| #define HAVE_LIBBZ2 1
| #define HAVE_LIBDL 1
| #define HAVE_DIRENT_H 1
| #define STDC_HEADERS 1
| #define HAVE_SYS_WAIT_H 1
| #define HAVE_FCNTL_H 1
| #define HAVE_NETINET_IN_H 1
| #define HAVE_STDINT_H 1
| #define HAVE_STDLIB_H 1
| #define HAVE_STRING_H 1
| #define HAVE_SYS_IOCTL_H 1
| #define HAVE_SYS_SOCKET_H 1
| #define HAVE_TERMIOS_H 1
| #define HAVE_UNISTD_H 1
| #define HAVE_UTIME_H 1
| #define HAVE_SYS_TYPES_H 1
| #define HAVE_SIGNAL_H 1
| #define HAVE_ERRNO_H 1
| #define HAVE_SYS_UN_H 1
| #define HAVE_SYS_STAT_H 1
| #define HAVE_TIME_H 1
| #define HAVE_FNMATCH_H 1
| #define HAVE_REGEX_H 1
| #define HAVE_PWD_H 1
| #define HAVE_GRP_H 1
| #define HAVE_GETOPT_H 1
| #define HAVE_STDIO_H 1
| /* end confdefs.h. */
| #include <sys/types.h>
| /* Check that off_t can represent 2**63 - 1 correctly.
| We can't simply define LARGE_OFF_T to be 9223372036854775807,
| since some C++ compilers masquerading as C compilers
| incorrectly reject 9223372036854775807. */
| #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
| int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
| && LARGE_OFF_T % 2147483647 == 1)
| ? 1 : -1];
| int
| main ()
| {
|
| ;
| return 0;
| }
configure:19884: i386-linux-g++ -c -g -O2 conftest.cc >&5
configure:19918: warning: left shift count >= width of type
configure:19918: warning: left shift count >= width of type
configure:19919: warning: left shift count >= width of type
configure:19919: warning: left shift count >= width of type
configure:19920: error: size of array `off_t_is_large' is negative
configure:19887: $? = 1
configure: failed program was:
| #line 19858 "configure"
| /* confdefs.h. */
|
| #define PACKAGE_NAME "DAR"
| #define PACKAGE_TARNAME "dar"
| #define PACKAGE_VERSION "2.0.1"
| #define PACKAGE_STRING "DAR 2.0.1"
| #define PACKAGE_BUGREPORT "http://sourceforge.net/tracker/?group_id=65612&atid=511612"
| #define DAR_VERSION "2.0.1"
| #define PACKAGE "dar"
| #define VERSION "2.0.1"
| #ifdef __cplusplus
| #include <stdlib.h>
| #endif
| #define STDC_HEADERS 1
| #define HAVE_SYS_TYPES_H 1
| #define HAVE_SYS_STAT_H 1
| #define HAVE_STDLIB_H 1
| #define HAVE_STRING_H 1
| #define HAVE_MEMORY_H 1
| #define HAVE_STRINGS_H 1
| #define HAVE_INTTYPES_H 1
| #define HAVE_STDINT_H 1
| #define HAVE_UNISTD_H 1
| #define HAVE_DLFCN_H 1
| #define HAVE_LIBZ 1
| #define HAVE_LIBBZ2 1
| #define HAVE_LIBDL 1
| #define HAVE_DIRENT_H 1
| #define STDC_HEADERS 1
| #define HAVE_SYS_WAIT_H 1
| #define HAVE_FCNTL_H 1
| #define HAVE_NETINET_IN_H 1
| #define HAVE_STDINT_H 1
| #define HAVE_STDLIB_H 1
| #define HAVE_STRING_H 1
| #define HAVE_SYS_IOCTL_H 1
| #define HAVE_SYS_SOCKET_H 1
| #define HAVE_TERMIOS_H 1
| #define HAVE_UNISTD_H 1
| #define HAVE_UTIME_H 1
| #define HAVE_SYS_TYPES_H 1
| #define HAVE_SIGNAL_H 1
| #define HAVE_ERRNO_H 1
| #define HAVE_SYS_UN_H 1
| #define HAVE_SYS_STAT_H 1
| #define HAVE_TIME_H 1
| #define HAVE_FNMATCH_H 1
| #define HAVE_REGEX_H 1
| #define HAVE_PWD_H 1
| #define HAVE_GRP_H 1
| #define HAVE_GETOPT_H 1
| #define HAVE_STDIO_H 1
| /* end confdefs.h. */
| #define _LARGE_FILES 1
| #include <sys/types.h>
| /* Check that off_t can represent 2**63 - 1 correctly.
| We can't simply define LARGE_OFF_T to be 9223372036854775807,
| since some C++ compilers masquerading as C compilers
| incorrectly reject 9223372036854775807. */
| #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
| int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
| && LARGE_OFF_T % 2147483647 == 1)
| ? 1 : -1];
| int
| main ()
| {
|
| ;
| return 0;
| }
configure:19905: result: no
---cut---
What is going on here? Any ideas?
Is this a result of a buggy AC_SYS_LARGEFILE macro???
Any workarounds?
</hat>
--
Brian May <bam@debian.org>
Reply to: