Hi!
openbox-2.2.3 (a C++ program) includes a test for strftime:
AC_CHECK_FUNCS(getpid setlocale sigaction strftime ...)
This results in configure-test code as attached.
It gets compiled with a command line similar to
c++ -O2 foo.c -o foo
and with gcc-3.3.1 it fails (at least on NetBSD) with:
foo.c:63: error: nonnull argument with out-of-range operand number (arg 1,
operand 3)
strftime is defined in time.h as
size_t strftime __P((char * __restrict, size_t, const char * __restrict,
const struct tm * __restrict));
Any ideas on how to fix this?
Thomas
--
Thomas Klausner - [EMAIL PROTECTED]
What is wanted is not the will to believe, but the will to find
out, which is the exact opposite. -- Bertrand Russell
/* confdefs.h. */
#define PACKAGE_NAME ""
#define PACKAGE_TARNAME ""
#define PACKAGE_VERSION ""
#define PACKAGE_STRING ""
#define PACKAGE_BUGREPORT ""
#ifdef __cplusplus
#include <stdlib.h>
#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 HAVE_CTYPE_H 1
#define HAVE_DIRENT_H 1
#define HAVE_FCNTL_H 1
#define HAVE_LIBGEN_H 1
#define HAVE_LOCALE_H 1
#define HAVE_NL_TYPES_H 1
#define HAVE_SIGNAL_H 1
#define HAVE_STDARG_H 1
#define HAVE_STDIO_H 1
#define HAVE_STRING_H 1
#define HAVE_STDLIB_H 1
#define HAVE_TIME_H 1
#define HAVE_UNISTD_H 1
#define HAVE_SYS_PARAM_H 1
#define HAVE_SYS_SELECT_H 1
#define HAVE_SYS_SIGNAL_H 1
#define HAVE_SYS_STAT_H 1
#define HAVE_SYS_TIME_H 1
#define HAVE_SYS_TYPES_H 1
#define HAVE_SYS_WAIT_H 1
#define TIME_WITH_SYS_TIME 1
#define HAVE_BASENAME 1
#define HAVE_GETPID 1
#define HAVE_SETLOCALE 1
#define HAVE_SIGACTION 1
/* end confdefs.h. */
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char strftime (); 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
/* 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 strftime ();
/* 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_strftime) || defined (__stub___strftime)
choke me
#else
char (*f) () = strftime;
#endif
#ifdef __cplusplus
}
#endif
int
main ()
{
return f != strftime;
;
return 0;
}