gnupg-1.0.2 patches -- Sun CC and yes_no_quit default
David Champion
dgc at uchicago.edu
Tue Jul 25 02:30:09 CEST 2000
Couldn't find these mentioned anywhere.
1. Patches configure.in to partially repair gcc bigotry in modular
cipher compilation. What we really need to to steal more of
libtool, but I didn't have time for that. Even after this patch, I
had to add -G to cipher/Makefile's CFLAGS, but that's less than I
used to have to do. (Compiling with Sun Workshop Compilers on
Solaris.)
2. util/miscutil.c:answer_is_yes_no_quit() returns 1 ("yes") if the
user presses RETURN with no text. This is misleading and unsafe.
Swapping yes/no test order fixes this, since strchr("foo", '\0') ==
0. This seemed cleaner, if less straightforward, than a special
test for empty input.
These should be small enough to fit in without whatever I'm supposed to
read "info standards" about. (I dunno, I just get Sun's standards(5).)
--
-D. dgc at uchicago.edu NSIT University of Chicago
-------------- next part --------------
diff -ur gnupg-1.0.2-dist/configure.in gnupg-1.0.2/configure.in
--- gnupg-1.0.2-dist/configure.in Wed Jul 12 06:34:58 2000
+++ gnupg-1.0.2/configure.in Mon Jul 24 06:42:20 2000
@@ -253,19 +253,25 @@
*-openbsd*)
NAME_OF_DEV_RANDOM="/dev/srandom"
NAME_OF_DEV_URANDOM="/dev/urandom"
- DYNLINK_MOD_CFLAGS="-shared -rdynamic -fpic -Wl,-Bshareable -Wl,-x"
+ DYNLINK_MOD_CFLAGS="-shared -rdynamic $CFLAGS_PIC -Wl,-Bshareable -Wl,-x"
;;
*-netbsd*)
NAME_OF_DEV_RANDOM="/dev/random"
NAME_OF_DEV_URANDOM="/dev/urandom"
- DYNLINK_MOD_CFLAGS="-shared -rdynamic -fpic -Wl,-Bshareable -Wl,-x"
+ DYNLINK_MOD_CFLAGS="-shared -rdynamic $CFLAGS_PIC -Wl,-Bshareable -Wl,-x"
;;
+
*)
NAME_OF_DEV_RANDOM="/dev/random"
NAME_OF_DEV_URANDOM="/dev/urandom"
- DYNLINK_MOD_CFLAGS="-shared $CFLAGS_PIC"
+ # -shared is a gcc-ism. Find pic flags from GNUPG_CHECK_PIC.
+ if test -n "$GCC" ; then
+ DYNLINK_MOD_CFLAGS="-shared $CFLAGS_PIC"
+ else
+ DYNLINK_MOD_CFLAGS="$CFLAGS_PIC"
+ fi
;;
esac
AC_DEFINE_UNQUOTED(NAME_OF_DEV_RANDOM, "$NAME_OF_DEV_RANDOM")
-------------- next part --------------
--- gnupg-1.0.2/util/miscutil.c- Thu Mar 2 08:45:22 2000
+++ gnupg-1.0.2/util/miscutil.c Tue Jul 25 01:16:13 2000
@@ -310,16 +310,16 @@
char *short_no = _("nN");
char *short_quit = _("qQ");
- if( !stricmp(s, long_yes ) )
- return 1;
if( !stricmp(s, long_no ) )
return 0;
+ if( !stricmp(s, long_yes ) )
+ return 1;
if( !stricmp(s, long_quit ) )
return -1;
- if( strchr( short_yes, *s ) && !s[1] )
- return 1;
if( strchr( short_no, *s ) && !s[1] )
return 0;
+ if( strchr( short_yes, *s ) && !s[1] )
+ return 1;
if( strchr( short_quit, *s ) && !s[1] )
return -1;
if( !stricmp(s, "yes" ) )
More information about the Gnupg-devel
mailing list