diff options
-rw-r--r-- | ChangeLog | 5 | ||||
-rw-r--r-- | README | 24 | ||||
-rw-r--r-- | THANKS | 2 | ||||
-rw-r--r-- | acconfig.h | 3 | ||||
-rw-r--r-- | cipher/ChangeLog | 8 | ||||
-rw-r--r-- | cipher/Makefile.am | 6 | ||||
-rw-r--r-- | cipher/dynload.c | 84 | ||||
-rw-r--r-- | cipher/rand-unix.c | 8 | ||||
-rw-r--r-- | configure.in | 25 | ||||
-rw-r--r-- | mpi/ChangeLog | 4 | ||||
-rw-r--r-- | mpi/config.links | 12 | ||||
-rw-r--r-- | scripts/ChangeLog | 5 | ||||
-rwxr-xr-x | scripts/config.guess | 90 | ||||
-rwxr-xr-x | scripts/config.sub | 2 | ||||
-rw-r--r-- | scripts/distfiles | 1 |
15 files changed, 214 insertions, 65 deletions
@@ -1,3 +1,8 @@ +Wed Oct 14 12:11:34 1998 Werner Koch (wk@isil.d.shuttle.de) + + * configure.in (NAME_OF_DEV_RANDOM): New. + (DYNLINK_MOD_CFLAGS): New. + Thu Oct 8 10:55:15 1998 Werner Koch (wk@isil.d.shuttle.de) * Makefile.am (g10defs.h): creates include file @@ -1,4 +1,4 @@ - GNUPG - The GNU Privacy Guard + GnuPG - The GNU Privacy Guard ------------------------------- Version 0.4 @@ -8,12 +8,12 @@ On a Linux box (version 2.x.x, alpha or x86 CPU) it should work reliably. You may create your key on such a machine and - use it. Please verify the tar file; there is a PGP and a GNUPG + use it. Please verify the tar file; there is a PGP and a GnuPG signature available. My PGP 2 key is well known and published in the "Global Trust Register for 1998", ISBN 0-9532397-0-5. I have included my pubring as "g10/pubring.asc", which contains - the key used to make GNUPG signatures: + the key used to make GnuPG signatures: "pub 1024D/57548DCD 1998-07-07 Werner Koch (gnupg sig) <dd9jn@gnu.org>" "Key fingerprint = 6BD9 050F D8FC 941B 4341 2DCC 68B7 AB89 5754 8DCD" @@ -25,7 +25,7 @@ "pub 1024D/621CC013 1998-07-07 Werner Koch <werner.koch@guug.de>" "Key fingerprint = ECAF 7590 EB34 43B5 C7CF 3ACB 6C7E E1B8 621C C013" - You may add it to your GNUPG pubring and use it in the future to + You may add it to your GnuPG pubring and use it in the future to verify new releases. Because you verified this README file and _checked_that_it_is_really_my PGP2 key 0C9857A5, you can be sure that the above fingerprints are correct. @@ -36,17 +36,17 @@ See the file COPYING for copyright and warranty information. - Due to the fact that GNUPG does not use use any patented algorithm, + Due to the fact that GnuPG does not use use any patented algorithm, it cannot be compatible with old PGP versions, because those use IDEA (which is patented worldwide) and RSA (which is patented in the United States until Sep 20, 2000). - GNUPG is in almost all aspects compatible with other OpenPGP + GnuPG is in almost all aspects compatible with other OpenPGP implementations. The default algorithms are now DSA and ELGamal. ELGamal for signing is still available, but due to the larger size of such signatures it - is depreciated (Please note that the GNUPG implementation of ElGamal + is depreciated (Please note that the GnuPG implementation of ElGamal signatures is *not* insecure). Symmetric algorithms are: 3DES, Blowfish and CAST5, Digest algorithms are MD5, RIPEMD160, SHA1 and TIGER/192. @@ -230,7 +230,7 @@ "#34" This can be used by a MUA to specify an exact key after selecting - a key from GNUPG (by the use of a special option or an extra utility) + a key from GnuPG (by the use of a special option or an extra utility) * Or by the usual substring: @@ -245,19 +245,19 @@ Batch mode ---------- - If you use the option "--batch", GNUPG runs in non-interactive mode and + If you use the option "--batch", GnuPG runs in non-interactive mode and never prompts for input data. This does not even allow entering the passphrase; until we have a better solution (something like ssh-agent), you can use the option "--passhrase-fd n", which works like PGPs PGPPASSFD. - Batch mode also causes GNUPG to terminate as soon as a BAD signature is + Batch mode also causes GnuPG to terminate as soon as a BAD signature is detected. Exit status ----------- - GNUPG returns with an exit status of 1 if in batch mode and a bad signature + GnuPG returns with an exit status of 1 if in batch mode and a bad signature has been detected or 2 or higher for all other errors. You should parse stderr or the output of the fd specified with --status-fd to get detailed information about the errors. @@ -269,7 +269,7 @@ gpg --list-packets datafile Use this to list the contents of a data file. If the file is encrypted - you are asked for the passphrase, so that GNUPG is able to look at the + you are asked for the passphrase, so that GnuPG is able to look at the inner structure of a encrypted packet. gpgm --list-trustdb @@ -26,12 +26,14 @@ Jean-loup Gailly gzip@prep.ai.mit.edu Jens Bachem bachem@rrz.uni-koeln.de John A. Martin jam@jamux.com Jörg Schilling schilling@fokus.gmd.de +Jun Kuriyama kuriyama@sky.rim.or.jp Karl Fogel kfogel@guanabana.onshore.com Karsten Thygesen karthy@kom.auc.dk Kazu Yamamoto kazu@iijlab.net Lars Kellogg-Stedman lars@bu.edu Marco d'Itri md@linux.it Mark Adler madler@alumni.caltech.edu +Markus Friedl Markus.Friedl@informatik.uni-erlangen.de Martin Schulte schulte@thp.uni-koeln.de Matthew Skala mskala@ansuz.sooke.bc.ca Max Valianskiy maxcom@maxcom.ml.org @@ -71,6 +71,9 @@ #undef USE_RAND_W32 /* defined if we have a /dev/random and /dev/urandom */ #undef HAVE_DEV_RANDOM +/* and the real names of the random devices */ +#undef NAME_OF_DEV_RANDOM +#undef NAME_OF_DEV_URANDOM #undef USE_DYNAMIC_LINKING #undef HAVE_DL_DLOPEN diff --git a/cipher/ChangeLog b/cipher/ChangeLog index ddd34b65..99cd3012 100644 --- a/cipher/ChangeLog +++ b/cipher/ChangeLog @@ -1,3 +1,11 @@ +Thu Oct 15 11:47:57 1998 Werner Koch (wk@isil.d.shuttle.de) + + * dynload.c: Support for DLD + +Wed Oct 14 12:13:07 1998 Werner Koch (wk@isil.d.shuttle.de) + + * rand-unix.c: Now uses names from configure for /dev/random. + 1998-10-10 SL Baur <steve@altair.xemacs.org> * Makefile.am: fix sed -O substitutions to catch -O6, etc. diff --git a/cipher/Makefile.am b/cipher/Makefile.am index 298e0f32..e151de57 100644 --- a/cipher/Makefile.am +++ b/cipher/Makefile.am @@ -11,6 +11,8 @@ else pkglib_PROGRAMS = endif +DYNLINK_MOD_CFLAGS = @DYNLINK_MOD_CFLAGS@ + libcipher_a_SOURCES = cipher.c \ pubkey.c \ @@ -48,11 +50,11 @@ EXTRA_twofish_SOURCES = twofish.c tiger: $(srcdir)/tiger.c - `echo $(COMPILE) -shared -fPIC -lc -o tiger $(srcdir)/tiger.c | \ + `echo $(COMPILE) $(DYNLINK_MOD_CFLAGS) -o tiger $(srcdir)/tiger.c | \ sed -e 's/-O[2-9]*/-O1/' ` twofish: $(srcdir)/twofish.c - `echo $(COMPILE) -shared -fPIC -lc -o twofish $(srcdir)/twofish.c | \ + `echo $(COMPILE) $(DYNLINK_MOD_CFLAGS) -o twofish $(srcdir)/twofish.c | \ sed -e 's/-O[0-9]*/ /' ` diff --git a/cipher/dynload.c b/cipher/dynload.c index 0cbbda2c..ff40daff 100644 --- a/cipher/dynload.c +++ b/cipher/dynload.c @@ -25,6 +25,8 @@ #include <unistd.h> #ifdef HAVE_DL_DLOPEN #include <dlfcn.h> +#elif defined(HAVE_DLD_DLD_LINK) + #include <dld.h> #endif #include "util.h" #include "cipher.h" @@ -37,7 +39,11 @@ typedef struct ext_list { struct ext_list *next; + #ifdef HAVE_DL_DLOPEN void *handle; /* handle from dlopen() */ + #else + int handle; /* if the function has been loaded, this is true */ + #endif int failed; /* already tried but failed */ void * (*enumfunc)(int, int*, int*, int*); char *hintstr; /* pointer into name */ @@ -53,6 +59,14 @@ typedef struct { void *sym; } ENUMCONTEXT; + +#ifdef HAVE_DLD_DLD_LINK +static char *mainpgm_path; +static int did_dld_init; +static int dld_available; +#endif + + /**************** * Register an extension module. The last registered module will * be loaded first. A name may have a list of classes @@ -62,13 +76,20 @@ typedef struct { * algorithms 20 and 109. This is only a hint but if it is there the * loader may decide to only load a module which claims to have a * requested algorithm. + * + * mainpgm is the path to the program which wants to load a module + * it is only used in some environments. */ void -register_cipher_extension( const char *fname ) +register_cipher_extension( const char *mainpgm, const char *fname ) { EXTLIST r, el; char *p, *pe; + #ifdef HAVE_DLD_DLD_LINK + if( !mainpgm_path && mainpgm && *mainpgm ) + mainpgm_path = m_strdup(mainpgm); + #endif if( *fname != '/' ) { /* do tilde expansion etc */ char *p ; @@ -110,16 +131,22 @@ load_extension( EXTLIST el ) { #ifdef USE_DYNAMIC_LINKING char **name; - void *sym; + #ifdef HAVE_DL_DLOPEN const char *err; int seq = 0; int class, vers; + void *sym; + #else + unsigned long addr; + int rc; + #endif /* make sure we are not setuid */ if( getuid() != geteuid() ) log_bug("trying to load an extension while still setuid\n"); /* now that we are not setuid anymore, we can safely load modules */ + #ifdef HAVE_DL_DLOPEN el->handle = dlopen(el->name, RTLD_NOW); if( !el->handle ) { log_error("%s: error loading extension: %s\n", el->name, dlerror() ); @@ -130,6 +157,38 @@ load_extension( EXTLIST el ) log_error("%s: not a gnupg extension: %s\n", el->name, err ); goto failure; } + #else /* have dld */ + if( !did_dld_init ) { + did_dld_init = 1; + if( !mainpgm_path ) + log_error("DLD is not correctly initialized\n"); + else { + rc = dld_init( dld_find_executable(mainpgm_path) ); + if( rc ) + log_error("DLD init failed: %s\n", dld_strerror(rc) ); + else + dld_available = 1; + } + } + if( !dld_available ) { + log_error("%s: DLD not available\n", el->name ); + goto failure; + } + + rc = dld_link( el->name ); + if( rc ) { + log_error("%s: error loading extension: %s\n", + el->name, dld_strerror(rc) ); + goto failure; + } + addr = dld_get_symbol("gnupgext_version"); + if( !addr ) { + log_error("%s: not a gnupg extension: %s\n", + el->name, dld_strerror(dld_errno) ); + goto failure; + } + name = (char**)addr; + #endif if( g10_opt_verbose ) log_info("%s: %s%s%s%s\n", el->name, *name, @@ -137,13 +196,31 @@ load_extension( EXTLIST el ) el->hintstr? el->hintstr:"", el->hintstr? ")":""); + #ifdef HAVE_DL_DLOPEN sym = dlsym(el->handle, "gnupgext_enum_func"); if( (err=dlerror()) ) { log_error("%s: invalid gnupg extension: %s\n", el->name, err ); goto failure; } el->enumfunc = (void *(*)(int,int*,int*,int*))sym; + #else /* dld */ + addr = dld_get_func("gnupgext_enum_func"); + if( !addr ) { + log_error("%s: invalid gnupg extension: %s\n", + el->name, dld_strerror(dld_errno) ); + goto failure; + } + rc = dld_function_executable_p("gnupgext_enum_func"); + if( rc ) { + log_error("%s: extension function is not executable: %s\n", + el->name, dld_strerror(rc) ); + goto failure; + } + el->enumfunc = (void *(*)(int,int*,int*,int*))addr; + el->handle = 1; /* mark as usable */ + #endif + #ifdef HAVE_DL_DLOPEN if( g10_opt_verbose > 1 ) { /* list the contents of the module */ while( (sym = (*el->enumfunc)(0, &seq, &class, &vers)) ) { @@ -166,13 +243,16 @@ load_extension( EXTLIST el ) } } } + #endif return 0; failure: + #ifdef HAVE_DL_DLOPEN if( el->handle ) { dlclose(el->handle); el->handle = NULL; } + #endif el->failed = 1; #endif /*USE_DYNAMIC_LINKING*/ return -1; diff --git a/cipher/rand-unix.c b/cipher/rand-unix.c index 33f964d5..b9423e0d 100644 --- a/cipher/rand-unix.c +++ b/cipher/rand-unix.c @@ -89,10 +89,10 @@ fast_random_poll() } -#ifdef HAVE_DEV_RANDOM /* we have the /dev/random device */ +#ifdef HAVE_DEV_RANDOM /* we have the /dev/random devices */ /**************** - * Used to open the Linux /dev/random device + * Used to open the Linux and xBSD /dev/random devices */ static int open_device( const char *name, int minor ) @@ -126,12 +126,12 @@ read_random_source( byte *buffer, size_t length, int level ) if( level >= 2 ) { if( fd_random == -1 ) - fd_random = open_device( "/dev/random", 8 ); + fd_random = open_device( NAME_OF_DEV_RANDOM, 8 ); fd = fd_random; } else { if( fd_urandom == -1 ) - fd_urandom = open_device( "/dev/urandom", 9 ); + fd_urandom = open_device( NAME_OF_DEV_URANDOM, 9 ); fd = fd_urandom; } do { diff --git a/configure.in b/configure.in index ae674ae2..543748fb 100644 --- a/configure.in +++ b/configure.in @@ -76,6 +76,7 @@ AC_PROG_INSTALL AM_CYGWIN32 + case "${target}" in i386--mingw32) # special stuff for Windoze NT @@ -104,6 +105,23 @@ case "${target}" in esac AC_DEFINE_UNQUOTED(PRINTABLE_OS_NAME, "$PRINTABLE_OS_NAME") +dnl Fixme: Are these the best flags for OpenBSD???? +case "${target}" in + *-openbsd*) + NAME_OF_DEV_RANDOM="/dev/srandom" + NAME_OF_DEV_URANDOM="/dev/urandom" + DYNLINK_MOD_CFLAGS="-shared -rdynamic -fpic -Wl,-Bshareable -Wl,-x" + ;; + *) + NAME_OF_DEV_RANDOM="/dev/random" + NAME_OF_DEV_URANDOM="/dev/urandom" + DYNLINK_MOD_CFLAGS="-shared -fPIC -lc" + ;; +esac +AC_DEFINE_UNQUOTED(NAME_OF_DEV_RANDOM, "$NAME_OF_DEV_RANDOM") +AC_DEFINE_UNQUOTED(NAME_OF_DEV_URANDOM, "$NAME_OF_DEV_URANDOM") + + dnl Checks for libraries. @@ -126,12 +144,15 @@ fi else AC_MSG_CHECKING(for dynamic loading) DYNLINK_LDFLAGS= + DYNLINK_MOD_CFLAGS= use_gnupg_extensions=no AC_MSG_RESULT(has been disabled) fi AM_CONDITIONAL(ENABLE_GNUPG_EXTENSIONS, test "$use_gnupg_extensions" = yes ) AC_SUBST(DYNLINK_LDFLAGS) +AC_SUBST(DYNLINK_MOD_CFLAGS) + dnl Checks for header files. AC_HEADER_STDC @@ -182,7 +203,7 @@ fi dnl check whether we have a random device if test "$try_dev_random" = yes ; then AC_CACHE_CHECK(for random device, ac_cv_have_dev_random, -[if test -c /dev/random && test -c /dev/urandom ; then +[if test -c "$NAME_OF_DEV_RANDOM" && test -c "$NAME_OF_DEV_URANDOM" ; then ac_cv_have_dev_random=yes; else ac_cv_have_dev_random=no; fi]) if test "$ac_cv_have_dev_random" = yes; then AC_DEFINE(HAVE_DEV_RANDOM) @@ -194,8 +215,6 @@ else fi - - dnl setup assembler stuff AC_MSG_CHECKING(for mpi assembler functions) if test -f $srcdir/mpi/config.links ; then diff --git a/mpi/ChangeLog b/mpi/ChangeLog index b2e8296a..73f296d6 100644 --- a/mpi/ChangeLog +++ b/mpi/ChangeLog @@ -1,3 +1,7 @@ +Wed Oct 14 09:59:30 1998 Werner Koch (wk@isil.d.shuttle.de) + + * config-links (freebsd): ELF patches from Jun Kuriyama. + Thu Oct 8 13:28:17 1998 Werner Koch (wk@isil.d.shuttle.de) * mpi-mpow.c (mpi_mulpowm): Fixed mem leak (m_free/mpi_free). diff --git a/mpi/config.links b/mpi/config.links index bd525abc..5c3f960d 100644 --- a/mpi/config.links +++ b/mpi/config.links @@ -10,6 +10,16 @@ test -d ./mpi || mkdir ./mpi echo '/* created by config.links - do not edit */' >./mpi/asm-syntax.h case "${target}" in + i[34]86*-*-freebsd*-elf) + echo '#define ELF_SYNTAX' >>./mpi/asm-syntax.h + cat $srcdir/mpi/i386/syntax.h >>./mpi/asm-syntax.h + path="i386" + ;; + i[56]86*-*-freebsd*-elf) + echo '#define ELF_SYNTAX' >>./mpi/asm-syntax.h + cat $srcdir/mpi/i386/syntax.h >>./mpi/asm-syntax.h + path="i586 i386" + ;; i[34]86*-*-linuxaout* | i[34]86*-*-linuxoldld* | i[34]86*-*-*bsd*) echo '#define BSD_SYNTAX' >>./mpi/asm-syntax.h echo '#define X86_BROKEN_ALIGN' >>./mpi/asm-syntax.h @@ -122,7 +132,7 @@ case "${target}" in *-*-linuxaout* | *-*-linuxoldld* | *-*-linux-gnuoldld*) needs_underscore="y" ;; - *-*-linux* | *-sysv* | *-solaris* | *-gnu*) + *-*-linux* | *-sysv* | *-solaris* | *-gnu* | *-freebsd*-elf) needs_underscore="n" ;; *) diff --git a/scripts/ChangeLog b/scripts/ChangeLog new file mode 100644 index 00000000..bf603232 --- /dev/null +++ b/scripts/ChangeLog @@ -0,0 +1,5 @@ +Wed Oct 14 09:55:25 1998 Werner Koch (wk@isil.d.shuttle.de) + + * config.guess (FreeBSD): Changes from Jun Kuriyama to support ELF + * config.sub: (freebsd): Add to maybe_os + diff --git a/scripts/config.guess b/scripts/config.guess index b6f37c99..a33e7a5f 100755 --- a/scripts/config.guess +++ b/scripts/config.guess @@ -9,7 +9,7 @@ # # This program is distributed in the hope that it will be useful, but # WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU # General Public License for more details. # # You should have received a copy of the GNU General Public License @@ -169,7 +169,7 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in echo vax-dec-ultrix${UNAME_RELEASE} exit 0 ;; mips:*:*:UMIPS | mips:*:*:RISCos) - sed 's/^ //' << EOF >dummy.c + sed 's/^ //' << EOF >dummy.c int main (argc, argv) int argc; char **argv; { #if defined (host_mips) && defined (MIPSEB) #if defined (SYSTYPE_SYSV) @@ -204,19 +204,19 @@ EOF echo m88k-motorola-sysv3 exit 0 ;; AViiON:dgux:*:*) - # DG/UX returns AViiON for all architectures - UNAME_PROCESSOR=`/usr/bin/uname -p` - if [ $UNAME_PROCESSOR = mc88100 -o $UNAME_PROCESSOR = mc88110 ] ; then + # DG/UX returns AViiON for all architectures + UNAME_PROCESSOR=`/usr/bin/uname -p` + if [ $UNAME_PROCESSOR = mc88100 -o $UNAME_PROCESSOR = mc88110 ] ; then if [ ${TARGET_BINARY_INTERFACE}x = m88kdguxelfx \ -o ${TARGET_BINARY_INTERFACE}x = x ] ; then echo m88k-dg-dgux${UNAME_RELEASE} else echo m88k-dg-dguxbcs${UNAME_RELEASE} fi - else echo i586-dg-dgux${UNAME_RELEASE} - fi - exit 0 ;; - M88*:DolphinOS:*:*) # DolphinOS (SVR3) + else echo i586-dg-dgux${UNAME_RELEASE} + fi + exit 0 ;; + M88*:DolphinOS:*:*) # DolphinOS (SVR3) echo m88k-dolphin-sysv3 exit 0 ;; M88*:*:R3*:*) @@ -234,13 +234,13 @@ EOF exit 0 ;; ????????:AIX?:[12].1:2) # AIX 2.2.1 or AIX 2.1.1 is RT/PC AIX. echo romp-ibm-aix # uname -m gives an 8 hex-code CPU id - exit 0 ;; # Note that: echo "'`uname -s`'" gives 'AIX ' + exit 0 ;; # Note that: echo "'`uname -s`'" gives 'AIX ' i?86:AIX:*:*) echo i386-ibm-aix exit 0 ;; *:AIX:2:3) if grep bos325 /usr/include/stdio.h >/dev/null 2>&1; then - sed 's/^ //' << EOF >dummy.c + sed 's/^ //' << EOF >dummy.c #include <sys/systemcfg.h> main() @@ -279,9 +279,9 @@ EOF ibmrt:4.4BSD:*|romp-ibm:BSD:*) echo romp-ibm-bsd4.4 exit 0 ;; - ibmrt:*BSD:*|romp-ibm:BSD:*) # covers RT/PC NetBSD and + ibmrt:*BSD:*|romp-ibm:BSD:*) # covers RT/PC NetBSD and echo romp-ibm-bsd${UNAME_RELEASE} # 4.3 with uname added to - exit 0 ;; # report: romp-ibm BSD 4.3 + exit 0 ;; # report: romp-ibm BSD 4.3 *:BOSX:*:*) echo rs6000-bull-bosx exit 0 ;; @@ -296,16 +296,16 @@ EOF exit 0 ;; 9000/[3478]??:HP-UX:*:*) case "${UNAME_MACHINE}" in - 9000/31? ) HP_ARCH=m68000 ;; - 9000/[34]?? ) HP_ARCH=m68k ;; + 9000/31? ) HP_ARCH=m68000 ;; + 9000/[34]?? ) HP_ARCH=m68k ;; 9000/7?? | 9000/8?[1679] ) HP_ARCH=hppa1.1 ;; - 9000/8?? ) HP_ARCH=hppa1.0 ;; + 9000/8?? ) HP_ARCH=hppa1.0 ;; esac HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'` echo ${HP_ARCH}-hp-hpux${HPUX_REV} exit 0 ;; 3050*:HI-UX:*:*) - sed 's/^ //' << EOF >dummy.c + sed 's/^ //' << EOF >dummy.c #include <unistd.h> int main () @@ -313,7 +313,7 @@ EOF long cpu = sysconf (_SC_CPU_VERSION); /* The order matters, because CPU_IS_HP_MC68K erroneously returns true for CPU_PA_RISC1_0. CPU_IS_PA_RISC returns correct - results, however. */ + results, however. */ if (CPU_IS_PA_RISC (cpu)) { switch (cpu) @@ -358,25 +358,25 @@ EOF exit 0 ;; C1*:ConvexOS:*:* | convex:ConvexOS:C1*:*) echo c1-convex-bsd - exit 0 ;; + exit 0 ;; C2*:ConvexOS:*:* | convex:ConvexOS:C2*:*) if getsysinfo -f scalar_acc then echo c32-convex-bsd else echo c2-convex-bsd fi - exit 0 ;; + exit 0 ;; C34*:ConvexOS:*:* | convex:ConvexOS:C34*:*) echo c34-convex-bsd - exit 0 ;; + exit 0 ;; C38*:ConvexOS:*:* | convex:ConvexOS:C38*:*) echo c38-convex-bsd - exit 0 ;; + exit 0 ;; C4*:ConvexOS:*:* | convex:ConvexOS:C4*:*) echo c4-convex-bsd - exit 0 ;; + exit 0 ;; CRAY*X-MP:*:*:*) echo xmp-cray-unicos - exit 0 ;; + exit 0 ;; CRAY*Y-MP:*:*:*) echo ymp-cray-unicos${UNAME_RELEASE} exit 0 ;; @@ -390,12 +390,12 @@ EOF exit 0 ;; CRAY-2:*:*:*) echo cray2-cray-unicos - exit 0 ;; + exit 0 ;; F300:UNIX_System_V:*:*) - FUJITSU_SYS=`uname -p | tr [A-Z] [a-z] | sed -e 's/\///'` - FUJITSU_REL=`echo ${UNAME_RELEASE} | sed -e 's/ /_/'` - echo "f300-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" - exit 0 ;; + FUJITSU_SYS=`uname -p | tr [A-Z] [a-z] | sed -e 's/\///'` + FUJITSU_REL=`echo ${UNAME_RELEASE} | sed -e 's/ /_/'` + echo "f300-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" + exit 0 ;; F301:UNIX_System_V:*:*) echo f301-fujitsu-uxpv`echo $UNAME_RELEASE | sed 's/ .*//'` exit 0 ;; @@ -409,7 +409,17 @@ EOF echo ${UNAME_MACHINE}-pc-bsdi${UNAME_RELEASE} exit 0 ;; *:FreeBSD:*:*) - echo ${UNAME_MACHINE}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` + rel_number=`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//' 2>/dev/null` + if test "$rel_number" = "3.0"; then + ld_help_string=`ld --help 2>&1` + if echo "$ld_help_string"|grep >/dev/null 2>&1 "supported emulations: elf_i.86"; then + echo ${UNAME_MACHINE}-unknown-freebsd${rel_number}-elf + else + echo ${UNAME_MACHINE}-unknown-freebsd${rel_number}-aout + fi + else + echo ${UNAME_MACHINE}-unknown-freebsd${rel_number} + fi exit 0 ;; *:NetBSD:*:*) echo ${UNAME_MACHINE}-unknown-netbsd`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'` @@ -542,8 +552,8 @@ EOF /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \ && echo i586-ncr-sysv4.3${OS_REL} && exit 0 ;; 3[34]??:*:4.0:* | 3[34]??,*:*:4.0:*) - /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ - && echo i486-ncr-sysv4 && exit 0 ;; + /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ + && echo i486-ncr-sysv4 && exit 0 ;; m68*:LynxOS:2.*:*) echo m68k-unknown-lynxos${UNAME_RELEASE} exit 0 ;; @@ -574,9 +584,9 @@ EOF fi exit 0 ;; PENTIUM:CPunix:4.0*:*) # Unisys `ClearPath HMP IX 4000' SVR4/MP effort - # says <Richard.M.Bartel@ccMail.Census.GOV> - echo i586-unisys-sysv4 - exit 0 ;; + # says <Richard.M.Bartel@ccMail.Census.GOV> + echo i586-unisys-sysv4 + exit 0 ;; *:UNIX_System_V:4*:FTX*) # From Gerald Hewes <hewes@openmarket.com>. # How about differentiating between stratus architectures? -djm @@ -591,11 +601,11 @@ EOF exit 0 ;; R3000:*System_V*:*:* | R4000:UNIX_SYSV:*:*) if [ -d /usr/nec ]; then - echo mips-nec-sysv${UNAME_RELEASE} + echo mips-nec-sysv${UNAME_RELEASE} else - echo mips-unknown-sysv${UNAME_RELEASE} + echo mips-unknown-sysv${UNAME_RELEASE} fi - exit 0 ;; + exit 0 ;; esac #echo '(No uname command or uname output not recognized.)' 1>&2 @@ -617,11 +627,11 @@ main () #include <sys/param.h> printf ("m68k-sony-newsos%s\n", #ifdef NEWSOS4 - "4" + "4" #else "" #endif - ); exit (0); + ); exit (0); #endif #endif diff --git a/scripts/config.sub b/scripts/config.sub index 055e5458..a0deddae 100755 --- a/scripts/config.sub +++ b/scripts/config.sub @@ -68,7 +68,7 @@ esac # Here we must recognize all the valid KERNEL-OS combinations. maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'` case $maybe_os in - linux-gnu*) + linux-gnu*|freebsd*-*) os=-$maybe_os basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'` ;; diff --git a/scripts/distfiles b/scripts/distfiles index d2b99010..d2518076 100644 --- a/scripts/distfiles +++ b/scripts/distfiles @@ -5,3 +5,4 @@ mkinstalldirs mkdiff missing gnupg.spec +ChangeLog |