Mail Archives: djgpp/2000/08/20/02:32:16
> From: the Icefalcon <kourino AT hotmail DOT com>
> Newsgroups: comp.os.msdos.djgpp
> Date: Sun, 20 Aug 2000 04:38:29 GMT
>
> Well, good ol' nvi source is perplexing me again. cl_read.c declares a
> few variables of type timeval (a struct in time.h). Now, these are
> originally defined as "struct timeval"s, which gives me the pretty
> little make error "storage size of 'poll' is unknown" (where 'poll' is
> the name of one of the timeval objects). Commenting out the "struct"
> in "struct timeval" gives me "'timeval' undeclared". So, I did a nice
> little file search for all files containing "timeval" and found that
> it was defined (surprise, surprise) in <time.h>. However, it's
> surrounded by some include guards - namely,
> #ifndef __dj_ENFORCE_ANSI_FREESTANDING, #ifndef __STRICT_ANSI__, and
> #ifndef _POSIX_SOURCE. Now, I actually am not sure when these are
> defined by default
They are *not* defined by default. Unless the compiler is invoked
with -ansi or -posix, or the sources define _POSIX_SOURCE (which they
shouldn't), these definitions are always visible.
> but just in case I commented out all three of those
> and their corresponding #endifs. The "timeval undeclared" error did
> NOT go away. So ... what's going on? @_@
Did you resurrect the "struct" in "struct timeval"? If not, this is
your problem.
If that doesn't help, you will have to dig deeper into this. I'm
guessing that the compiler doesn't see <time.h> due to some #ifdef or
another cpp trick.
If you cannot figure this out, try to throw together the shortest
source which #include's only standard headers and exhibits the error
message, and post it here together with the compilation command line
you are using.
- Raw text -