summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWerner Koch <wk@gnupg.org>1998-02-16 20:05:00 +0000
committerWerner Koch <wk@gnupg.org>1998-02-16 20:05:00 +0000
commit693d9d2a6cf4ec9c41a68200a0bdbbb395c88670 (patch)
tree97ba29c8f3584648b0a3049178d70bc18c99b245
parent19be043fd0bc1683edd1cc78d0b94c15dbec085f (diff)
downloadlibgcrypt-693d9d2a6cf4ec9c41a68200a0bdbbb395c88670.tar.gz
some import functionality
-rw-r--r--ChangeLog9
-rw-r--r--INSTALL4
-rw-r--r--THANKS2
-rw-r--r--acconfig.h1
-rw-r--r--cipher/ChangeLog7
-rw-r--r--cipher/Makefile.am3
-rw-r--r--cipher/Makefile.in4
-rw-r--r--cipher/misc.c50
-rw-r--r--configure.in16
-rw-r--r--mpi/ChangeLog5
-rw-r--r--mpi/Makefile.am3
-rw-r--r--mpi/Makefile.in5
-rw-r--r--mpi/config.links33
-rw-r--r--mpi/m68k/distfiles1
-rw-r--r--mpi/m68k/mc68020/distfiles0
-rw-r--r--mpi/m68k/syntax.h177
16 files changed, 295 insertions, 25 deletions
diff --git a/ChangeLog b/ChangeLog
index ad764498..e8c5a015 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,12 @@
+Sat Feb 14 15:37:55 1998 Werner Koch (wk@isil.d.shuttle.de)
+
+ * configure.in (mpi_config_done): Removed asm links caching.
+
+Sat Feb 14 14:02:20 1998 Werner Koch (wk@isil.d.shuttle.de)
+
+ * configure.in (PRINTABLE_OS_NAME): New.
+ * acconfig.h: Likewise.
+
Fri Feb 13 19:43:41 1998 Werner Koch (wk@isil.d.shuttle.de)
* configure.in : Fixed zlib stuff
diff --git a/INSTALL b/INSTALL
index 13ab8a52..e4e904ef 100644
--- a/INSTALL
+++ b/INSTALL
@@ -7,7 +7,7 @@ Configure options for G10
--with-zlib Forces usage of the local zlib sources. Default is
to use the (sahred) library of the system.
---without-nls Disable NLS support
+--disable-nls Disable NLS support
--enable-m-debug Compile with the integrated malloc debugging stuff.
This makes the program slower but is checks every
@@ -22,7 +22,7 @@ Problems
========
If you have compile problems, use the configure options "--with-zlib" and
-"--without-nls".
+"--disable-nls".
I cant check alls assembles files; so if you have problems assembling them
(or the program crashes), simply delete the files in the mpi/<cpu> directory.
diff --git a/THANKS b/THANKS
index 315b7c18..eb5a62cb 100644
--- a/THANKS
+++ b/THANKS
@@ -9,6 +9,7 @@ Daniel Eisenbud eisenbud@cs.swarthmore.edu
Detlef Lannert lannert@lannert.rz.uni-duesseldorf.de
Ernst Molitor ernst.molitor@uni-bonn.de
Hendrik Buschkamp buschkamp@rheumanet.org
+James Troup J.J.Troup@scm.brad.ac.uk
Jean-loup Gailly gzip@prep.ai.mit.edu
Jens Bachem bachem@rrz.uni-koeln.de
Mark Adler madler@alumni.caltech.edu
@@ -21,7 +22,6 @@ Walter Koch walterk@ddorf.rhein-ruhr.de
Werner Koch werner.koch@guug.de
Wim Vandeputte bunbun@reptile.rug.ac.be
-
Thanks to the German Unix User Group for providing FTP space and
Martin Hamilton for hosting the mailing list.
diff --git a/acconfig.h b/acconfig.h
index 11096eed..1cdf9bef 100644
--- a/acconfig.h
+++ b/acconfig.h
@@ -31,6 +31,7 @@
#undef VERSION
#undef PACKAGE
#undef G10_LOCALEDIR
+#undef PRINTABLE_OS_NAME
/* Define if your locale.h file contains LC_MESSAGES. */
#undef HAVE_LC_MESSAGES
diff --git a/cipher/ChangeLog b/cipher/ChangeLog
index e69de29b..e915c3bc 100644
--- a/cipher/ChangeLog
+++ b/cipher/ChangeLog
@@ -0,0 +1,7 @@
+Mon Feb 16 10:08:47 1998 Werner Koch (wk@isil.d.shuttle.de)
+
+ * misc.c (cipher_algo_to_string): New
+ (pubkey_algo_to_string): New.
+ (digest_algo_to_string): New.
+
+
diff --git a/cipher/Makefile.am b/cipher/Makefile.am
index ad672287..2967363b 100644
--- a/cipher/Makefile.am
+++ b/cipher/Makefile.am
@@ -27,8 +27,7 @@ libcipher_a_SOURCES = blowfish.c \
misc.c \
smallprime.c
+libcipher_a_DEPENDENCIES = @CIPHER_EXTRA_OBJS@
libcipher_a_LIBADD = @CIPHER_EXTRA_OBJS@
-$(LIBRARIES): @CIPHER_EXTRA_OBJS@
-
diff --git a/cipher/Makefile.in b/cipher/Makefile.in
index b8fe2a1b..6264a0d5 100644
--- a/cipher/Makefile.in
+++ b/cipher/Makefile.in
@@ -112,6 +112,7 @@ libcipher_a_SOURCES = blowfish.c \
misc.c \
smallprime.c
+libcipher_a_DEPENDENCIES = @CIPHER_EXTRA_OBJS@
libcipher_a_LIBADD = @CIPHER_EXTRA_OBJS@
mkinstalldirs = $(SHELL) $(top_srcdir)/scripts/mkinstalldirs
CONFIG_HEADER = ../config.h
@@ -123,7 +124,6 @@ DEFS = @DEFS@ -I. -I$(srcdir) -I..
CPPFLAGS = @CPPFLAGS@
LDFLAGS = @LDFLAGS@
LIBS = @LIBS@
-libcipher_a_DEPENDENCIES =
libcipher_a_OBJECTS = blowfish.o elgamal.o gost.o md5.o primegen.o \
random.o rmd160.o sha1.o dsa.o md.o misc.o smallprime.o
AR = ar
@@ -316,8 +316,6 @@ installdirs mostlyclean-generic distclean-generic clean-generic \
maintainer-clean-generic clean mostlyclean distclean maintainer-clean
-$(LIBRARIES): @CIPHER_EXTRA_OBJS@
-
# Tell versions [3.59,3.63) of GNU make to not export all variables.
# Otherwise a system limit (for SysV at least) may be exceeded.
.NOEXPORT:
diff --git a/cipher/misc.c b/cipher/misc.c
index 7c8f2e3c..6dcd2024 100644
--- a/cipher/misc.c
+++ b/cipher/misc.c
@@ -75,6 +75,21 @@ string_to_cipher_algo( const char *string )
/****************
+ * Map a cipher algo to a string
+ */
+const char *
+cipher_algo_to_string( int algo )
+{
+ int i;
+
+ for(i=0; cipher_names[i].name; i++ )
+ if( cipher_names[i].algo == algo )
+ return cipher_names[i].name;
+ return NULL;
+}
+
+
+/****************
* Map a string to the pubkey algo
*/
int
@@ -89,6 +104,23 @@ string_to_pubkey_algo( const char *string )
return 0;
}
+
+/****************
+ * Map a pubkey algo to a string
+ */
+const char *
+pubkey_algo_to_string( int algo )
+{
+ int i;
+
+ for(i=0; pubkey_names[i].name; i++ )
+ if( pubkey_names[i].algo == algo )
+ return pubkey_names[i].name;
+ return NULL;
+}
+
+
+
/****************
* Map a string to the digest algo
*/
@@ -104,6 +136,24 @@ string_to_digest_algo( const char *string )
return 0;
}
+
+/****************
+ * Map a digest algo to a string
+ */
+const char *
+digest_algo_to_string( int algo )
+{
+ int i;
+
+ for(i=0; digest_names[i].name; i++ )
+ if( digest_names[i].algo == algo )
+ return digest_names[i].name;
+ return NULL;
+}
+
+
+
+
/****************
* Return 0 if the cipher algo is available
*/
diff --git a/configure.in b/configure.in
index 1a29bf7a..1270b7f0 100644
--- a/configure.in
+++ b/configure.in
@@ -64,15 +64,17 @@ case "${target}" in
CPP="i386--mingw32-gcc -E"
RANLIB="i386--mingw32-ranlib"
ac_cv_have_dev_random=no
+ PRINTABLE_OS_NAME="MingW32"
;;
*)
AC_PROG_RANLIB
AC_PROG_INSTALL
AC_PROG_CC
AC_PROG_CPP
+ PRINTABLE_OS_NAME=`uname -s || echo "Unknown"`
;;
esac
-
+AC_DEFINE_UNQUOTED(PRINTABLE_OS_NAME, "$PRINTABLE_OS_NAME")
dnl Checks for libraries.
@@ -131,13 +133,6 @@ fi
dnl setup assembler stuff
AC_MSG_CHECKING(for mpi assembler functions)
-mpi_config_done="no"
-AC_CACHE_VAL(ac_cv_mpi_config_done,
- [ ac_cv_mpi_config_done="$mpi_config_done" ])
-if test "$ac_cv_mpi_config_done" = yes; then
- AC_MSG_RESULT(done)
-else
-ac_cv_mpi_config_done=""
if test -f $srcdir/mpi/config.links ; then
. $srcdir/mpi/config.links
WK_LINK_FILES($mpi_ln_src, $mpi_ln_dst)
@@ -148,7 +143,6 @@ else
AC_MSG_RESULT(failed)
AC_MSG_ERROR([mpi/config.links missing!])
fi
-fi
MPI_EXTRA_ASM_OBJS=""
if test "$ac_cv_mpi_extra_asm_modules" != ""; then
WK_MSG_PRINT([mpi extra asm functions:])
@@ -163,7 +157,7 @@ AC_SUBST(MPI_EXTRA_ASM_OBJS)
dnl Do we have zlib? Must do it here because Solaris failed
dnl when compiling a conftest (due to the "-lz" from LIBS).
if test "$g10_force_zlib" = "yes"; then
- ZLIBS="-L\${top_srcdir}/zlib -lzlib"
+ ZLIBS="../zlib/libzlib.a"
AM_CONDITIONAL(ENABLE_LOCAL_ZLIB, true)
WK_LINK_FILES(zlib/zlib.h, zlib.h )
WK_LINK_FILES(zlib/zconf.h, zconf.h )
@@ -174,7 +168,7 @@ if test "$ac_cv_header_zlib_h" = yes ; then
ZLIBS=
AM_CONDITIONAL(ENABLE_LOCAL_ZLIB, false)
else
- ZLIBS="-L\${top_srcdir}/zlib -lzlib"
+ ZLIBS="../zlib/libzlib.a"
AM_CONDITIONAL(ENABLE_LOCAL_ZLIB, true)
WK_LINK_FILES(zlib/zlib.h, zlib.h )
WK_LINK_FILES(zlib/zconf.h, zconf.h )
diff --git a/mpi/ChangeLog b/mpi/ChangeLog
index e69de29b..f05c13e1 100644
--- a/mpi/ChangeLog
+++ b/mpi/ChangeLog
@@ -0,0 +1,5 @@
+Mon Feb 16 13:00:27 1998 Werner Koch (wk@isil.d.shuttle.de)
+
+ * config.links : Add detection of m68k cpus
+
+
diff --git a/mpi/Makefile.am b/mpi/Makefile.am
index 2801a751..759b33b1 100644
--- a/mpi/Makefile.am
+++ b/mpi/Makefile.am
@@ -43,7 +43,6 @@ common_asm_objects = mpih-mul1.o \
mpih-sub1.o \
mpih-shift.o
+libmpi_a_DEPENDENCIES = $(common_asm_objects) @MPI_EXTRA_ASM_OBJS@
libmpi_a_LIBADD = $(common_asm_objects) @MPI_EXTRA_ASM_OBJS@
-$(LIBRARIES): $(common_asm_objects) @MPI_EXTRA_ASM_OBJS@
-
diff --git a/mpi/Makefile.in b/mpi/Makefile.in
index 87976eeb..e11c23c9 100644
--- a/mpi/Makefile.in
+++ b/mpi/Makefile.in
@@ -125,6 +125,7 @@ common_asm_objects = mpih-mul1.o \
mpih-sub1.o \
mpih-shift.o
+libmpi_a_DEPENDENCIES = $(common_asm_objects) @MPI_EXTRA_ASM_OBJS@
libmpi_a_LIBADD = $(common_asm_objects) @MPI_EXTRA_ASM_OBJS@
mkinstalldirs = $(SHELL) $(top_srcdir)/scripts/mkinstalldirs
CONFIG_HEADER = ../config.h
@@ -136,8 +137,6 @@ DEFS = @DEFS@ -I. -I$(srcdir) -I..
CPPFLAGS = @CPPFLAGS@
LDFLAGS = @LDFLAGS@
LIBS = @LIBS@
-libmpi_a_DEPENDENCIES = mpih-mul1.o mpih-mul2.o mpih-mul3.o mpih-add1.o \
-mpih-sub1.o mpih-shift.o
libmpi_a_OBJECTS = mpi-add.o mpi-bit.o mpi-cmp.o mpi-div.o mpi-gcd.o \
mpi-inv.o mpi-mul.o mpi-pow.o mpi-mpow.o mpi-scan.o mpicoder.o \
mpih-cmp.o mpih-add.o mpih-sub.o mpih-div.o mpih-mul.o mpiutil.o
@@ -334,8 +333,6 @@ maintainer-clean-generic clean mostlyclean distclean maintainer-clean
CFLAGS += -O2
-$(LIBRARIES): $(common_asm_objects) @MPI_EXTRA_ASM_OBJS@
-
# Tell versions [3.59,3.63) of GNU make to not export all variables.
# Otherwise a system limit (for SysV at least) may be exceeded.
.NOEXPORT:
diff --git a/mpi/config.links b/mpi/config.links
index 4c7cbf25..83c6b71e 100644
--- a/mpi/config.links
+++ b/mpi/config.links
@@ -68,6 +68,39 @@ case "${target}" in
path="sparc32"
mpi_extra_modules="udiv"
;;
+
+ # Motorola 68k configurations. Let m68k mean 68020-68040.
+ # mc68000 or mc68060 configurations need to be specified explicitly
+ m680[234]0*-*-linuxaout* | m68k*-*-linuxaout*)
+ echo '#define MIT_SYNTAX' >./mpi/asm-syntax.h
+ cat $srcdir/mpi/m68k/syntax.h >>./mpi/asm-syntax.h
+ path="m68k/mc68020 m68k"
+ ;;
+ m68060*-*-linuxaout*)
+ echo '#define MIT_SYNTAX' >./mpi/asm-syntax.h
+ cat $srcdir/mpi/m68k/syntax.h >>./mpi/asm-syntax.h
+ path="m68k"
+ ;;
+ m680[234]0*-*-linux* | m68k*-*-linux*)
+ echo '#define ELF_SYNTAX' >./mpi/asm-syntax.h
+ cat $srcdir/mpi/m68k/syntax.h >>./mpi/asm-syntax.h
+ path="m68k/mc68020 m68k"
+ ;;
+ m68060*-*-linux*)
+ echo '#define ELF_SYNTAX' >./mpi/asm-syntax.h
+ cat $srcdir/mpi/m68k/syntax.h >>./mpi/asm-syntax.h
+ path="m68k"
+ ;;
+ m68000*-*-* | m68060*-*-*)
+ echo '#define MIT_SYNTAX' >./mpi/asm-syntax.h
+ cat $srcdir/mpi/m68k/syntax.h >>./mpi/asm-syntax.h
+ path="m68k/mc68000"
+ ;;
+ m680[234]0*-*-* | m68k*-*-*)
+ echo '#define MIT_SYNTAX' >./mpi/asm-syntax.h
+ cat $srcdir/mpi/m68k/syntax.h >>./mpi/asm-syntax.h
+ path="m68k/mc68020 m68k"
+ ;;
*)
echo '/* No assembler modules configured */' >>./mpi/asm-syntax.h
path=""
diff --git a/mpi/m68k/distfiles b/mpi/m68k/distfiles
new file mode 100644
index 00000000..88494d95
--- /dev/null
+++ b/mpi/m68k/distfiles
@@ -0,0 +1 @@
+syntax.h
diff --git a/mpi/m68k/mc68020/distfiles b/mpi/m68k/mc68020/distfiles
new file mode 100644
index 00000000..e69de29b
--- /dev/null
+++ b/mpi/m68k/mc68020/distfiles
diff --git a/mpi/m68k/syntax.h b/mpi/m68k/syntax.h
new file mode 100644
index 00000000..9d6f3522
--- /dev/null
+++ b/mpi/m68k/syntax.h
@@ -0,0 +1,177 @@
+/* asm.h -- Definitions for 68k syntax variations.
+
+Copyright (C) 1992, 1994, 1996 Free Software Foundation, Inc.
+
+This file is part of the GNU MP Library.
+
+The GNU MP Library is free software; you can redistribute it and/or modify
+it under the terms of the GNU Library General Public License as published by
+the Free Software Foundation; either version 2 of the License, or (at your
+option) any later version.
+
+The GNU MP Library 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 Library General Public
+License for more details.
+
+You should have received a copy of the GNU Library General Public License
+along with the GNU MP Library; see the file COPYING.LIB. If not, write to
+the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston,
+MA 02111-1307, USA. */
+
+#undef ALIGN
+
+#ifdef MIT_SYNTAX
+#define PROLOG(name)
+#define EPILOG(name)
+#define R(r)r
+#define MEM(base)base@
+#define MEM_DISP(base,displacement)base@(displacement)
+#define MEM_INDX(base,idx,size_suffix)base@(idx:size_suffix)
+#define MEM_INDX1(base,idx,size_suffix,scale)base@(idx:size_suffix:scale)
+#define MEM_PREDEC(memory_base)memory_base@-
+#define MEM_POSTINC(memory_base)memory_base@+
+#define L(label) label
+#define TEXT .text
+#define ALIGN .even
+#define GLOBL .globl
+#define moveql moveq
+/* Use variable sized opcodes. */
+#define bcc jcc
+#define bcs jcs
+#define bls jls
+#define beq jeq
+#define bne jne
+#define bra jra
+#endif
+
+#ifdef SONY_SYNTAX
+#define PROLOG(name)
+#define EPILOG(name)
+#define R(r)r
+#define MEM(base)(base)
+#define MEM_DISP(base,displacement)(displacement,base)
+#define MEM_INDX(base,idx,size_suffix)(base,idx.size_suffix)
+#define MEM_INDX1(base,idx,size_suffix,scale)(base,idx.size_suffix*scale)
+#define MEM_PREDEC(memory_base)-(memory_base)
+#define MEM_POSTINC(memory_base)(memory_base)+
+#define L(label) label
+#define TEXT .text
+#define ALIGN .even
+#define GLOBL .globl
+#endif
+
+#ifdef MOTOROLA_SYNTAX
+#define PROLOG(name)
+#define EPILOG(name)
+#define R(r)r
+#define MEM(base)(base)
+#define MEM_DISP(base,displacement)(displacement,base)
+#define MEM_INDX(base,idx,size_suffix)(base,idx.size_suffix)
+#define MEM_INDX1(base,idx,size_suffix,scale)(base,idx.size_suffix*scale)
+#define MEM_PREDEC(memory_base)-(memory_base)
+#define MEM_POSTINC(memory_base)(memory_base)+
+#define L(label) label
+#define TEXT
+#define ALIGN
+#define GLOBL XDEF
+#define lea LEA
+#define movel MOVE.L
+#define moveml MOVEM.L
+#define moveql MOVEQ.L
+#define cmpl CMP.L
+#define orl OR.L
+#define clrl CLR.L
+#define eorw EOR.W
+#define lsrl LSR.L
+#define lsll LSL.L
+#define roxrl ROXR.L
+#define roxll ROXL.L
+#define addl ADD.L
+#define addxl ADDX.L
+#define addql ADDQ.L
+#define subl SUB.L
+#define subxl SUBX.L
+#define subql SUBQ.L
+#define negl NEG.L
+#define mulul MULU.L
+#define bcc BCC
+#define bcs BCS
+#define bls BLS
+#define beq BEQ
+#define bne BNE
+#define bra BRA
+#define dbf DBF
+#define rts RTS
+#define d0 D0
+#define d1 D1
+#define d2 D2
+#define d3 D3
+#define d4 D4
+#define d5 D5
+#define d6 D6
+#define d7 D7
+#define a0 A0
+#define a1 A1
+#define a2 A2
+#define a3 A3
+#define a4 A4
+#define a5 A5
+#define a6 A6
+#define a7 A7
+#define sp SP
+#endif
+
+#ifdef ELF_SYNTAX
+#define PROLOG(name) .type name,@function
+#define EPILOG(name) .size name,.-name
+#define MEM(base)(R(base))
+#define MEM_DISP(base,displacement)(displacement,R(base))
+#define MEM_PREDEC(memory_base)-(R(memory_base))
+#define MEM_POSTINC(memory_base)(R(memory_base))+
+#ifdef __STDC__
+#define R_(r)%##r
+#define R(r)R_(r)
+#define MEM_INDX_(base,idx,size_suffix)(R(base),R(idx##.##size_suffix))
+#define MEM_INDX(base,idx,size_suffix)MEM_INDX_(base,idx,size_suffix)
+#define MEM_INDX1_(base,idx,size_suffix,scale)(R(base),R(idx##.##size_suffix*scale))
+#define MEM_INDX1(base,idx,size_suffix,scale)MEM_INDX1_(base,idx,size_suffix,scale)
+#define L(label) .##label
+#else
+#define R(r)%/**/r
+#define MEM_INDX(base,idx,size_suffix)(R(base),R(idx).size_suffix)
+#define MEM_INDX1(base,idx,size_suffix,scale)(R(base),R(idx).size_suffix*scale)
+#define L(label) ./**/label
+#endif
+#define TEXT .text
+#define ALIGN .align 2
+#define GLOBL .globl
+#define bcc jbcc
+#define bcs jbcs
+#define bls jbls
+#define beq jbeq
+#define bne jbne
+#define bra jbra
+#endif
+
+#if defined (SONY_SYNTAX) || defined (ELF_SYNTAX)
+#define movel move.l
+#define moveml movem.l
+#define moveql moveq.l
+#define cmpl cmp.l
+#define orl or.l
+#define clrl clr.l
+#define eorw eor.w
+#define lsrl lsr.l
+#define lsll lsl.l
+#define roxrl roxr.l
+#define roxll roxl.l
+#define addl add.l
+#define addxl addx.l
+#define addql addq.l
+#define subl sub.l
+#define subxl subx.l
+#define subql subq.l
+#define negl neg.l
+#define mulul mulu.l
+#endif