bug-gnulib
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: ./gnulib-tool --create-testdir --dir=./gnulib_build


From: Bruno Haible
Subject: Re: ./gnulib-tool --create-testdir --dir=./gnulib_build
Date: Sun, 20 Sep 2009 06:05:24 +0200
User-agent: KMail/1.9.9

Eric Blake wrote:
> --- a/lib/progreloc.c
> +++ b/lib/progreloc.c
> @@ -43,7 +43,6 @@
>  # include <windows.h>
>  #endif
> 
> -#include "canonicalize.h"
>  #include "relocatable.h"
> 
>  #ifdef NO_XMALLOC

If you do this, the canonicalize_file_name declaration may be absent when
progreloc.c is compiled, leading to a gcc warning and incorrect code generated
on 64-bit platforms.

Note that progreloc.c is being compiled by build-aux/install-reloc, not by
the Makefile. Therefore the -I options that the maintainer puts into AM_CPPFLAGS
or DEFS are not effective here. install-reloc takes an option that designates
the directory of config.h. So it will find the config.h. But it may not find
the gnulib <stdlib.h> replacement.

I don't want to fix this by adding more arguments to install-reloc, as this
would make the use of the 'relocatable-prog' module more complicated. Therefore
I'm applying this:


2009-09-19  Bruno Haible  <address@hidden>

        * lib/progreloc.c (canonicalize_file_name): New declaration.

*** lib/progreloc.c.orig        2009-09-20 05:58:32.000000000 +0200
--- lib/progreloc.c     2009-09-20 05:58:27.000000000 +0200
***************
*** 59,64 ****
--- 59,69 ----
  # include "xalloc.h"
  #endif
  
+ /* Declare canonicalize_file_name.
+    The <stdlib.h> included above may be the system's one, not the gnulib
+    one.  */
+ extern char * canonicalize_file_name (const char *name);
+ 
  /* Pathname support.
     ISSLASH(C)           tests whether C is a directory separator character.
     IS_PATH_WITH_DIR(P)  tests whether P contains a directory specification.




reply via email to

[Prev in Thread] Current Thread [Next in Thread]