Date: Sun, 20 Aug 2000 09:34:35 +0200 From: "Eli Zaretskii" Sender: halo1 AT zahav DOT net DOT il To: kourino AT hotmail DOT com Message-Id: <1659-Sun20Aug2000093435+0300-eliz@is.elta.co.il> X-Mailer: Emacs 20.6 (via feedmail 8.2.emacs20_6 I) and Blat ver 1.8.5b CC: djgpp AT delorie DOT com In-reply-to: <399F6256.A728FB53@hotmail.com> (message from the Icefalcon on Sun, 20 Aug 2000 04:38:29 GMT) Subject: Re: timeval @_@ References: <399F6256 DOT A728FB53 AT hotmail DOT com> Reply-To: djgpp AT delorie DOT com Errors-To: nobody AT delorie DOT com X-Mailing-List: djgpp AT delorie DOT com X-Unsubscribes-To: listserv AT delorie DOT com Precedence: bulk > From: the Icefalcon > 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 . 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 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.