[MacPorts] #55242: gnupg2 @2.2.1 does not build on PPC Tiger, Mac OS X 10.4.11, because it assumes that unsetenv() returns an int

MacPorts noreply at macports.org
Sat Nov 4 15:41:49 UTC 2017


#55242: gnupg2 @2.2.1 does not build on PPC Tiger, Mac OS X 10.4.11, because it
assumes that unsetenv() returns an int
-----------------------+--------------------
 Reporter:  ballapete  |      Owner:
     Type:  defect     |     Status:  new
 Priority:  Normal     |  Milestone:
Component:  ports      |    Version:  2.4.2
 Keywords:  tiger      |       Port:  gnupg2
-----------------------+--------------------
 {{{
 /opt/local/bin/gcc-apple-4.2 -DHAVE_CONFIG_H -I. -I..
 -DLOCALEDIR=\"/opt/local/share/locale\"
 -DGNUPG_BINDIR="\"/opt/local/bin\""
 -DGNUPG_LIBEXECDIR="\"/opt/local/libexec\""
 -DGNUPG_LIBDIR="\"/opt/local/lib/gnupg\""
 -DGNUPG_DATADIR="\"/opt/local/share/gnupg\""
 -DGNUPG_SYSCONFDIR="\"/opt/local/etc/gnupg\""
 -DGNUPG_LOCALSTATEDIR="\"/opt/local/var\""
 -DGNUPG_DEFAULT_PINENTRY="\"/opt/local/bin/pinentry\""
 -I/opt/local/include -I/opt/local/include -I/opt/local/include
 -I/opt/local/include -I/opt/local/include -DWITHOUT_NPTH=1 -Wall -Wno-
 pointer-sign -Wpointer-arith  -pipe -Os -arch ppc -MT libcommon_a-
 sysutils.o -MD -MP -MF .deps/libcommon_a-sysutils.Tpo -c -o libcommon_a-
 sysutils.o `test -f 'sysutils.c' || echo './'`sysutils.c
 sysutils.c: In function 'gnupg_unsetenv':
 sysutils.c:987: error: void value not ignored as it ought to be
 make[3]: *** [libcommon_a-sysutils.o] Error 1
 make[3]: Leaving directory
 `/opt/local/var/macports/build/_opt_local_var_macports_sources_lil.fr.rsync.macports.org_release_tarballs_ports_mail_gnupg2/gnupg2/work/gnupg-2.2.1/common'
 }}}

 The code in sysutil.c is:

 {{{
   965   int
   966   gnupg_unsetenv (const char *name)
   967   {
   968   #ifdef HAVE_W32CE_SYSTEM
   969     (void)name;
   970     return 0;
   971   #else /*!W32CE*/
   972   # ifdef HAVE_W32_SYSTEM
   973     /*  Windows maintains (at least) two sets of environment
 variables.
   974         One set can be accessed by GetEnvironmentVariable and
   975         SetEnvironmentVariable.  This set is inherited by the
 children.
   976         The other set is maintained in the C runtime, and is
 accessed
   977         using getenv and putenv.  We try to keep them in sync by
   978         modifying both sets.  */
   979     if (!SetEnvironmentVariable (name, NULL))
   980       {
   981         gpg_err_set_errno (EINVAL); /* (Might also be ENOMEM.) */
   982         return -1;
   983       }
   984   # endif /*W32*/
   985
   986   # ifdef HAVE_UNSETENV
   987     return unsetenv (name);
   988   # else /*!HAVE_UNSETENV*/
   989     {
   990       char *buf;
   991
   992       if (!name)
   993         {
   994           gpg_err_set_errno (EINVAL);
   995           return -1;
   996         }
   997       buf = xtrystrdup (name);
   998       if (!buf)
   999         return -1;
  1000   #  if __GNUC__
  1001   #   warning no unsetenv - trying putenv but leaking memory.
  1002   #  endif
  1003       return putenv (buf);
  1004     }
  1005   # endif /*!HAVE_UNSETENV*/
  1006   #endif /*!W32CE*/
  1007   }
 }}}

 `Tiger` has `setenv()` and `unsetenv()`, but both return nothing, they are
 voids.

--
Ticket URL: <https://trac.macports.org/ticket/55242>
MacPorts <https://www.macports.org/>
Ports system for macOS


More information about the macports-tickets mailing list