From: Ben Pfaff Date: Sat, 13 Oct 2007 04:40:06 +0000 (+0000) Subject: Use fseeko module from gnulib instead of our home-grown solution. X-Git-Tag: v0.6.0~219 X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=2e54150ae309202ad2f590c6253d0bbf625e5b5d;p=pspp-builds.git Use fseeko module from gnulib instead of our home-grown solution. Patch #6228. * flip.c (flip_file): No need to conditionally substitute for "fseeko" and "off_t" manually anymore, as gnulib takes care of it for us. * acinclude.m4: Delete PSPP_OFF_T macro. * configure.ac: Don't call AC_FUNC_FSEEKO or PSPP_OFF_T. --- diff --git a/ChangeLog b/ChangeLog index 7e1e8ea9..50a29eef 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,12 @@ +2007-10-12 Ben Pfaff + + Use fseeko module from gnulib instead of our home-grown solution. + Patch #6228. + + * acinclude.m4: Delete PSPP_OFF_T macro. + + * configure.ac: Don't call AC_FUNC_FSEEKO or PSPP_OFF_T. + 2007-10-12 Ben Pfaff * Smake: Add fprintf-posix, printf-posix, printf-safe, diff --git a/acinclude.m4 b/acinclude.m4 index c281995b..812f4d44 100644 --- a/acinclude.m4 +++ b/acinclude.m4 @@ -68,24 +68,6 @@ AC_DEFUN([PSPP_LIBPLOT], fi ]) -dnl Check that off_t is defined as an integer type. -dnl Solaris sometimes declares it as a struct, if it -dnl thinks that the compiler does not support `long long'. -AC_DEFUN([PSPP_OFF_T], -[ - AC_COMPILE_IFELSE([#include - #include - off_t x = 0; - int main (void) - { - lseek (0, 1, 2); - return 0; - }], [], [AC_MSG_ERROR( - [Your system's definition of off_t is broken. You are probably - using Solaris. You can probably fix the problem with - `--disable-largefile' or `CFLAGS=-ansi'.])]) -]) - dnl Check whether a C compiler option is accepted. dnl If so, add it to CFLAGS. dnl Example: PSPP_ENABLE_OPTION(-Wdeclaration-after-statement) diff --git a/configure.ac b/configure.ac index a85e57bd..d16c6f49 100644 --- a/configure.ac +++ b/configure.ac @@ -27,7 +27,6 @@ AM_GNU_GETTEXT_VERSION([0.16.1]) dnl Checks for libraries. AC_SYS_LARGEFILE -AC_FUNC_FSEEKO AC_CHECK_LIB(m, sin) PSPP_LIBPLOT PSPP_LC_PAPER @@ -54,8 +53,6 @@ if test x"$with_gui_tools" = x"yes" ; then fi AM_CONDITIONAL(WITH_GUI_TOOLS, test x"$with_gui_tools" = x"yes") -PSPP_OFF_T - AC_CHECK_LIB(gslcblas,main,,[PSPP_REQUIRED_PREREQ([libgslcblas])]) AC_CHECK_LIB(gsl, gsl_cdf_chisq_Q,,[PSPP_REQUIRED_PREREQ([libgsl (version 1.4 or later)])]) diff --git a/src/language/stats/ChangeLog b/src/language/stats/ChangeLog index 21e27f18..146640f3 100644 --- a/src/language/stats/ChangeLog +++ b/src/language/stats/ChangeLog @@ -1,3 +1,9 @@ +2007-10-12 Ben Pfaff + + * flip.c (flip_file): No need to conditionally substitute for + "fseeko" and "off_t" manually anymore, as gnulib takes care of it + for us. + 2007-09-21 Jason Stover * regression.q (run_regression): Partial fix of memory leak, bug diff --git a/src/language/stats/flip.c b/src/language/stats/flip.c index 2bcd1e4b..3fe43eb9 100644 --- a/src/language/stats/flip.c +++ b/src/language/stats/flip.c @@ -423,14 +423,6 @@ flip_file (struct flip_pgm *flip) for (j = 0; j < read_cases; j++) output_buf[j] = input_buf[i + j * flip->var_cnt]; -#ifndef HAVE_FSEEKO -#define fseeko fseek -#endif - -#ifndef HAVE_OFF_T -#define off_t long int -#endif - if (fseeko (output_file, sizeof *input_buf * (case_idx + (off_t) i * flip->case_cnt),