This is the mail archive of the libc-alpha@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: include sys/param.h in getcwd.c


On Tuesday 01 August 2006 03:19, Ulrich Drepper wrote:
> Mike Frysinger wrote:
> > the recent change to use MAX(getpagesize()) in the linux getcwd.c assumes
> > that the header files it includes already will eventually pull in
> > sys/param.h and setup the MAX() define
>
> I'm tired of these problems.

what problems ?  writing incorrect code ?  i hate those as well

> Just adjust the headers of the architectures which do not include this
> header.  It must not make any difference on the correctness.

did you look at the crazy include path that just happened to pull in 
sys/param.h ?  getcwd -> errno -> TLS -> NPTL -> hp-timing -> param(MAX) ... 
what a crazy path for something so simple as getcwd/MAX

but then again, maybe you're on to something here ... about about we remove 
all #include's from all source files in glibc ?  replace them all 
with 'headers.h', and from now on we can be sure we get the right stuff as 
the header path will simply be:
foo.c -> headers.h -> *

imagine the correctness and time saved then !
-mike

Attachment: pgp00000.pgp
Description: PGP signature


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]