[parted-devel] [PATCH] Fix configure-with-nls vs. wchar.h/wcsdup problem differently.

Jim Meyering jim at meyering.net
Thu Jun 14 20:59:37 UTC 2007


"Håkon Løvdal" <hlovdal at gmail.com> wrote:

> On 30/05/07, Jim Meyering <jim at meyering.net> wrote:
>> This fixes the root cause of yesterday's compile problem.
>> Without the _GNU_SOURCE definition from config.h, the declaration
>> of wcsdup in <wchar.h> was not visible:
>>
>>         Fix configure-with-nls vs. wchar.h/wcsdup problem differently.
>>         * parted/table.c: Include <config.h> *before* all other #include
>>         directives.  Remove explicit declaration of wcsdup.  Now, we'll
>>         get the one from <wchar.h>.
>
> When the order of include files matters it is very, very, very good to
> also include comment in the source about it, i.e.
>
>  #include <config.h>   // must be included before ...

Thanks, but what if *every* file includes config.h,
and in every file it is included first?
Is it still so good to have that comment everywhere?
Perhaps I've been including config.h for too long
and hence I take it too much as a "given".



More information about the parted-devel mailing list