On Tue, Aug 06, 2002 at 10:01:56PM +0000, Mikhael Goikhman wrote: > On 05 Aug 2002 11:36:37 -0500, FVWM CVS wrote: > > > > Added files: > > libs : ftime.h > > > > Log message: > > * Added detection for time.h vs sys/time.h headers. > > I am not sure why you did this.
For several reasons. First, inclusion of sys/time.h was not properly protected with "#ifdef HAVE_SYS_TIME_H". The autoconf documentation doesn't explicitly state that this is necessary, but if it's not I wonder why it's mentioned at all. Second, the autoconf info page states: - Macro: AC_HEADER_TIME If a program may include both `time.h' and `sys/time.h', define `TIME_WITH_SYS_TIME'. On some older systems, `sys/time.h' includes `time.h', but `time.h' is not protected against multiple inclusion, so programs should not explicitly include both files. Some of our source files did include both, time.h and sys/time.h. Third, I wanted to remove the need to remember this necessities by moving the #includes for both headers into a new header ftime.h that encapsulates the necessary logic. For those files that just included time.h, including ftime.h may do more than necessary but also including sys/time.h. Apart from that, your problem is simply a bug in the configure.in script. I forgot to call AC_CHECK_HEADERS(sys/time.h), so sys/time.h gets never included on some systems. > With my glibc-2.2.5, time.h and > sys/time.h are two different things although sys/time.h includes some > portion of time.h, but not all. > > So after this commit modules/FvwmTaskBar/Goodies,c fails to compile and > modules/FvwmWharf/FvwmWharf.c produces a warning (implicit declaration of > function `time'). Adding #include <time.h> in both solves the problem. Hm, that's funny. I'd have expected that with the bug in configure.in only time.h would have been included, not sys/time.h. Is it possible that the order in which the files are included is important? And which autoconf version do you have? What messages about the time headers do you get in configure? Bye Dominik ^_^ ^_^ -- Dominik Vogt, [EMAIL PROTECTED] Reply-To: [EMAIL PROTECTED] -- Visit the official FVWM web page at <URL:http://www.fvwm.org/>. To unsubscribe from the list, send "unsubscribe fvwm-workers" in the body of a message to [EMAIL PROTECTED] To report problems, send mail to [EMAIL PROTECTED]