done
fi
+echo $ac_n "checking for large files""... $ac_c" 1>&6
+echo "configure:1686: checking for large files" >&5
+if test "$cross_compiling" = yes; then
+ bits=32
+else
+ cat > conftest.$ac_ext <<EOF
+#line 1691 "configure"
+#include "confdefs.h"
+#define _FILE_OFFSET_BITS 64
+#include <unistd.h>
+#include <string.h>
+#include <stdio.h>
+int main(int argc, char **argv)
+{
+ off_t o;
+ char tmp_str[32];
+ if (sizeof(off_t) == 8) {
+ o = 2000000000;
+ sprintf (tmp_str, "%Ld", o+o+o);
+ if (!strcmp (tmp_str, "6000000000"))
+ exit (0);
+ }
+ exit (1);
+}
+
+EOF
+if { (eval echo configure:1711: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+then
+ bits=64
+else
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -fr conftest*
+ bits=32
+fi
+rm -fr conftest*
+fi
+
+if test "$bits" = "64"; then
+ cat >> confdefs.h <<\EOF
+#define _FILE_OFFSET_BITS 64
+EOF
+
+ echo "$ac_t""yes" 1>&6
+else
+ echo "$ac_t""no" 1>&6
+fi
echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
-echo "configure:1686: checking for ANSI C header files" >&5
+echo "configure:1733: checking for ANSI C header files" >&5
if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 1691 "configure"
+#line 1738 "configure"
#include "confdefs.h"
#include <stdlib.h>
#include <stdarg.h>
#include <float.h>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:1699: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:1746: \"$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*
if test $ac_cv_header_stdc = yes; then
# SunOS 4.x string.h does not declare mem*, contrary to ANSI.
cat > conftest.$ac_ext <<EOF
-#line 1716 "configure"
+#line 1763 "configure"
#include "confdefs.h"
#include <string.h>
EOF
if test $ac_cv_header_stdc = yes; then
# ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
cat > conftest.$ac_ext <<EOF
-#line 1734 "configure"
+#line 1781 "configure"
#include "confdefs.h"
#include <stdlib.h>
EOF
:
else
cat > conftest.$ac_ext <<EOF
-#line 1755 "configure"
+#line 1802 "configure"
#include "confdefs.h"
#include <ctype.h>
#define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
exit (0); }
EOF
-if { (eval echo configure:1766: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:1813: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then
:
else
dnl Zebra, Index Data Aps, 1994-2000
-dnl $Id: configure.in,v 1.20 2000-05-02 11:26:13 adam Exp $
+dnl $Id: configure.in,v 1.21 2000-05-15 15:32:50 adam Exp $
dnl
AC_INIT(include/zebraver.h)
AC_MSG_CHECKING(for package)
if test "$ac_cv_lib_bz2_bzCompressInit" = "yes"; then
AC_CHECK_HEADERS(bzlib.h)
fi
+dnl ------- 64 bit files
+AC_MSG_CHECKING(for large files)
+AC_TRY_RUN([#define _FILE_OFFSET_BITS 64
+#include <unistd.h>
+#include <string.h>
+#include <stdio.h>
+int main(int argc, char **argv)
+{
+ off_t o;
+ char tmp_str[32];
+ if (sizeof(off_t) == 8) {
+ o = 2000000000;
+ sprintf (tmp_str, "%Ld", o+o+o);
+ if (!strcmp (tmp_str, "6000000000"))
+ exit (0);
+ }
+ exit (1);
+}
+],bits=64,bits=32,bits=32)
+if test "$bits" = "64"; then
+ AC_DEFINE(_FILE_OFFSET_BITS,64)
+ AC_MSG_RESULT(yes)
+else
+ AC_MSG_RESULT(no)
+fi
dnl
dnl ------ ANSI C Header files
AC_STDC_HEADERS
* Sebastian Hammer, Adam Dickmeiss
*
* $Log: marcread.c,v $
- * Revision 1.10 1999-11-30 13:48:04 adam
+ * Revision 1.11 2000-05-15 15:32:51 adam
+ * Added support for 64 bit input file support.
+ *
+ * Revision 1.10 1999/11/30 13:48:04 adam
* Improved installation. Updated for inclusion of YAZ header files.
*
* Revision 1.9 1999/06/25 13:47:25 adam
if (read_bytes == record_length - 4)
{
off_t cur_offset = (*p->tellf)(p->fh);
- assert (cur_offset > 26);
+ if (cur_offset <= 27)
+ return NULL;
if (p->endf)
(*p->endf)(p->fh, cur_offset - 1);
}