summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorwtc%netscape.com <devnull@localhost>2001-06-27 03:00:34 +0000
committerwtc%netscape.com <devnull@localhost>2001-06-27 03:00:34 +0000
commit98288b9cb6e8382a4cdcd7c6afa4f1012e046c9a (patch)
tree796adaf2ab67a94304190fd6d663335c0cdfc657
parent98537b79f5e9550f8406ade103e0b996d0788d11 (diff)
downloadnspr-hg-98288b9cb6e8382a4cdcd7c6afa4f1012e046c9a.tar.gz
Bugzilla bug 84361: added large file support for Linux.
Modified files: configure configure.in _linux.h Removed an unnecessary undefine of _FILE_OFFSET_BITS in solaris.c.
-rwxr-xr-xconfigure46
-rw-r--r--configure.in1
-rw-r--r--pr/include/md/_linux.h2
-rw-r--r--pr/src/md/unix/solaris.c2
4 files changed, 28 insertions, 23 deletions
diff --git a/configure b/configure
index b626c6e3..ae36ac3e 100755
--- a/configure
+++ b/configure
@@ -3488,6 +3488,10 @@ EOF
EOF
cat >> confdefs.h <<\EOF
+#define _LARGEFILE64_SOURCE 1
+EOF
+
+ cat >> confdefs.h <<\EOF
#define HAVE_FCNTL_FILE_LOCKING 1
EOF
@@ -4005,17 +4009,17 @@ EOF
ac_safe=`echo "machine/builtins.h" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for machine/builtins.h""... $ac_c" 1>&6
-echo "configure:4009: checking for machine/builtins.h" >&5
+echo "configure:4013: checking for machine/builtins.h" >&5
if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 4014 "configure"
+#line 4018 "configure"
#include "confdefs.h"
#include <machine/builtins.h>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:4019: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:4023: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
rm -rf conftest*
@@ -4557,12 +4561,12 @@ esac
if test -z "$SKIP_LIBRARY_CHECKS"; then
echo $ac_n "checking for dlopen""... $ac_c" 1>&6
-echo "configure:4561: checking for dlopen" >&5
+echo "configure:4565: checking for dlopen" >&5
if eval "test \"`echo '$''{'ac_cv_func_dlopen'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 4566 "configure"
+#line 4570 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char dlopen(); below. */
@@ -4585,7 +4589,7 @@ dlopen();
; return 0; }
EOF
-if { (eval echo configure:4589: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:4593: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_func_dlopen=yes"
else
@@ -4604,7 +4608,7 @@ else
echo "$ac_t""no" 1>&6
echo $ac_n "checking for dlopen in -ldl""... $ac_c" 1>&6
-echo "configure:4608: checking for dlopen in -ldl" >&5
+echo "configure:4612: checking for dlopen in -ldl" >&5
ac_lib_var=`echo dl'_'dlopen | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
@@ -4612,7 +4616,7 @@ else
ac_save_LIBS="$LIBS"
LIBS="-ldl $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 4616 "configure"
+#line 4620 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
@@ -4623,7 +4627,7 @@ int main() {
dlopen()
; return 0; }
EOF
-if { (eval echo configure:4627: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:4631: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes"
else
@@ -4651,13 +4655,13 @@ fi
if test $ac_cv_prog_gcc = yes; then
echo $ac_n "checking whether ${CC-cc} needs -traditional""... $ac_c" 1>&6
-echo "configure:4655: checking whether ${CC-cc} needs -traditional" >&5
+echo "configure:4659: checking whether ${CC-cc} needs -traditional" >&5
if eval "test \"`echo '$''{'ac_cv_prog_gcc_traditional'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
ac_pattern="Autoconf.*'x'"
cat > conftest.$ac_ext <<EOF
-#line 4661 "configure"
+#line 4665 "configure"
#include "confdefs.h"
#include <sgtty.h>
Autoconf TIOCGETP
@@ -4675,7 +4679,7 @@ rm -f conftest*
if test $ac_cv_prog_gcc_traditional = no; then
cat > conftest.$ac_ext <<EOF
-#line 4679 "configure"
+#line 4683 "configure"
#include "confdefs.h"
#include <termio.h>
Autoconf TCGETA
@@ -4699,12 +4703,12 @@ fi
for ac_func in lchown strerror
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:4703: checking for $ac_func" >&5
+echo "configure:4707: checking for $ac_func" >&5
if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 4708 "configure"
+#line 4712 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func(); below. */
@@ -4727,7 +4731,7 @@ $ac_func();
; return 0; }
EOF
-if { (eval echo configure:4731: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:4735: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_func_$ac_func=yes"
else
@@ -4758,7 +4762,7 @@ done
echo $ac_n "checking for pthread_create in -lpthreads""... $ac_c" 1>&6
-echo "configure:4762: checking for pthread_create in -lpthreads" >&5
+echo "configure:4766: checking for pthread_create in -lpthreads" >&5
echo "
#include <pthread.h>
void *foo(void *v) { int a = 1; }
@@ -4780,7 +4784,7 @@ echo "
echo "$ac_t""no" 1>&6
echo $ac_n "checking for pthread_create in -lpthread""... $ac_c" 1>&6
-echo "configure:4784: checking for pthread_create in -lpthread" >&5
+echo "configure:4788: checking for pthread_create in -lpthread" >&5
echo "
#include <pthread.h>
void *foo(void *v) { int a = 1; }
@@ -4802,7 +4806,7 @@ echo "
echo "$ac_t""no" 1>&6
echo $ac_n "checking for pthread_create in -lc_r""... $ac_c" 1>&6
-echo "configure:4806: checking for pthread_create in -lc_r" >&5
+echo "configure:4810: checking for pthread_create in -lc_r" >&5
echo "
#include <pthread.h>
void *foo(void *v) { int a = 1; }
@@ -4824,7 +4828,7 @@ echo "
echo "$ac_t""no" 1>&6
echo $ac_n "checking for pthread_create in -lc""... $ac_c" 1>&6
-echo "configure:4828: checking for pthread_create in -lc" >&5
+echo "configure:4832: checking for pthread_create in -lc" >&5
echo "
#include <pthread.h>
void *foo(void *v) { int a = 1; }
@@ -4974,7 +4978,7 @@ if test -n "$USE_PTHREADS"; then
rm -f conftest*
ac_cv_have_dash_pthread=no
echo $ac_n "checking whether ${CC-cc} accepts -pthread""... $ac_c" 1>&6
-echo "configure:4978: checking whether ${CC-cc} accepts -pthread" >&5
+echo "configure:4982: checking whether ${CC-cc} accepts -pthread" >&5
echo 'int main() { return 0; }' | cat > conftest.c
${CC-cc} -pthread -o conftest conftest.c > conftest.out 2>&1
if test $? -eq 0; then
@@ -4990,7 +4994,7 @@ echo "configure:4978: checking whether ${CC-cc} accepts -pthread" >&5
ac_cv_have_dash_pthreads=no
if test "$ac_cv_have_dash_pthread" = "no"; then
echo $ac_n "checking whether ${CC-cc} accepts -pthreads""... $ac_c" 1>&6
-echo "configure:4994: checking whether ${CC-cc} accepts -pthreads" >&5
+echo "configure:4998: checking whether ${CC-cc} accepts -pthreads" >&5
echo 'int main() { return 0; }' | cat > conftest.c
${CC-cc} -pthreads -o conftest conftest.c > conftest.out 2>&1
if test $? -eq 0; then
diff --git a/configure.in b/configure.in
index d57e8053..bca56119 100644
--- a/configure.in
+++ b/configure.in
@@ -1036,6 +1036,7 @@ case "$target" in
AC_DEFINE(_POSIX_SOURCE)
AC_DEFINE(_BSD_SOURCE)
AC_DEFINE(_SVID_SOURCE)
+ AC_DEFINE(_LARGEFILE64_SOURCE)
AC_DEFINE(HAVE_FCNTL_FILE_LOCKING)
AC_DEFINE(LINUX)
AC_DEFINE(linux)
diff --git a/pr/include/md/_linux.h b/pr/include/md/_linux.h
index f53a4a5c..86ea248c 100644
--- a/pr/include/md/_linux.h
+++ b/pr/include/md/_linux.h
@@ -111,6 +111,8 @@ extern PRInt32 _PR_ia64_AtomicSet(PRInt32 *val, PRInt32 newval);
#define _PR_STAT_HAS_ONLY_ST_ATIME
#if defined(__alpha) || defined(__ia64__)
#define _PR_HAVE_LARGE_OFF_T
+#elif (__GLIBC__ > 2) || (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1)
+#define _PR_HAVE_OFF64_T
#else
#define _PR_NO_LARGE_FILES
#endif
diff --git a/pr/src/md/unix/solaris.c b/pr/src/md/unix/solaris.c
index 86f990b3..4dd1c06e 100644
--- a/pr/src/md/unix/solaris.c
+++ b/pr/src/md/unix/solaris.c
@@ -32,8 +32,6 @@
* GPL.
*/
-#undef _FILE_OFFSET_BITS
-
#include "primpl.h"