summaryrefslogtreecommitdiffstats
path: root/unix
diff options
context:
space:
mode:
authorjan.nijtmans <nijtmans@users.sourceforge.net>2023-07-21 07:11:25 (GMT)
committerjan.nijtmans <nijtmans@users.sourceforge.net>2023-07-21 07:11:25 (GMT)
commita22f4cc1673d6d079ba1d411750383b258a3b709 (patch)
treea44702c989d8472076e5e3c07751d587e2b182a2 /unix
parentd357339eb67817c442c43201bd0399b63356faea (diff)
downloadtcl-a22f4cc1673d6d079ba1d411750383b258a3b709.zip
tcl-a22f4cc1673d6d079ba1d411750383b258a3b709.tar.gz
tcl-a22f4cc1673d6d079ba1d411750383b258a3b709.tar.bz2
Check for _LARGEFILE64_SOURCE after _FILE_OFFSET_BITS=64, since the latter is prefered
Diffstat (limited to 'unix')
-rwxr-xr-xunix/configure40
-rw-r--r--unix/tcl.m46
2 files changed, 23 insertions, 23 deletions
diff --git a/unix/configure b/unix/configure
index 44265f2..66af4ce 100755
--- a/unix/configure
+++ b/unix/configure
@@ -7492,7 +7492,7 @@ printf "%s\n" "#define _ISOC99_SOURCE 1" >>confdefs.h
fi
- if test ${tcl_cv_flag__largefile64_source+y}
+ if test ${tcl_cv_flag__file_offset_bits+y}
then :
printf %s "(cached) " >&6
else $as_nop
@@ -7502,47 +7502,47 @@ else $as_nop
int
main (void)
{
-struct stat64 buf; int i = stat64("/", &buf);
+switch (0) { case 0: case (sizeof(off_t)==sizeof(long long)): ; }
;
return 0;
}
_ACEOF
if ac_fn_c_try_compile "$LINENO"
then :
- tcl_cv_flag__largefile64_source=no
+ tcl_cv_flag__file_offset_bits=no
else $as_nop
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
-#define _LARGEFILE64_SOURCE 1
+#define _FILE_OFFSET_BITS 64
#include <sys/stat.h>
int
main (void)
{
-struct stat64 buf; int i = stat64("/", &buf);
+switch (0) { case 0: case (sizeof(off_t)==sizeof(long long)): ; }
;
return 0;
}
_ACEOF
if ac_fn_c_try_compile "$LINENO"
then :
- tcl_cv_flag__largefile64_source=yes
+ tcl_cv_flag__file_offset_bits=yes
else $as_nop
- tcl_cv_flag__largefile64_source=no
+ tcl_cv_flag__file_offset_bits=no
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
fi
- if test "x${tcl_cv_flag__largefile64_source}" = "xyes" ; then
+ if test "x${tcl_cv_flag__file_offset_bits}" = "xyes" ; then
-printf "%s\n" "#define _LARGEFILE64_SOURCE 1" >>confdefs.h
+printf "%s\n" "#define _FILE_OFFSET_BITS 64" >>confdefs.h
- tcl_flags="$tcl_flags _LARGEFILE64_SOURCE"
+ tcl_flags="$tcl_flags _FILE_OFFSET_BITS"
fi
- if test ${tcl_cv_flag__file_offset_bits+y}
+ if test ${tcl_cv_flag__largefile64_source+y}
then :
printf %s "(cached) " >&6
else $as_nop
@@ -7552,43 +7552,43 @@ else $as_nop
int
main (void)
{
-switch (0) { case 0: case (sizeof(off_t)==sizeof(long long)): ; }
+struct stat64 buf; int i = stat64("/", &buf);
;
return 0;
}
_ACEOF
if ac_fn_c_try_compile "$LINENO"
then :
- tcl_cv_flag__file_offset_bits=no
+ tcl_cv_flag__largefile64_source=no
else $as_nop
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
-#define _FILE_OFFSET_BITS 64
+#define _LARGEFILE64_SOURCE 1
#include <sys/stat.h>
int
main (void)
{
-switch (0) { case 0: case (sizeof(off_t)==sizeof(long long)): ; }
+struct stat64 buf; int i = stat64("/", &buf);
;
return 0;
}
_ACEOF
if ac_fn_c_try_compile "$LINENO"
then :
- tcl_cv_flag__file_offset_bits=yes
+ tcl_cv_flag__largefile64_source=yes
else $as_nop
- tcl_cv_flag__file_offset_bits=no
+ tcl_cv_flag__largefile64_source=no
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
fi
- if test "x${tcl_cv_flag__file_offset_bits}" = "xyes" ; then
+ if test "x${tcl_cv_flag__largefile64_source}" = "xyes" ; then
-printf "%s\n" "#define _FILE_OFFSET_BITS 64" >>confdefs.h
+printf "%s\n" "#define _LARGEFILE64_SOURCE 1" >>confdefs.h
- tcl_flags="$tcl_flags _FILE_OFFSET_BITS"
+ tcl_flags="$tcl_flags _LARGEFILE64_SOURCE"
fi
if test "x${tcl_flags}" = "x" ; then
diff --git a/unix/tcl.m4 b/unix/tcl.m4
index 98581e8..beaac7e 100644
--- a/unix/tcl.m4
+++ b/unix/tcl.m4
@@ -2294,8 +2294,8 @@ AC_DEFUN([SC_TCL_LINK_LIBS], [
#
# Might define the following vars:
# _ISOC99_SOURCE
-# _LARGEFILE64_SOURCE
# _FILE_OFFSET_BITS
+# _LARGEFILE64_SOURCE
#
#--------------------------------------------------------------------
@@ -2317,10 +2317,10 @@ AC_DEFUN([SC_TCL_EARLY_FLAGS],[
tcl_flags=""
SC_TCL_EARLY_FLAG(_ISOC99_SOURCE,[#include <stdlib.h>],
[char *p = (char *)strtoll; char *q = (char *)strtoull;])
- SC_TCL_EARLY_FLAG(_LARGEFILE64_SOURCE,[#include <sys/stat.h>],
- [struct stat64 buf; int i = stat64("/", &buf);])
SC_TCL_EARLY_FLAG(_FILE_OFFSET_BITS,[#include <sys/stat.h>],
[switch (0) { case 0: case (sizeof(off_t)==sizeof(long long)): ; }],64)
+ SC_TCL_EARLY_FLAG(_LARGEFILE64_SOURCE,[#include <sys/stat.h>],
+ [struct stat64 buf; int i = stat64("/", &buf);])
if test "x${tcl_flags}" = "x" ; then
AC_MSG_RESULT([none])
else