[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: declaring only the functions that are defined
From: |
Bruno Haible |
Subject: |
Re: declaring only the functions that are defined |
Date: |
Thu, 4 Jan 2007 15:25:20 +0100 |
Paul Eggert wrote:
> I'm a bit dubious about this one, as it adds to the .h maintenance
> burden and I'm not sure the benefit is worth the cost.
> ...
> The other parts I'm ambivalent about.
So let's drop the idea. I was hesitating too.
> For the special case of nanosleep, one might want nanosleep declared
> even if the nanosleep module isn't being used, for the benefit of
> hosts that define nanosleep but don't declare it.
Huh? If the program uses nanosleep(), it needs the gnulib module,
for those hosts that don't have the function at all.
> Also, in the future, I'm leaning towards modifying gnulib so that
> nanosleep and struct timespec are declared by <time.h> instead of
> having a special timespec.h include file. This is more compatible
> with POSIX and would be simpler for programs to use.
Yes, I agree this is the approach to follow. We just did the same thing
successfully with <wctype.h> and <dirent.h>.
Bruno