bug-gnulib
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: fseeko on Stratus VOS


From: Jay Levitt
Subject: Re: fseeko on Stratus VOS
Date: Sat, 17 Nov 2007 13:51:28 -0500
User-agent: Thunderbird 2.0.0.9 (Windows/20071031)

On 11/16/2007 10:38 PM, Bruno Haible wrote:
Jay Levitt wrote:
The top-level config.log says:

   configure:4830: checking for fseeko
   configure:4881: result: no
   ...
   gl_cv_func_fseeko=no
   GNULIB_FSEEKO='1'
   HAVE_FSEEKO='0'
   REPLACE_FSEEKO='1'

The generated config.h says:

   #define HAVE_FSEEKO 1

Hmm. So the "checking for fseeko" (from fseeko.m4 or fflush.m4) says that
fseeko is absent, but AC_FUNC_FSEEKO says that fseeko exists?!

Not exactly - I *think* the config.h line may originate in stdio_h.m4? I'm not very good with m4. I'm pretty sure AC_FUNC_FSEEKO is saying it doesn't exist; my gut tells me that HAVE_FSEEKO is being set later, now that we DO have (a fake) fseeko, so that other apps will think we have it - but that's absent any real knowledge of gnulib internals.

I turned on bash tracing, and I think it happens inside config.status, running sed scripts to generate config.h. I'm worse with sed than I am with m4. I'm trying to debug through the generated bash scripts, but as you know there's a lot of regeneration and meta-stuff going on, so I'm not having much luck (especially as I'm on bash 2.05, so no debugger).


Can you show
more details from config.log,
  - from the "checking for fseeko" check,

See [1a] and [1b] below, and [2] for the set -o xtrace version. Looks right to me.


  - from the "checking for _LARGEFILE_SOURCE value needed for large files" 
check?

See [3] below.  Looks right again.


And does your system have fseeko? (What do the includes files say? And the
manual pages?)

Nope! No fseeko or ftello. It does have off_t, and that's a long (32 bits). The underlying operating system does (now) support files up to 137GB, but it looks like that wasn't retrofitted to the POSIX support.

So now I'm confused, and I'm not sure exactly how it's *supposed* to work - I don't have another system that's missing fseeko.

rpl_fseeko is a wrapper around fseeko. On systems which don't have fseeko,
these lines in lib/fseeko.c take effect:

#if !HAVE_FSEEKO
# undef fseek
# define fseeko fseek
#endif

Sure, that part I get - I meant I'm not sure how the autoconf script is supposed to behave, and whether the meaning of "HAVE_FSEEKO" changes as we build gnulib.

Systems which don't have fseeko are OSF/1 4.0, Solaris 2.5.1, mingw. On at
least two of these, the gnulib fseeko module is known to work.

OK, I'll set up mingw. Is "mingw" for these purposes a raw MINGW environment bootstrapped from gcc, building all the prerequisite packages locally, or is it a MINGSYS environment? Or does it not matter?

Jay

----
Footnotes:

[1a] checking for fseeko: the config.log

configure:4830: checking for fseeko
configure:4857: gcc -o conftest.pm -g -O2 -D_POSIX_C_SOURCE=200112L -D_BSD_SOUR
+CE -D_XOPEN_SOURCE=600  conftest.c  >&5
bind: Undefined entry point: fseeko, first referenced by ccfa1jpo.

bind: Binding had warnings.
configure:4863: $? = 1
configure: failed program was:
| /* confdefs.h.  */
| #define PACKAGE_NAME "dummy"
| #define PACKAGE_TARNAME "dummy"
| #define PACKAGE_VERSION "0"
| #define PACKAGE_STRING "dummy 0"
| #define PACKAGE_BUGREPORT ""
| #define PACKAGE "dummy"
| #define VERSION "0"
| #define HAVE_INCLUDE_NEXT 1
| #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_STDIO_H 1
| #define HAVE_UNISTD_H 1
| /* end confdefs.h.  */
| #include <stdio.h>
| int
| main ()
| {
| fseeko (stdin, 0, 0);
|   ;
|   return 0;
| }
configure:4881: result: no

----

[1b] checking for fseeko: the gltests/config.log

configure:4730: checking for fseeko
configure:4781: result: no

(it's cached, and config.log won't show that)

----

[2] checking for fseeko: the xtrace output

+ [./configure:4830] echo 'configure:4830: checking for fseeko'
+ [./configure:4831] echo -n 'checking for fseeko... '
checking for fseeko... + [./configure:4832] test '' = set
+ [./configure:4836] cat
+ [./configure:4839] cat confdefs.h
+ [./configure:4840] cat
+ [./configure:4851] rm -f conftest.o conftest.pm
+ [./configure:4852] ac_try=$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS
+ conftest.$ac_ext $LIBS >&5
+ [./configure:4855] ac_try_echo=$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LD
+FLAGS conftest.$ac_ext $LIBS >&5
+ [./configure:4857] eval 'echo "$as_me:4857: $CC -o conftest$ac_exeext $CFLAGS
+$CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5"'
++ [./configure:1] echo 'configure:4857: gcc -o conftest.pm -g -O2 -D_POSIX_C_S
+OURCE=200112L -D_BSD_SOURCE -D_XOPEN_SOURCE=600  conftest.c  >&5'
+ [./configure:4859] ac_status=1
+ [./configure:4860] grep -v '^ *+' conftest.er1
+ [./configure:4861] rm -f conftest.er1
+ [./configure:4862] cat conftest.err
+ [./configure:4863] echo 'configure:4863: $? = 1'
+ [./configure:4864] exit 1
+ [./configure:4871] echo 'configure: failed program was:'
+ [./configure:4872] sed 's/^/| /' conftest.c
+ [./configure:4874] gl_cv_func_fseeko=no
+ [./configure:4877] rm -f core conftest.err conftest.o conftest_ipa8_conftest.o
+o conftest.pm conftest.c
+ [./configure:4881] echo 'configure:4881: result: no'
+ [./configure:4882] echo no
no
+ [./configure:4883] test no = no
+ [./configure:4884] HAVE_FSEEKO=0
+ [./configure:4893] gl_LIBOBJS= fseeko.o
+ [./configure:4896] REPLACE_FSEEKO=1
+ [./configure:4916] GNULIB_FSEEKO=1
 .... now down in gltests...
+ [./configure:4830] echo 'configure:4830: checking for fseeko'
+ [./configure:4831] echo -n 'checking for fseeko... '
checking for fseeko... + [./configure:4832] test '' = set
+ [./configure:4836] cat
+ [./configure:4839] cat confdefs.h
+ [./configure:4840] cat
+ [./configure:4851] rm -f conftest.o conftest.pm
+ [./configure:4852] ac_try=$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS
+ conftest.$ac_ext $LIBS >&5
+ [./configure:4855] ac_try_echo=$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LD
+FLAGS conftest.$ac_ext $LIBS >&5
+ [./configure:4857] eval 'echo "$as_me:4857: $CC -o conftest$ac_exeext $CFLAGS
+$CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5"'
++ [./configure:1] echo 'configure:4857: gcc -o conftest.pm -g -O2 -D_POSIX_C_S
+OURCE=200112L -D_BSD_SOURCE -D_XOPEN_SOURCE=600  conftest.c  >&5'
+ [./configure:4859] ac_status=1
+ [./configure:4860] grep -v '^ *+' conftest.er1
+ [./configure:4861] rm -f conftest.er1
+ [./configure:4862] cat conftest.err
+ [./configure:4863] echo 'configure:4863: $? = 1'
+ [./configure:4864] exit 1
+ [./configure:4871] echo 'configure: failed program was:'
+ [./configure:4872] sed 's/^/| /' conftest.c
+ [./configure:4874] gl_cv_func_fseeko=no
+ [./configure:4877] rm -f core conftest.err conftest.o conftest_ipa8_conftest.o
+o conftest.pm conftest.c
+ [./configure:4881] echo 'configure:4881: result: no'
+ [./configure:4882] echo no
no
+ [./configure:4883] test no = no
+ [./configure:4884] HAVE_FSEEKO=0
+ [./configure:4893] gl_LIBOBJS= fseeko.o
+ [./configure:4896] REPLACE_FSEEKO=1
+ [./configure:4916] GNULIB_FSEEKO=1

----

[3] checking for _LARGEFILE_SOURCE: config.log

configure:3683: checking for _LARGEFILE_SOURCE value needed for large files
configure:3710: gcc -o conftest.pm -g -O2 -D_POSIX_C_SOURCE=200112L -D_BSD_SOUR
+CE -D_XOPEN_SOURCE=600  conftest.c  >&5
bind: Undefined entry point: fseeko, first referenced by cckJmVAz.

bind: Binding had warnings.
configure:3716: $? = 1
configure: failed program was:
| /* confdefs.h.  */
| #define PACKAGE_NAME "dummy"
| #define PACKAGE_TARNAME "dummy"
| #define PACKAGE_VERSION "0"
| #define PACKAGE_STRING "dummy 0"
| #define PACKAGE_BUGREPORT ""
| #define PACKAGE "dummy"
| #define VERSION "0"
| /* end confdefs.h.  */
| #include <stdio.h>
| int
| main ()
| {
| return fseeko (stdin, 0, 0) && (fseeko) (stdin, 0, 0);
|   ;
|   return 0;
| }
configure:3754: gcc -o conftest.pm -g -O2 -D_POSIX_C_SOURCE=200112L -D_BSD_SOUR
+CE -D_XOPEN_SOURCE=600  conftest.c  >&5
bind: Undefined entry point: fseeko, first referenced by ccoCq7Wz.

bind: Binding had warnings.
configure:3760: $? = 1
configure: failed program was:
| /* confdefs.h.  */
| #define PACKAGE_NAME "dummy"
| #define PACKAGE_TARNAME "dummy"
| #define PACKAGE_VERSION "0"
| #define PACKAGE_STRING "dummy 0"
| #define PACKAGE_BUGREPORT ""
| #define PACKAGE "dummy"
| #define VERSION "0"
| /* end confdefs.h.  */
| #define _LARGEFILE_SOURCE 1
| #include <stdio.h>
| int
| main ()
| {
| return fseeko (stdin, 0, 0) && (fseeko) (stdin, 0, 0);
|   ;
|   return 0;
| }
configure:3780: result: unknown





reply via email to

[Prev in Thread] Current Thread [Next in Thread]