autoconf
[Top][All Lists]
Advanced

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

Re: gcc and gettimeofday on AIX


From: Rob Benton
Subject: Re: gcc and gettimeofday on AIX
Date: Tue, 04 May 2004 12:31:05 -0500
User-agent: Mozilla Thunderbird 0.5 (X11/20040306)

I think I may have figured it out. It's all those goofy flags. Correct me if I'm wrong though.



Rob Benton wrote:

For some reason this AIX machine I'm working on is reporting that there is no gettimeofday function. Here's the relevant part of config.log:


configure:5012: checking for gettimeofday
configure:5069: gcc -o conftest -g -O2 -q64   -q64 -brtl conftest.c  >&5
gcc: unrecognized option `-q64'
gcc: unrecognized option `-q64'
gcc: installation problem, cannot exec `cpp': No such file or directory
gcc: file path prefix `/opt/freeware/GNUPro/lib/gcc-lib/rtl/2.9-aix51-020209/' never used
configure:5075: $? = 1
configure: failed program was:
| /* confdefs.h.  */
|
| #ifdef __cplusplus
| extern "C" void exit (int);
| #endif
| #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 TIME_WITH_SYS_TIME 1
| #define _AIX_UNIX 1
| #define _MTC_UNIX 1
| /* end confdefs.h.  */
| /* Define gettimeofday to an innocuous variant, in case <limits.h> declares gettimeofday.
|    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
| #define gettimeofday innocuous_gettimeofday
|
| /* System header to define __stub macros and hopefully few prototypes,
|     which can conflict with char gettimeofday (); below.
|     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
|     <limits.h> exists even on freestanding compilers.  */
|
| #ifdef __STDC__
| # include <limits.h>
| #else
| # include <assert.h>
| #endif
|
| #undef gettimeofday
|
| /* Override any gcc2 internal prototype to avoid an error.  */
| #ifdef __cplusplus
| extern "C"
| {
| #endif
| /* We use char because int might match the return type of a gcc2
|    builtin and then its argument prototype would still apply.  */
| char gettimeofday ();
| /* The GNU C library defines this for functions which it implements
|     to always fail with ENOSYS.  Some functions are actually named
|     something starting with __ and the normal name is an alias.  */
| #if defined (__stub_gettimeofday) || defined (__stub___gettimeofday)
| choke me
| #else
| char (*f) () = gettimeofday;
| #endif
| #ifdef __cplusplus
| }
| #endif
|
| int
| main ()
| {
| return f != gettimeofday;
|   ;
|   return 0;
| }
configure:5099: result: no
configure:5104: error: gettimeofday function not found





gettimeofday is on this machine. I've taken that little sample program and compiled it and ran it with gcc, cc, and xlC_r and they all return 0. So I can't figure out why configure is encountering an error. Can anyone help me understand this?









reply via email to

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