www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1996/02/15/10:49:44

Date: Thu, 15 Feb 1996 10:39:00 -0500 (EST)
From: Frank Donahoe <fdonahoe AT wilkes1 DOT wilkes DOT edu>
To: Eli Zaretskii <eliz AT is DOT elta DOT co DOT il>
Cc: Djgpp <djgpp AT delorie DOT com>
Subject: Re: ioctl missing


On Thu, 15 Feb 1996, Eli Zaretskii wrote:

> 
> On Wed, 14 Feb 1996, Frank Donahoe wrote:
> 
> > I tried your suggestion of replacing the local config.h with <sys/config.h>
> > but the compilation of "ls" still fails unable to find "ioclt.h."  I have
> > a working 32-bit "ls.exe" compiled with DJGPP V2 to prove that it worked 
> > once.
> 
> It sometimes helps to look at the source which includes the missing file
> and do the obvious thing.  Look at ls.c, it needs <sys/ioctl.h> *only* if
> _POSIX_SOURCE isn't defined.  So how about defining _POSIX_SOURCE (add
> -D_POSIX_SOURCE to CPPFLAGS in the Makefile) and seeing what happens? 
> DJGPP v2.0 is POSIX-compliant and shouldn't have any problems compiling
> when this symbol is defined. 
> 
I have tried this by inserting -D_POSIX_SOURCE in CFLAGS.  There were other
problems,  the compilation of libfut.a failed after a series of nasty 
warnings and one fatal error.  What I have not tried is to use this flag
only for the compillation of ls.c.

Alexander V. Lukya's <lav AT video DOT yars DOT free DOT net> suggestion to simply erase
the offending line is Alexandrian in its directness.  It works, but leaves
me somehow uneasy.

Compiled this way, with -O2, the fourteen files come in at 860.5 Kb. 
This is an average of 2.5 Kb per file larger than the September compilation.
In the absence of a test suite, the best I can do is use them 'til problems
develop.  Regards, Frank.

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019