On Sun, Jan 27, 2002 at 02:09:02AM +0000, kevin lyda wrote:
> someone else made the perl comment.
Sorry Kev - it was late at night.
>> > The question of why sys/time.h is not including time.h remains open.
>> generally i assume that foo.h includes sys/foo.h if they're related
> and i look for header files in /usr/include for functions in section 3
> (aka libc); in /usr/include/sys for functions in section 2 (system calls).
I didn't make any assumptions - I RTFIF. Skipping comments, on the SuSE 6.4
box /usr/include/sys/time.h begins like this
#ifndef _SYS_TIME_H
#define _SYS_TIME_H 1
#include <features.h>
#include <time.h>
and on the SuSE 7.3 box it begins like this
#ifndef _SYS_TIME_H
#define _SYS_TIME_H 1
#include <features.h>
#include <bits/types.h>
#define __need_time_t
#include <time.h>
and as the first line in the program is
#include <sys/time.h>
there's no way that _SYS_TIME_H is already defined so time.h should be
included, and cc -E seems to show that it is and yet the definition of a
struct tm seems to be missing.
Niall
Maintained by the ILUG website team. The aim of Linux.ie is to
support and help commercial and private users of Linux in Ireland. You can
display ILUG news in your own webpages, read backend
information to find out how. Networking services kindly provided by HEAnet, server kindly donated by
Dell. Linux is a trademark of Linus Torvalds,
used with permission. No penguins were harmed in the production or maintenance
of this highly praised website. Looking for the
Indian Linux Users' Group? Try here. If you've read all this and aren't a lawyer: you should be!