|
From: | James Gallagher |
Subject: | Re: [bug-gnulib] Re: no rpl_mktime in mktime.c |
Date: | Mon, 11 Jul 2005 17:59:16 -0600 |
One way to get the compilation to succeed was to remove the "#defined mktime rpl_mktime" from config.h.
One suggestion passed on to me by Patrice was to write a header like: #include <time.h> #ifdef HAVE_BROKEN_MKTIME #define mktime rpl_mktime #endifand include that in just the source files that use mktime. I found that to get this header to compile I had to add a declaration for rpl_mktime to the header. However, although this did solve the compilation problem (the #define was no longer in config.h since I modified the gl macro to remove it and define the HAVE_BROKEN_MKTIME symbol), there was a link-time failure to find the symbol mktime.
In the end I decided to not use mktime for time being, but if it would help I'll add it back in so I can send along the exact error message (which was something along the lines of 'mktime undefined').
Thanks for making gnulib available! James On Jul 11, 2005, at 5:05 PM, Paul Eggert wrote:
Bruno Haible <address@hidden> writes:- Which header files are included by the program, in which order?That I don't know, but it's pretty easy to see how the problem would arise by looking at the header (see the pattern below).- Which C++ header undefines mktime?On my Debian GNU/Linux 3.1 r0a host, it's /usr/include/c++/3.3/ctime. Its contents look like this: #ifndef _CPP_CTIME #define _CPP_CTIME 1 #pragma GCC system_header #include <cstddef> #include <time.h>// Get rid of those macros defined in <time.h> in lieu of real functions.#undef clock #undef difftime #undef mktime ... namespace std { using ::clock_t; using ::time_t; using ::tm; using ::clock; using ::difftime; using ::mktime; ... } #endif _______________________________________________ bug-gnulib mailing list address@hidden http://lists.gnu.org/mailman/listinfo/bug-gnulib
-- James Gallagher jgallagher at opendap.org OPeNDAP, Inc 406.723.8663
[Prev in Thread] | Current Thread | [Next in Thread] |