bug-gettext
[Top][All Lists]
Advanced

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

[bug-gettext] gettext 0.18.3.1 might be buggy


From: Peter Dyballa
Subject: [bug-gettext] gettext 0.18.3.1 might be buggy
Date: Sat, 2 Nov 2013 00:05:47 +0100

Hello!

I am trying to cross-compile gettext 0.18.3.1 on Mac OS X 10.6.8 for a few old 
and new Apple hardware platforms and Mac OS X 10.4. The build for the G3 
processor (PowerPC 750) went OK, but the build for the G4 (PowerPC 74xx) fails 
here:

        /bin/sh ../libtool  --tag=CC   --mode=compile gcc-4.0 -std=gnu99 
-DHAVE_CONFIG_H -DEXEEXT=\"\" -DEXEEXT=\"\" -DEXEEXT=\"\" -I. -I..  -I../intl 
-I../intl -I.. -I.. -DDEPENDS_ON_LIBICONV=1 -DDEPENDS_ON_LIBINTL=1    
-I///usr/include/libxml2 -I./libcroco    -arch ppc -isysroot 
/Developer45/SDKs/MacOSX10.4u.sdk -mmacosx-version-min=10.4.8 -mcpu=G4 -m32 -H 
-pipe -fPIC -fast -mtune=G4 -mpowerpc-gfxopt -faltivec -maltivec -mabi=altivec 
-pthread -finline-functions -c -o unsetenv.lo unsetenv.c
        libtool: compile:  gcc-4.0 -std=gnu99 -DHAVE_CONFIG_H -DEXEEXT=\"\" 
-DEXEEXT=\"\" -DEXEEXT=\"\" -I. -I.. -I../intl -I../intl -I.. -I.. 
-DDEPENDS_ON_LIBICONV=1 -DDEPENDS_ON_LIBINTL=1 -I///usr/include/libxml2 
-I./libcroco -arch ppc -isysroot /Developer45/SDKs/MacOSX10.4u.sdk 
-mmacosx-version-min=10.4.8 -mcpu=G4 -m32 -H -pipe -fPIC -fast -mtune=G4 
-mpowerpc-gfxopt -faltivec -maltivec -mabi=altivec -pthread -finline-functions 
-c unsetenv.c  -fno-common -DPIC -o unsetenv.o
        . ../config.h
        . ./stdlib.h
        .. /Developer45/SDKs/MacOSX10.4u.sdk/usr/include/stdlib.h
        ... /Developer45/SDKs/MacOSX10.4u.sdk/usr/include/sys/cdefs.h
        ... /Developer45/SDKs/MacOSX10.4u.sdk/usr/include/_types.h
        .... /Developer45/SDKs/MacOSX10.4u.sdk/usr/include/sys/_types.h
        ..... /Developer45/SDKs/MacOSX10.4u.sdk/usr/include/machine/_types.h
        ...... /Developer45/SDKs/MacOSX10.4u.sdk/usr/include/ppc/_types.h
        ... ./sys/wait.h
        .... /Developer45/SDKs/MacOSX10.4u.sdk/usr/include/sys/wait.h
        ..... /Developer45/SDKs/MacOSX10.4u.sdk/usr/include/sys/signal.h
        ...... /Developer45/SDKs/MacOSX10.4u.sdk/usr/include/sys/appleapiopts.h
        ...... /Developer45/SDKs/MacOSX10.4u.sdk/usr/include/machine/signal.h
        ....... /Developer45/SDKs/MacOSX10.4u.sdk/usr/include/ppc/signal.h
        ..... /Developer45/SDKs/MacOSX10.4u.sdk/usr/include/sys/resource.h
        ..... /Developer45/SDKs/MacOSX10.4u.sdk/usr/include/machine/endian.h
        ...... /Developer45/SDKs/MacOSX10.4u.sdk/usr/include/ppc/endian.h
        ....... /Developer45/SDKs/MacOSX10.4u.sdk/usr/include/sys/_endian.h
        ........ ./stdint.h
        ......... 
/Developer45/SDKs/MacOSX10.4u.sdk/usr/lib/gcc/powerpc-apple-darwin10/4.0.1/include/stdint.h
        ......... ./sys/types.h
        .......... /Developer45/SDKs/MacOSX10.4u.sdk/usr/include/sys/types.h
        ........... 
/Developer45/SDKs/MacOSX10.4u.sdk/usr/include/machine/types.h
        ............ /Developer45/SDKs/MacOSX10.4u.sdk/usr/include/ppc/types.h
        ........... 
/Developer45/SDKs/MacOSX10.4u.sdk/usr/include/machine/endian.h
        ......... 
/Developer45/SDKs/MacOSX10.4u.sdk/usr/lib/gcc/powerpc-apple-darwin10/4.0.1/include/limits.h
        .......... 
/Developer45/SDKs/MacOSX10.4u.sdk/usr/lib/gcc/powerpc-apple-darwin10/4.0.1/include/syslimits.h
        .......... /Developer45/SDKs/MacOSX10.4u.sdk/usr/include/limits.h
        ........... 
/Developer45/SDKs/MacOSX10.4u.sdk/usr/include/machine/limits.h
        ............ /Developer45/SDKs/MacOSX10.4u.sdk/usr/include/ppc/limits.h
        ............. 
/Developer45/SDKs/MacOSX10.4u.sdk/usr/include/ppc/_limits.h
        ........... 
/Developer45/SDKs/MacOSX10.4u.sdk/usr/include/sys/syslimits.h
        ......... /Developer45/SDKs/MacOSX10.4u.sdk/usr/include/inttypes.h
        .......... ./stdint.h
        ........ 
/Developer45/SDKs/MacOSX10.4u.sdk/usr/include/libkern/OSByteOrder.h
        ......... 
/Developer45/SDKs/MacOSX10.4u.sdk/usr/include/libkern/ppc/OSByteOrder.h
        .... ./sys/types.h
        ... ./alloca.h
        .. 
/Developer45/SDKs/MacOSX10.4u.sdk/usr/lib/gcc/powerpc-apple-darwin10/4.0.1/include/stddef.h
        . ./errno.h
        .. /Developer45/SDKs/MacOSX10.4u.sdk/usr/include/errno.h
        ... /Developer45/SDKs/MacOSX10.4u.sdk/usr/include/sys/errno.h
        . ./string.h
        .. /Developer45/SDKs/MacOSX10.4u.sdk/usr/include/string.h
        .. 
/Developer45/SDKs/MacOSX10.4u.sdk/usr/lib/gcc/powerpc-apple-darwin10/4.0.1/include/stddef.h
        . ./unistd.h
        .. /Developer45/SDKs/MacOSX10.4u.sdk/usr/include/unistd.h
        ... /Developer45/SDKs/MacOSX10.4u.sdk/usr/include/sys/unistd.h
        ... ./sys/select.h
        .... ./sys/types.h
        .... ./sys/time.h
        ..... /Developer45/SDKs/MacOSX10.4u.sdk/usr/include/sys/time.h
        ...... ./time.h
        ....... /Developer45/SDKs/MacOSX10.4u.sdk/usr/include/time.h
        ........ /Developer45/SDKs/MacOSX10.4u.sdk/usr/include/machine/_limits.h
        ....... 
/Developer45/SDKs/MacOSX10.4u.sdk/usr/lib/gcc/powerpc-apple-darwin10/4.0.1/include/stddef.h
        .... /Developer45/SDKs/MacOSX10.4u.sdk/usr/include/sys/select.h
        ..... ./sys/types.h
        ..... ./signal.h
        ...... ./sys/types.h
        ...... /Developer45/SDKs/MacOSX10.4u.sdk/usr/include/signal.h
        .... ./signal.h
        .. 
/Developer45/SDKs/MacOSX10.4u.sdk/usr/lib/gcc/powerpc-apple-darwin10/4.0.1/include/stddef.h
        .. ./stdlib.h
        .. ./sys/types.h
        .. ./getopt.h
        ... /Developer45/SDKs/MacOSX10.4u.sdk/usr/include/getopt.h
        .... ./unistd.h
        ... ../config.h
        ... /Developer45/SDKs/MacOSX10.4u.sdk/usr/include/ctype.h
        .... /Developer45/SDKs/MacOSX10.4u.sdk/usr/include/runetype.h
        .. /Developer45/SDKs/MacOSX10.4u.sdk/usr/include/crt_externs.h
        unsetenv.c: In function 'rpl_unsetenv':
        unsetenv.c:123: error: void value not ignored as it ought to be
        make[4]: *** [unsetenv.lo] Error 1

The bug seems to be among these lines of 
gettext-0.18.3.1/gettext-tools/gnulib-lib/stdlib.h:

         1108   #if 1
         1109   /* Set NAME to VALUE in the environment.
         1110      If REPLACE is nonzero, overwrite an existing value.  */
         1111   # if 1
         1112   #  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
         1113   #   undef setenv
         1114   #   define setenv rpl_setenv
         1115   #  endif
         1116   _GL_FUNCDECL_RPL (setenv, int,
         1117                     (const char *name, const char *value, int 
replace)
         1118                     _GL_ARG_NONNULL ((1)));
         1119   _GL_CXXALIAS_RPL (setenv, int,
         1120                     (const char *name, const char *value, int 
replace));
         1121   # else
         1122   #  if !1
         1123   _GL_FUNCDECL_SYS (setenv, int,
         1124                     (const char *name, const char *value, int 
replace)
         1125                     _GL_ARG_NONNULL ((1)));
         1126   #  endif
         1127   _GL_CXXALIAS_SYS (setenv, int,
         1128                     (const char *name, const char *value, int 
replace));
         1129   # endif
         1130   # if !(1 && !1)
         1131   _GL_CXXALIASWARN (setenv);
         1132   # endif
         1133   #elif defined GNULIB_POSIXCHECK
         1134   # undef setenv
         1135   # if HAVE_RAW_DECL_SETENV
         1136   _GL_WARN_ON_USE (setenv, "setenv is unportable - "
         1137                    "use gnulib module setenv for portability");
         1138   # endif
         1139   #endif


         1232   #if 1
         1233   /* Remove the variable NAME from the environment.  */
         1234   # if 1
         1235   #  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
         1236   #   undef unsetenv
         1237   #   define unsetenv rpl_unsetenv
         1238   #  endif
         1239   _GL_FUNCDECL_RPL (unsetenv, int, (const char *name) 
_GL_ARG_NONNULL ((1)));
         1240   _GL_CXXALIAS_RPL (unsetenv, int, (const char *name));
         1241   # else
         1242   #  if !1
         1243   _GL_FUNCDECL_SYS (unsetenv, int, (const char *name) 
_GL_ARG_NONNULL ((1)));
         1244   #  endif
         1245   _GL_CXXALIAS_SYS (unsetenv, int, (const char *name));
         1246   # endif
         1247   # if !(1 && !1)
         1248   _GL_CXXALIASWARN (unsetenv);
         1249   # endif
         1250   #elif defined GNULIB_POSIXCHECK
         1251   # undef unsetenv
         1252   # if HAVE_RAW_DECL_UNSETENV
         1253   _GL_WARN_ON_USE (unsetenv, "unsetenv is unportable - "
         1254                    "use gnulib module unsetenv for portability");
         1255   # endif
         1256   #endif

and what 'gcc -E -dD ...' produces:


        # 143 "/Developer45/SDKs/MacOSX10.4u.sdk/usr/include/stdlib.h" 3 4
        
        ...
        
        void unsetenv(const char *);
        # 260 "/Developer45/SDKs/MacOSX10.4u.sdk/usr/include/stdlib.h" 3 4
        ...

        extern int _gl_cxxalias_dummy;
        extern int _gl_cxxalias_dummy;
        # 1113 "./stdlib.h" 3
        #undef setenv
        #define setenv rpl_setenv
        
        extern int rpl_setenv (const char *name, const char *value, int 
replace);
        
        
        extern int _gl_cxxalias_dummy;
        # 1131 "./stdlib.h" 3
        extern int _gl_cxxalias_dummy;
        # 1236 "./stdlib.h" 3
        #undef unsetenv
        #define unsetenv rpl_unsetenv
        
        extern int rpl_unsetenv (const char *name);
        extern int _gl_cxxalias_dummy;
        ...
        #undef unsetenv
        # 110 "unsetenv.c"
        int
        rpl_unsetenv (const char *name)
        {
          int result = 0;
          if (!name || !*name || strchr (name, '='))
            {
              (*__error()) = 22;
              return -1;
            }
          while (getenv (name))
        
            result =
        
              unsetenv (name);
          return result;
        }

The file /Developer45/SDKs/MacOSX10.4u.sdk/usr/include/stdlib.h has:

        #ifndef _ANSI_SOURCE
        ...
        #if __DARWIN_UNIX03
        int      unsetenv(const char *) __DARWIN_ALIAS(unsetenv);
        #else /* !__DARWIN_UNIX03 */
        void     unsetenv(const char *);
        #endif /* __DARWIN_UNIX03 */
        #endif


According to 'man unsetenv(3)' it is

    int
    unsetenv(const char *name);


Should I better stay with elder versions of gettext?

--
Greetings

 Pete

    _o    o         o   o
  _<<     \\_/\_,   \\_ \\_/\_,
 (*)/(*) (*)   (*) (*) `-    (*)




reply via email to

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