GNUPG_SYS_SYMBOL_UNDERSCORE fails with underscores

quetschke@scytek.de quetschke@scytek.de
Wed Jul 10 09:40:02 2002


--3uo+9/B/ebqu+fSQ
Content-Type: multipart/mixed; boundary="BOKacYhQ+x31HxR3"
Content-Disposition: inline


--BOKacYhQ+x31HxR3
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

Hi,
> Hi,
>=20
> I recently found a problem in GNUPG_SYS_SYMBOL_UNDERSCORE.

> The attached patch fixes this problem. The patch is against acinclude.m4=
=20
> from GnuPG 1.1.90.
I'm very sorry about that, but my last patch solved the problem ONLY
for systems with underscores.

Please use the attached new patch, it should work with both types of
symbols.

Bye
   Volker

--BOKacYhQ+x31HxR3
Content-Type: text/plain; charset=us-ascii
Content-Disposition: attachment; filename="acinclude.m4.diff"
Content-Transfer-Encoding: quoted-printable

--- gnupg-1.1.90.org/acinclude.m4	2002-06-29 16:15:02.000000000 +0200
+++ ../gnupg/gnupg-1.1.90/acinclude.m4	2002-07-10 09:27:13.000000000 +0200
@@ -570,8 +570,9 @@
     fi
=20
     # Make sure that we snagged all the symbols we need.
-    if egrep ' nm_test_var$' "$ac_nlist" >/dev/null; then
-      if egrep ' nm_test_func$' "$ac_nlist" >/dev/null; then
+    # Fix: Adding the _? makes this test also work with underscore symbols
+    if egrep ' _?nm_test_var$' "$ac_nlist" >/dev/null; then
+      if egrep ' _?nm_test_func$' "$ac_nlist" >/dev/null; then
         cat <<EOF > conftest.c
 #ifdef __cplusplus
 extern "C" {
@@ -579,7 +580,8 @@
=20
 EOF
         # Now generate the symbol file.
-        sed 's/^.* \(.*\)$/extern char \1;/' < "$ac_nlist" >> conftest.c
+        # Fix: Adding the _? makes this test also work with underscore sym=
bols
+        sed 's/^.* _\?\(.*\)$/extern char \1;/' < "$ac_nlist" >> conftest.c
=20
         cat <<EOF >> conftest.c
 #if defined (__STDC__) && __STDC__
@@ -601,7 +603,8 @@
 changequote([,])dnl
 {
 EOF
-        sed 's/^\(.*\) \(.*\)$/  {"\1", (__ptr_t) \&\2},/' < "$ac_nlist" >=
> conftest.c
+        # Fix: Adding the _? makes this test also work with underscore sym=
bols
+        sed 's/^_\?\(.*\) _\?\(.*\)$/  {"\1", (__ptr_t) \&\2},/' < "$ac_nl=
ist" >> conftest.c
         cat <<\EOF >> conftest.c
   {0, (__ptr_t) 0}
 };
@@ -661,7 +664,7 @@
 AC_DEFUN(GNUPG_SYS_SYMBOL_UNDERSCORE,
 [tmp_do_check=3D"no"
 case "${target}" in
-    i386-emx-os2 | i[3456]86-pc-os2*emx | i386-pc-msdosdjgpp | *-*-cygwin)
+    i386-emx-os2 | i[3456]86-pc-os2*emx | i386-pc-msdosdjgpp)
         ac_cv_sys_symbol_underscore=3Dyes
         ;;
     *)

--BOKacYhQ+x31HxR3--

--3uo+9/B/ebqu+fSQ
Content-Type: application/pgp-signature
Content-Disposition: inline

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.1.90 (Cygwin32)

iD8DBQE9K+UhPTXJup+KeF0RAqDSAKCd7LWhHn23MijMFzd9WTnZZNztHwCgiYti
18buhumKYxO95YT+uQPmLmA=
=pGNR
-----END PGP SIGNATURE-----

--3uo+9/B/ebqu+fSQ--