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

Håkon Løvdal hlovdal at gmail.com
Thu Jun 14 20:18:09 UTC 2007


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 ...

BR Håkon Løvdal


More information about the parted-devel mailing list