aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--g10/ChangeLog6
-rw-r--r--g10/g10.c3
-rw-r--r--g10/hkp.c8
-rw-r--r--g10/keyedit.c8
-rw-r--r--g10/keyserver.c58
-rw-r--r--include/ChangeLog9
-rw-r--r--include/memory.h2
-rw-r--r--include/mpi.h14
-rw-r--r--include/util.h8
-rw-r--r--mpi/ChangeLog5
-rw-r--r--mpi/mpiutil.c9
-rw-r--r--scripts/ChangeLog7
-rw-r--r--scripts/conf-riscos/Makefile361
-rw-r--r--scripts/conf-riscos/include/config.h26
-rw-r--r--util/ChangeLog12
-rw-r--r--util/logger.c4
-rw-r--r--util/memory.c28
-rw-r--r--util/riscos.c1
18 files changed, 323 insertions, 246 deletions
diff --git a/g10/ChangeLog b/g10/ChangeLog
index e11f0aad9..55add114d 100644
--- a/g10/ChangeLog
+++ b/g10/ChangeLog
@@ -1,3 +1,9 @@
+2002-05-10 Stefan Bellon <[email protected]>
+
+ * g10.c, hkp.c, keyedit.c, keyserver.c: Replaced all occurrances
+ of strcasecmp with ascii_strcasecmp and all occurrances of
+ strncasecmp with ascii_memcasecmp.
+
2002-05-10 David Shaw <[email protected]>
* packet.h, getkey.c (fixup_uidnode), keyedit.c (show_prefs): Show
diff --git a/g10/g10.c b/g10/g10.c
index ddeb828b6..de4e1855f 100644
--- a/g10/g10.c
+++ b/g10/g10.c
@@ -1492,7 +1492,8 @@ main( int argc, char **argv )
* may try to load an module */
if( def_cipher_string ) {
opt.def_cipher_algo = string_to_cipher_algo(def_cipher_string);
- if(opt.def_cipher_algo==0 && strcasecmp(def_cipher_string,"idea")==0)
+ if(opt.def_cipher_algo==0 &&
+ ascii_strcasecmp(def_cipher_string,"idea")==0)
idea_cipher_warn(1);
m_free(def_cipher_string); def_cipher_string = NULL;
if( check_cipher_algo(opt.def_cipher_algo) )
diff --git a/g10/hkp.c b/g10/hkp.c
index 347e63c91..466be8172 100644
--- a/g10/hkp.c
+++ b/g10/hkp.c
@@ -77,7 +77,7 @@ hkp_ask_import( KEYDB_SEARCH_DESC *desc, void *stats_handle)
* binary mode ... how?
*/
- if(strcasecmp(opt.keyserver_scheme,"x-broken-hkp")==0)
+ if(ascii_strcasecmp(opt.keyserver_scheme,"x-broken-hkp")==0)
hflags |= HTTP_FLAG_NO_SHUTDOWN;
sprintf(request,"x-hkp://%s%s%s/pks/lookup?op=get&search=0x%08lX",
@@ -131,7 +131,7 @@ hkp_export( STRLIST users )
request = m_alloc( strlen( opt.keyserver_host ) + 100 );
- if(strcasecmp(opt.keyserver_scheme,"x-broken-hkp")==0)
+ if(ascii_strcasecmp(opt.keyserver_scheme,"x-broken-hkp")==0)
hflags |= HTTP_FLAG_NO_SHUTDOWN;
sprintf( request, "x-hkp://%s%s%s/pks/add",
@@ -305,7 +305,7 @@ parse_hkp_index(IOBUF buffer,char *line)
}
}
- if(strncasecmp(line,"pub ",5)==0)
+ if(ascii_memcasecmp(line,"pub ",5)==0)
{
char *tok,*temp;
@@ -503,7 +503,7 @@ int hkp_search(STRLIST tokens)
request=m_alloc(strlen(opt.keyserver_host) + 100 + strlen(searchurl));
- if(strcasecmp(opt.keyserver_scheme,"x-broken-hkp")==0)
+ if(ascii_strcasecmp(opt.keyserver_scheme,"x-broken-hkp")==0)
hflags |= HTTP_FLAG_NO_SHUTDOWN;
sprintf(request,"x-hkp://%s%s%s/pks/lookup?op=index&search=%s",
diff --git a/g10/keyedit.c b/g10/keyedit.c
index 61cd4e78f..f86ec3663 100644
--- a/g10/keyedit.c
+++ b/g10/keyedit.c
@@ -558,13 +558,13 @@ sign_uids( KBNODE keyblock, STRLIST locusr, int *ret_modified,
if(answer[0]=='\0')
class=0x10+opt.def_cert_check_level; /* Default */
- else if(strcasecmp(answer,"0")==0)
+ else if(ascii_strcasecmp(answer,"0")==0)
class=0x10; /* Generic */
- else if(strcasecmp(answer,"1")==0)
+ else if(ascii_strcasecmp(answer,"1")==0)
class=0x11; /* Persona */
- else if(strcasecmp(answer,"2")==0)
+ else if(ascii_strcasecmp(answer,"2")==0)
class=0x12; /* Casual */
- else if(strcasecmp(answer,"3")==0)
+ else if(ascii_strcasecmp(answer,"3")==0)
class=0x13; /* Positive */
else
tty_printf(_("Invalid selection.\n"));
diff --git a/g10/keyserver.c b/g10/keyserver.c
index 6515c2958..c6e4ba4c6 100644
--- a/g10/keyserver.c
+++ b/g10/keyserver.c
@@ -51,44 +51,44 @@ parse_keyserver_options(char *options)
do
{
- if(strcasecmp(tok,"include-revoked")==0)
+ if(ascii_strcasecmp(tok,"include-revoked")==0)
opt.keyserver_options.include_revoked=1;
- else if(strcasecmp(tok,"no-include-revoked")==0)
+ else if(ascii_strcasecmp(tok,"no-include-revoked")==0)
opt.keyserver_options.include_revoked=0;
- else if(strcasecmp(tok,"include-disabled")==0)
+ else if(ascii_strcasecmp(tok,"include-disabled")==0)
opt.keyserver_options.include_disabled=1;
- else if(strcasecmp(tok,"no-include-disabled")==0)
+ else if(ascii_strcasecmp(tok,"no-include-disabled")==0)
opt.keyserver_options.include_disabled=0;
#ifdef EXEC_TEMPFILE_ONLY
- else if(strcasecmp(tok,"use-temp-files")==0 ||
- strcasecmp(tok,"no-use-temp-files")==0)
+ else if(ascii_strcasecmp(tok,"use-temp-files")==0 ||
+ ascii_strcasecmp(tok,"no-use-temp-files")==0)
log_info(_("Warning: keyserver option \"%s\" is not used "
"on this platform\n"),tok);
#else
- else if(strcasecmp(tok,"use-temp-files")==0)
+ else if(ascii_strcasecmp(tok,"use-temp-files")==0)
opt.keyserver_options.use_temp_files=1;
- else if(strcasecmp(tok,"no-use-temp-files")==0)
+ else if(ascii_strcasecmp(tok,"no-use-temp-files")==0)
opt.keyserver_options.use_temp_files=0;
#endif
- else if(strcasecmp(tok,"keep-temp-files")==0)
+ else if(ascii_strcasecmp(tok,"keep-temp-files")==0)
opt.keyserver_options.keep_temp_files=1;
- else if(strcasecmp(tok,"no-keep-temp-files")==0)
+ else if(ascii_strcasecmp(tok,"no-keep-temp-files")==0)
opt.keyserver_options.keep_temp_files=0;
- else if(strcasecmp(tok,"verbose")==0)
+ else if(ascii_strcasecmp(tok,"verbose")==0)
opt.keyserver_options.verbose++;
- else if(strcasecmp(tok,"no-verbose")==0)
+ else if(ascii_strcasecmp(tok,"no-verbose")==0)
opt.keyserver_options.verbose--;
- else if(strcasecmp(tok,"honor-http-proxy")==0)
+ else if(ascii_strcasecmp(tok,"honor-http-proxy")==0)
opt.honor_http_proxy=1;
- else if(strcasecmp(tok,"no-honor-http-proxy")==0)
+ else if(ascii_strcasecmp(tok,"no-honor-http-proxy")==0)
opt.honor_http_proxy=0;
- else if(strcasecmp(tok,"refresh-add-fake-v3-keyids")==0)
+ else if(ascii_strcasecmp(tok,"refresh-add-fake-v3-keyids")==0)
opt.keyserver_options.refresh_add_fake_v3_keyids=1;
- else if(strcasecmp(tok,"no-refresh-add-fake-v3-keyids")==0)
+ else if(ascii_strcasecmp(tok,"no-refresh-add-fake-v3-keyids")==0)
opt.keyserver_options.refresh_add_fake_v3_keyids=0;
- else if(strcasecmp(tok,"auto-key-retrieve")==0)
+ else if(ascii_strcasecmp(tok,"auto-key-retrieve")==0)
opt.keyserver_options.auto_key_retrieve=1;
- else if(strcasecmp(tok,"no-auto-key-retrieve")==0)
+ else if(ascii_strcasecmp(tok,"no-auto-key-retrieve")==0)
opt.keyserver_options.auto_key_retrieve=0;
else if(strlen(tok)>0)
add_to_strlist(&opt.keyserver_options.other,tok);
@@ -466,7 +466,7 @@ keyserver_spawn(int action,STRLIST list,
goto fail; /* i.e. EOF */
}
- if(strncasecmp(line,"VERSION ",8)==0)
+ if(ascii_memcasecmp(line,"VERSION ",8)==0)
{
gotversion=1;
@@ -478,16 +478,16 @@ keyserver_spawn(int action,STRLIST list,
}
}
- if(strncasecmp(line,"PROGRAM ",8)==0)
+ if(ascii_memcasecmp(line,"PROGRAM ",8)==0)
{
line[strlen(line)-1]='\0';
- if(strcasecmp(&line[8],VERSION)!=0)
+ if(ascii_strcasecmp(&line[8],VERSION)!=0)
log_info(_("Warning: keyserver handler from a different "
"version of GnuPG (%s)\n"),&line[8]);
}
/* Currently the only OPTION */
- if(strncasecmp(line,"OPTION OUTOFBAND",16)==0)
+ if(ascii_memcasecmp(line,"OPTION OUTOFBAND",16)==0)
outofband=1;
}
while(line[0]!='\n');
@@ -573,9 +573,9 @@ keyserver_work(int action,STRLIST list,KEYDB_SEARCH_DESC *desc,int count)
#ifndef USE_EXTERNAL_HKP
/* Use the internal HKP code */
- if(strcasecmp(opt.keyserver_scheme,"x-hkp")==0 ||
- strcasecmp(opt.keyserver_scheme,"hkp")==0 ||
- strcasecmp(opt.keyserver_scheme,"x-broken-hkp")==0)
+ if(ascii_strcasecmp(opt.keyserver_scheme,"x-hkp")==0 ||
+ ascii_strcasecmp(opt.keyserver_scheme,"hkp")==0 ||
+ ascii_strcasecmp(opt.keyserver_scheme,"x-broken-hkp")==0)
{
void *stats_handle = import_new_stats_handle ();
@@ -847,10 +847,10 @@ keyserver_refresh(STRLIST users)
scheme, then enable fake v3 keyid generation. */
if(opt.keyserver_options.refresh_add_fake_v3_keyids &&
opt.keyserver_scheme &&
- (strcasecmp(opt.keyserver_scheme,"x-hkp")==0 ||
- strcasecmp(opt.keyserver_scheme,"hkp")==0 ||
- strcasecmp(opt.keyserver_scheme,"x-broken-hkp")==0 ||
- strcasecmp(opt.keyserver_scheme,"mailto")==0))
+ (ascii_strcasecmp(opt.keyserver_scheme,"x-hkp")==0 ||
+ ascii_strcasecmp(opt.keyserver_scheme,"hkp")==0 ||
+ ascii_strcasecmp(opt.keyserver_scheme,"x-broken-hkp")==0 ||
+ ascii_strcasecmp(opt.keyserver_scheme,"mailto")==0))
fakev3=1;
rc=keyidlist(users,&desc,&count,fakev3);
diff --git a/include/ChangeLog b/include/ChangeLog
index 01a57e26a..02cc439dc 100644
--- a/include/ChangeLog
+++ b/include/ChangeLog
@@ -1,3 +1,12 @@
+2002-05-10 Stefan Bellon <[email protected]>
+
+ * mpi.h: New function mpi_debug_alloc_like for M_DEBUG.
+
+ * util.h [__riscos__]: Make use of __func__ that later
+ Norcroft compiler provides.
+
+ * memory.h: Fixed wrong definition of m_alloc_secure_clear.
+
2002-04-23 David Shaw <[email protected]>
* util.h: New function answer_is_yes_no_default() to give a
diff --git a/include/memory.h b/include/memory.h
index 5a405d18b..6a364795b 100644
--- a/include/memory.h
+++ b/include/memory.h
@@ -33,7 +33,7 @@
#define m_alloc(n) m_debug_alloc((n), M_DBGINFO( __LINE__ ) )
#define m_alloc_clear(n) m_debug_alloc_clear((n), M_DBGINFO(__LINE__) )
#define m_alloc_secure(n) m_debug_alloc((n), M_DBGINFO(__LINE__) )
-#define m_alloc_secure_clear(n) m_debug_alloc((n), M_DBGINFO(__LINE__) )
+#define m_alloc_secure_clear(n) m_debug_alloc_secure_clear((n), M_DBGINFO(__LINE__) )
#define m_realloc(n,m) m_debug_realloc((n),(m), M_DBGINFO(__LINE__) )
#define m_free(n) m_debug_free((n), M_DBGINFO(__LINE__) )
#define m_check(n) m_debug_check((n), M_DBGINFO(__LINE__) )
diff --git a/include/mpi.h b/include/mpi.h
index 99bd6a883..80d617b1d 100644
--- a/include/mpi.h
+++ b/include/mpi.h
@@ -88,19 +88,22 @@ typedef struct gcry_mpi *MPI;
/*-- mpiutil.c --*/
#ifdef M_DEBUG
- #define mpi_alloc(n) mpi_debug_alloc((n), M_DBGINFO( __LINE__ ) )
- #define mpi_alloc_secure(n) mpi_debug_alloc_secure((n), M_DBGINFO( __LINE__ ) )
- #define mpi_free(a) mpi_debug_free((a), M_DBGINFO(__LINE__) )
- #define mpi_resize(a,b) mpi_debug_resize((a),(b), M_DBGINFO(__LINE__) )
- #define mpi_copy(a) mpi_debug_copy((a), M_DBGINFO(__LINE__) )
+ #define mpi_alloc(n) mpi_debug_alloc((n), M_DBGINFO( __LINE__ ) )
+ #define mpi_alloc_secure(n) mpi_debug_alloc_secure((n), M_DBGINFO( __LINE__ ) )
+ #define mpi_alloc_like(n) mpi_debug_alloc_like((n), M_DBGINFO( __LINE__ ) )
+ #define mpi_free(a) mpi_debug_free((a), M_DBGINFO(__LINE__) )
+ #define mpi_resize(a,b) mpi_debug_resize((a),(b), M_DBGINFO(__LINE__) )
+ #define mpi_copy(a) mpi_debug_copy((a), M_DBGINFO(__LINE__) )
MPI mpi_debug_alloc( unsigned nlimbs, const char *info );
MPI mpi_debug_alloc_secure( unsigned nlimbs, const char *info );
+ MPI mpi_debug_alloc_like( MPI a, const char *info );
void mpi_debug_free( MPI a, const char *info );
void mpi_debug_resize( MPI a, unsigned nlimbs, const char *info );
MPI mpi_debug_copy( MPI a, const char *info );
#else
MPI mpi_alloc( unsigned nlimbs );
MPI mpi_alloc_secure( unsigned nlimbs );
+ MPI mpi_alloc_like( MPI a );
void mpi_free( MPI a );
void mpi_resize( MPI a, unsigned nlimbs );
MPI mpi_copy( MPI a );
@@ -114,7 +117,6 @@ void *mpi_get_opaque( MPI a, int *len );
#define mpi_is_secure(a) ((a) && ((a)->flags&1))
void mpi_set_secure( MPI a );
void mpi_clear( MPI a );
-MPI mpi_alloc_like( MPI a );
void mpi_set( MPI w, MPI u);
void mpi_set_ui( MPI w, ulong u);
MPI mpi_alloc_set_ui( unsigned long u);
diff --git a/include/util.h b/include/util.h
index 0d90c7e95..908f4b4e0 100644
--- a/include/util.h
+++ b/include/util.h
@@ -72,8 +72,8 @@ int log_get_errorcount( int clear );
void log_inc_errorcount(void);
void g10_log_hexdump( const char *text, const char *buf, size_t len );
-#if !defined (__riscos__) \
- && (__GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 5 ))
+#if defined (__riscos__) \
+ || (__GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 5 ))
void g10_log_bug( const char *fmt, ... )
__attribute__ ((noreturn, format (printf,1,2)));
void g10_log_bug0( const char *, int, const char * ) __attribute__ ((noreturn));
@@ -90,8 +90,12 @@ void g10_log_hexdump( const char *text, const char *buf, size_t len );
__attribute__ ((format (printf,2,3)));
void g10_log_debug_f( const char *fname, const char *fmt, ... )
__attribute__ ((format (printf,2,3)));
+#ifndef __riscos__
#define BUG() g10_log_bug0( __FILE__ , __LINE__, __FUNCTION__ )
#else
+ #define BUG() g10_log_bug0( __FILE__ , __LINE__, __func__ )
+#endif
+#else
void g10_log_bug( const char *fmt, ... );
void g10_log_bug0( const char *, int );
void g10_log_fatal( const char *fmt, ... );
diff --git a/mpi/ChangeLog b/mpi/ChangeLog
index 44237208e..cfe54007c 100644
--- a/mpi/ChangeLog
+++ b/mpi/ChangeLog
@@ -1,3 +1,8 @@
+2002-05-10 Stefan Bellon <[email protected]>
+
+ * mpiutil.c (mpi_alloc_like/mpi_debug_alloc_like): Added code
+ for M_DEBUG.
+
2002-04-18 Werner Koch <[email protected]>
* i386/syntax.h (ALIGN): Removed parens from definition
diff --git a/mpi/mpiutil.c b/mpi/mpiutil.c
index 1bf845a32..04e280caa 100644
--- a/mpi/mpiutil.c
+++ b/mpi/mpiutil.c
@@ -383,7 +383,11 @@ mpi_copy( MPI a )
* with the same flags as A.
*/
MPI
+#ifdef M_DEBUG
+mpi_debug_alloc_like( MPI a, const char *info )
+#else
mpi_alloc_like( MPI a )
+#endif
{
MPI b;
@@ -394,8 +398,13 @@ mpi_alloc_like( MPI a )
b = mpi_set_opaque( NULL, p, a->nbits );
}
else if( a ) {
+ #ifdef M_DEBUG
+ b = mpi_is_secure(a)? mpi_debug_alloc_secure( a->nlimbs, info )
+ : mpi_debug_alloc( a->nlimbs, info );
+ #else
b = mpi_is_secure(a)? mpi_alloc_secure( a->nlimbs )
: mpi_alloc( a->nlimbs );
+ #endif
b->nlimbs = 0;
b->sign = 0;
b->flags = a->flags;
diff --git a/scripts/ChangeLog b/scripts/ChangeLog
index 199283e59..71dda2a95 100644
--- a/scripts/ChangeLog
+++ b/scripts/ChangeLog
@@ -1,3 +1,10 @@
+2002-05-10 Stefan Bellon <[email protected]>
+
+ * conf-riscos/include/config.h [__riscos__]: Changes for later
+ Norcroft compilers.
+
+ * conf-riscos/Makefile [__riscos__]: Updated.
+
2002-04-22 Stefan Bellon <[email protected]>
* conf-riscos/include/config.h [__riscos__]: Development
diff --git a/scripts/conf-riscos/Makefile b/scripts/conf-riscos/Makefile
index 27cd1bd07..da53979ed 100644
--- a/scripts/conf-riscos/Makefile
+++ b/scripts/conf-riscos/Makefile
@@ -5,182 +5,188 @@ AS=objasm
MAKE=amu
DEPEND=-depend !Depend
LIBLDAP=^.^.openldap-2/0/18
-CC_FLAGS=-Wp -apcs 3/26bit -throwback -Otime -IUnix:,include,mpi,intl,zlib,$(LIBLDAP).include -JUnix: -D__riscos__ -DHAVE_CONFIG_H -DNO_ASM -UIS_MODULE -DVERSION="\"$(GnuPG$Version)\"" $(GnuPG$DevDefine)
-AS_FLAGS=-apcs 3/26bit -throwback -predefine "ARMv4 SETA 0"
+CC_FLAGS=-Wp -apcs 3/26bit/fpe2 -throwback -Otime -IUnix:,include,mpi,intl,zlib,$(LIBLDAP).include -JUnix: -D__riscos__ -DHAVE_CONFIG_H -DNO_ASM -UIS_MODULE -DVERSION="\"$(GnuPG$Version)\"" $(GnuPG$DevDefine)
+AS_FLAGS=-apcs 3/26bit/fpe2 -throwback -predefine "ARMv4 SETA 0"
LD_FLAGS=Unix:o.unixlib
-CIPHER_OBJS=cipher.blowfish.o \
- cipher.cast5.o \
- cipher.cipher.o \
- cipher.construct.o \
- cipher.des.o \
- cipher.dsa.o \
- cipher.dynload.o \
- cipher.elgamal.o \
- cipher.g10c.o \
- cipher.md.o \
- cipher.md5.o \
- cipher.primegen.o \
- cipher.pubkey.o \
- cipher.random.o \
- cipher.rijndael.o \
- cipher.rmd160.o \
- cipher.rndriscos.o \
- cipher.rsa.o \
- cipher.sha1.o \
- cipher.smallprime.o \
- cipher.tiger32.o \
- cipher.twofish.o
-GETTEXT_OBJS=intl.bindtextdom.o \
- intl.dcgettext.o \
- intl.dgettext.o \
- intl.explodename.o \
- intl.finddomain.o \
- intl.gettext.o \
- intl.intl-compat.o \
- intl.l10nflist.o \
- intl.loadmsgcat.o \
- intl.localealias.o \
- intl.textdomain.o
-MPI_OBJS=mpi.mpi-add.o \
- mpi.mpi-bit.o \
- mpi.mpi-cmp.o \
- mpi.mpi-div.o \
- mpi.mpi-gcd.o \
- mpi.mpi-inline.o \
- mpi.mpi-inv.o \
- mpi.mpi-mul.o \
- mpi.mpi-pow.o \
- mpi.mpi-mpow.o \
- mpi.mpi-scan.o \
- mpi.mpicoder.o \
- mpi.mpih-div.o \
- mpi.mpih-mul.o \
- mpi.mpiutil.o \
- mpi.g10m.o \
- mpi.arm.mpih.o
-UTIL_OBJS=util.argparse.o \
- util.dotlock.o \
- util.errors.o \
- util.fileutil.o \
- util.g10u.o \
- util.http.o \
- util.iobuf.o \
- util.logger.o \
- util.memory.o \
- util.miscutil.o \
- util.secmem.o \
- util.strgutil.o \
- util.ttyio.o \
- util.riscos.o
-ZLIB_OBJS=zlib.adler32.o \
- zlib.compress.o \
- zlib.crc32.o \
- zlib.deflate.o \
- zlib.infblock.o \
- zlib.infcodes.o \
- zlib.inffast.o \
- zlib.inflate.o \
- zlib.inftrees.o \
- zlib.infutil.o \
- zlib.trees.o \
- zlib.uncompr.o \
- zlib.zutil.o
-G10_OBJS=g10.armor.o \
- g10.build-packet.o \
- g10.cipher.o \
- g10.comment.o \
- g10.compress.o \
- g10.dearmor.o \
- g10.decrypt.o \
- g10.delkey.o \
- g10.encode.o \
- g10.encr-data.o \
- g10.exec.o \
- g10.export.o \
- g10.free-packet.o \
- g10.g10.o \
- g10.getkey.o \
- g10.helptext.o \
- g10.hkp.o \
- g10.import.o \
- g10.kbnode.o \
- g10.keydb.o \
- g10.keyedit.o \
- g10.keygen.o \
- g10.keyid.o \
- g10.keylist.o \
- g10.keyring.o \
- g10.keyserver.o \
- g10.mainproc.o \
- g10.mdfilter.o \
- g10.misc.o \
- g10.mkdtemp.o \
- g10.openfile.o \
- g10.parse-packet.o \
- g10.passphrase.o \
- g10.photoid.o \
- g10.pipemode.o \
- g10.pkclist.o \
- g10.plaintext.o \
- g10.pubkey-enc.o \
- g10.revoke.o \
- g10.seckey-cert.o \
- g10.seskey.o \
- g10.sig-check.o \
- g10.sign.o \
- g10.signal.o \
- g10.skclist.o \
- g10.status.o \
- g10.tdbdump.o \
- g10.tdbio.o \
- g10.textfilter.o \
- g10.trustdb.o \
- g10.verify.o
-GPGV_OBJS=g10.armor.o \
- g10.build-packet.o \
- g10.compress.o \
- g10.free-packet.o \
- g10.getkey.o \
- g10.gpgv.o \
- g10.keydb.o \
- g10.keylist.o \
- g10.kbnode.o \
- g10.keyid.o \
- g10.keyring.o \
- g10.mainproc.o \
- g10.mdfilter.o \
- g10.misc.o \
- g10.openfile.o \
- g10.parse-packet.o \
- g10.plaintext.o \
- g10.seskey.o \
- g10.sig-check.o \
- g10.signal.o \
- g10.status.o \
- g10.textfilter.o \
- g10.verify.o \
- util.argparse.o \
- util.errors.o \
- util.fileutil.o \
- util.g10u.o \
- util.iobuf.o \
- util.logger.o \
- util.memory.o \
- util.miscutil.o \
- util.secmem.o \
- util.strgutil.o \
- util.riscos.o \
- cipher.constructv.o \
- cipher.dsa.o \
- cipher.dynload.o \
- cipher.elgamal.o \
- cipher.g10c.o \
- cipher.md.o \
- cipher.pubkey.o \
- cipher.rmd160.o \
- cipher.rsa.o \
+CIPHER_OBJS=cipher.o.blowfish \
+ cipher.o.cast5 \
+ cipher.o.cipher \
+ cipher.o.construct \
+ cipher.o.des \
+ cipher.o.dsa \
+ cipher.o.dynload \
+ cipher.o.elgamal \
+ cipher.o.g10c \
+ cipher.o.md \
+ cipher.o.md5 \
+ cipher.o.primegen \
+ cipher.o.pubkey \
+ cipher.o.random \
+ cipher.o.rijndael \
+ cipher.o.rmd160 \
+ cipher.o.rndriscos \
+ cipher.o.rsa \
+ cipher.o.sha1 \
+ cipher.o.smallprime \
+ cipher.o.tiger32 \
+ cipher.o.twofish
+GETTEXT_OBJS=intl.o.bindtextdom \
+ intl.o.dcgettext \
+ intl.o.dgettext \
+ intl.o.explodename \
+ intl.o.finddomain \
+ intl.o.gettext \
+ intl.o.intl-compat \
+ intl.o.l10nflist \
+ intl.o.loadmsgcat \
+ intl.o.localealias \
+ intl.o.textdomain
+MPI_OBJS=mpi.o.mpi-add \
+ mpi.o.mpi-bit \
+ mpi.o.mpi-cmp \
+ mpi.o.mpi-div \
+ mpi.o.mpi-gcd \
+ mpi.o.mpi-inline \
+ mpi.o.mpi-inv \
+ mpi.o.mpi-mul \
+ mpi.o.mpi-pow \
+ mpi.o.mpi-mpow \
+ mpi.o.mpi-scan \
+ mpi.o.mpicoder \
+ mpi.o.mpih-div \
+ mpi.o.mpih-mul \
+ mpi.o.mpiutil \
+ mpi.o.g10m \
+ mpi.arm.o.mpih
+UTIL_OBJS=util.o.argparse \
+ util.o.dotlock \
+ util.o.errors \
+ util.o.fileutil \
+ util.o.g10u \
+ util.o.http \
+ util.o.iobuf \
+ util.o.logger \
+ util.o.memory \
+ util.o.miscutil \
+ util.o.secmem \
+ util.o.strgutil \
+ util.o.ttyio \
+ util.o.riscos
+ZLIB_OBJS=zlib.o.adler32 \
+ zlib.o.compress \
+ zlib.o.crc32 \
+ zlib.o.deflate \
+ zlib.o.infblock \
+ zlib.o.infcodes \
+ zlib.o.inffast \
+ zlib.o.inflate \
+ zlib.o.inftrees \
+ zlib.o.infutil \
+ zlib.o.trees \
+ zlib.o.uncompr \
+ zlib.o.zutil
+G10_OBJS=g10.o.armor \
+ g10.o.build-packet \
+ g10.o.cipher \
+ g10.o.comment \
+ g10.o.compress \
+ g10.o.dearmor \
+ g10.o.decrypt \
+ g10.o.delkey \
+ g10.o.encode \
+ g10.o.encr-data \
+ g10.o.exec \
+ g10.o.export \
+ g10.o.free-packet \
+ g10.o.g10 \
+ g10.o.getkey \
+ g10.o.helptext \
+ g10.o.hkp \
+ g10.o.import \
+ g10.o.kbnode \
+ g10.o.keydb \
+ g10.o.keyedit \
+ g10.o.keygen \
+ g10.o.keyid \
+ g10.o.keylist \
+ g10.o.keyring \
+ g10.o.keyserver \
+ g10.o.mainproc \
+ g10.o.mdfilter \
+ g10.o.misc \
+ g10.o.mkdtemp \
+ g10.o.openfile \
+ g10.o.parse-packet \
+ g10.o.passphrase \
+ g10.o.photoid \
+ g10.o.pipemode \
+ g10.o.pkclist \
+ g10.o.plaintext \
+ g10.o.pubkey-enc \
+ g10.o.revoke \
+ g10.o.seckey-cert \
+ g10.o.seskey \
+ g10.o.sig-check \
+ g10.o.sign \
+ g10.o.signal \
+ g10.o.skclist \
+ g10.o.status \
+ g10.o.tdbdump \
+ g10.o.tdbio \
+ g10.o.textfilter \
+ g10.o.trustdb \
+ g10.o.verify
+GPGV_OBJS=g10.o.armor \
+ g10.o.build-packet \
+ g10.o.compress \
+ g10.o.free-packet \
+ g10.o.getkey \
+ g10.o.gpgv \
+ g10.o.keydb \
+ g10.o.keylist \
+ g10.o.kbnode \
+ g10.o.keyid \
+ g10.o.keyring \
+ g10.o.mainproc \
+ g10.o.mdfilter \
+ g10.o.misc \
+ g10.o.openfile \
+ g10.o.parse-packet \
+ g10.o.plaintext \
+ g10.o.seskey \
+ g10.o.sig-check \
+ g10.o.signal \
+ g10.o.status \
+ g10.o.textfilter \
+ g10.o.verify \
+ util.o.argparse \
+ util.o.errors \
+ util.o.fileutil \
+ util.o.g10u \
+ util.o.iobuf \
+ util.o.logger \
+ util.o.memory \
+ util.o.miscutil \
+ util.o.secmem \
+ util.o.strgutil \
+ util.o.riscos \
+ cipher.o.constructv \
+ cipher.o.dsa \
+ cipher.o.dynload \
+ cipher.o.elgamal \
+ cipher.o.g10c \
+ cipher.o.md \
+ cipher.o.pubkey \
+ cipher.o.rmd160 \
+ cipher.o.rsa \
mpi.mpi \
zlib.zlib
+GPGKEYS_OBJS=keyserver.o.gpgkeys_ldap \
+ util.o.strgutil \
+ util.o.memory \
+ util.o.logger \
+ util.o.secmem \
+ intl.gettext
## Rule Patterns ##
@@ -214,8 +220,8 @@ tools.gpgsplit: tools.o.gpgsplit util.util intl.gettext zlib.zlib
-squeeze tools.gpgsplit
-copy tools.gpgsplit ADFS::A5.$.tmp.!GnuPG.gpgsplit ~CF~V
-keyserver.gpgkeys_ldap: keyserver.o.gpgkeys_ldap $(LIBLDAP).libraries.libldap.libldap
- $(LINK) $(LD_FLAGS) keyserver.o.gpgkeys_ldap $(LIBLDAP).libraries.libldap.libldap -o keyserver.gpgkeys_ldap
+keyserver.gpgkeys_ldap: $(GPGKEYS_OBJS) $(LIBLDAP).libraries.libldap.libldap
+ $(LINK) $(LD_FLAGS) $(GPGKEYS_OBJS) $(LIBLDAP).libraries.libldap.libldap -o keyserver.gpgkeys_ldap
-squeeze keyserver.gpgkeys_ldap
-copy keyserver.gpgkeys_ldap ADFS::A5.$.tmp.!GnuPG.gpgkeys_ldap ~CF~V
@@ -239,7 +245,7 @@ g10.gpgv: $(GPGV_OBJS) intl.gettext BUILD
-copy g10.gpgv ADFS::A5.$.tmp.!GnuPG.gpgv ~CFR~V
g10.gpgpart: $(G10_OBJS) cipher.cipher intl.gettext mpi.mpi util.util zlib.zlib BUILD
- drlink -aof $(G10_OBJS) $(LD_FLAGS) cipher.cipher intl.gettext mpi.mpi util.util zlib.zlib -o g10.gpgpart
+ drlink034 -aof $(G10_OBJS) $(LD_FLAGS) cipher.cipher intl.gettext mpi.mpi util.util zlib.zlib -o g10.gpgpart
select-idea-src:
-copy distrib.idea-addon.cipher.c.idea cipher.c.idea ~CF~NR~V
@@ -250,7 +256,6 @@ select-gpl-src:
$(CC) $(CC_FLAGS) $(DEPEND) -c -o cipher.o.idea cipher.c.idea
distrib.gnupgsrc/zip: select-gpl-src
- -stripdepnd
-zip -9@ distrib.gnupgsrc/zip < distrib.resources.distfiles
distrib.gnupg/zip: distrib.gpl-bin.!GnuPG.JPEGview distrib.gpl-bin.!GnuPG.gpgsplit distrib.gpl-bin.!GnuPG.gpg distrib.gpl-bin.!GnuPG.gpgv select-gpl-src
@@ -441,6 +446,7 @@ dist: BUILD clean-version tools.gpgsplit
ifthere <WebServe$ServeRoot>.archives.gnupgpart/zip then wipe <WebServe$ServeRoot>.archives.gnupgpart/zip ~CFR~V
ifthere <WebServe$ServeRoot>.archives.gnupgsrc/zip then wipe <WebServe$ServeRoot>.archives.gnupgsrc/zip ~CFR~V
ifthere <WebServe$ServeRoot>.archives.gnupgintl/zip then wipe <WebServe$ServeRoot>.archives.gnupgintl/zip ~CFR~V
+ ifthere <WebServe$ServeRoot>.archives.gnupgldap/zip then wipe <WebServe$ServeRoot>.archives.gnupgldap/zip ~CFR~V
ifthere <WebServe$ServeRoot>.gnupg_history/txt then wipe <WebServe$ServeRoot>.gnupg_history/txt ~CFR~V
ifthere <WebServe$ServeRoot>.gnupg_news/txt then wipe <WebServe$ServeRoot>.gnupg_news/txt ~CFR~V
rename distrib.gnupgdev/zip <WebServe$ServeRoot>.private.gnupgdev/zip
@@ -449,6 +455,7 @@ dist: BUILD clean-version tools.gpgsplit
rename distrib.gnupgpart/zip <WebServe$ServeRoot>.archives.gnupgpart/zip
rename distrib.gnupgsrc/zip <WebServe$ServeRoot>.archives.gnupgsrc/zip
rename distrib.gnupgintl/zip <WebServe$ServeRoot>.archives.gnupgintl/zip
+ rename distrib.gnupgldap/zip <WebServe$ServeRoot>.archives.gnupgldap/zip
copy distrib.resources.History <WebServe$ServeRoot>.gnupg_history/txt ~CFR~V
copy distrib.resources.orig_docs.NEWS <WebServe$ServeRoot>.gnupg_news/txt ~CFR~V
unset GnuPG$DevDefine
diff --git a/scripts/conf-riscos/include/config.h b/scripts/conf-riscos/include/config.h
index f7258e0d3..92e9ce53c 100644
--- a/scripts/conf-riscos/include/config.h
+++ b/scripts/conf-riscos/include/config.h
@@ -30,7 +30,7 @@
#undef C_ALLOCA
/* Define to empty if the keyword does not work. */
-#undef const
+/* #undef const */
/* Define to one of _getb67, GETB67, getb67 for Cray-2 and Cray-YMP systems.
This function is required for alloca.c support on those systems. */
@@ -52,9 +52,6 @@
/* Define if you have the vprintf function. */
#define HAVE_VPRINTF
-/* Define as __inline if that's what the C compiler calls it. */
-#define inline __inline
-
/* Define to `long' if <sys/types.h> doesn't define. */
#undef off_t
@@ -99,7 +96,7 @@
#undef HAVE_GETTEXT
#undef BIG_ENDIAN_HOST
-#define LITTLE_ENDIAN_HOST
+#define LITTLE_ENDIAN_HOST 1
#undef HAVE_BYTE_TYPEDEF
#undef HAVE_USHORT_TYPEDEF
@@ -360,18 +357,25 @@
/* Name of package */
#define PACKAGE "GnuPG"
-/* Version number of package */
-/* no more needed here as set in the Makefile
-#define VERSION "1.0.4"
-#define IS_DEVELOPMENT_VERSION
-*/
/* define if compiled symbols have a leading underscore */
#define WITH_SYMBOL_UNDERSCORE
#ifdef IS_DEVELOPMENT_VERSION
- #define M_GUARD
#define DEBUG
+/* #define M_DEBUG */
+ #define M_GUARD
+#endif
+
+
+/* RISC OS specifica */
+#if (__CC_NORCROFT == 1) /* Norcroft */
+# define __attribute__(x)
+# if (__CC_NORCROFT_VERSION < 544) /* old version of Norcroft */
+# define inline __inline
+# define __func__ "[" __FILE__ ":" __LINE__ "]"
+# endif
+#else /* gcc */
#endif
#include "g10defs.h"
diff --git a/util/ChangeLog b/util/ChangeLog
index d8553456f..673476291 100644
--- a/util/ChangeLog
+++ b/util/ChangeLog
@@ -1,3 +1,15 @@
+2002-05-10 Stefan Bellon <[email protected]>
+
+ * memory.c (add_entry) [M_DEBUG]: Added some missing EXTRA_ALIGN.
+ (free_entry) [M_DEBUG]: Free secure memory via secmem_free.
+ (alloc_secure): Malloc at least 1 byte.
+ (realloc) [M_GUARD]: Added missing FNAMEARG to function call.
+
+ * logger.c (g10_log_bug0) [__riscos__]: Make use of first
+ g10_log_bug0 function for later Norcroft compiler.
+
+ * riscos.c: Added stdlib.h include.
+
2002-05-04 Werner Koch <[email protected]>
* http.c (write_server) [__MINGW32__]: Replaced WriteFile by send
diff --git a/util/logger.c b/util/logger.c
index 2e9fad5c6..a51455798 100644
--- a/util/logger.c
+++ b/util/logger.c
@@ -241,8 +241,8 @@ g10_log_bug( const char *fmt, ... )
abort();
}
-#if !defined (__riscos__) \
- && ( __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 5 ))
+#if defined (__riscos__) \
+ || ( __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 5 ))
void
g10_log_bug0( const char *file, int line, const char *func )
{
diff --git a/util/memory.c b/util/memory.c
index fb099f852..9fab9ea3b 100644
--- a/util/memory.c
+++ b/util/memory.c
@@ -78,7 +78,7 @@
info, __FUNCTION__); } while(0)
#else
#define store_len(p,n,m) do { add_entry(p,n,m, \
- info, "[" __FILE__ ":" STR(__LINE__) "]" ); } while(0)
+ info, __func__ ); } while(0)
#endif
#else
#define FNAME(a) m_ ##a
@@ -175,7 +175,7 @@ add_entry( byte *p, unsigned n, int mode, const char *info, const char *by )
e = memtbl+index;
if( e->inuse )
membug("Ooops: entry %u is flagged as in use\n", index);
- e->user_p = p + 4;
+ e->user_p = p + EXTRA_ALIGN + 4;
e->user_n = n;
e->count++;
if( e->next )
@@ -197,10 +197,10 @@ add_entry( byte *p, unsigned n, int mode, const char *info, const char *by )
e->inuse = 1;
/* put the index at the start of the memory */
- p[0] = index;
- p[1] = index >> 8 ;
- p[2] = index >> 16 ;
- p[3] = mode? MAGIC_SEC_BYTE : MAGIC_NOR_BYTE ;
+ p[EXTRA_ALIGN+0] = index;
+ p[EXTRA_ALIGN+1] = index >> 8 ;
+ p[EXTRA_ALIGN+2] = index >> 16 ;
+ p[EXTRA_ALIGN+3] = mode? MAGIC_SEC_BYTE : MAGIC_NOR_BYTE ;
if( DBG_MEMORY )
log_debug( "%s allocates %u bytes using %s\n", info, e->user_n, by );
}
@@ -277,8 +277,12 @@ free_entry( byte *p, const char *info )
;
e2->next = e;
}
- memset(p,'f', e->user_n+5);
- free(p);
+ if( m_is_secure(p+EXTRA_ALIGN+4) )
+ secmem_free(p);
+ else {
+ memset(p,'f', e->user_n+5);
+ free(p);
+ }
}
static void
@@ -444,12 +448,18 @@ FNAME(alloc_secure)( size_t n FNAMEPRT )
char *p;
#ifdef M_GUARD
+ if(!n)
+ out_of_core(n,1); /* should never happen */
if( !(p = secmem_malloc( n +EXTRA_ALIGN+ 5 )) )
out_of_core(n,1);
store_len(p,n,1);
p[4+EXTRA_ALIGN+n] = MAGIC_END_BYTE;
return p+EXTRA_ALIGN+4;
#else
+ /* mallocing zero bytes is undefined by ISO-C, so we better make
+ sure that it won't happen */
+ if (!n)
+ n = 1;
if( !(p = secmem_malloc( n )) )
out_of_core(n,1);
return p;
@@ -499,7 +509,7 @@ FNAME(realloc)( void *a, size_t n FNAMEPRT )
FNAME(free)(p FNAMEARG);
}
else
- b = FNAME(alloc)(n);
+ b = FNAME(alloc)(n FNAMEARG);
#else
if( m_is_secure(a) ) {
if( !(b = secmem_realloc( a, n )) )
diff --git a/util/riscos.c b/util/riscos.c
index 2b4e92bd5..65b8d10bb 100644
--- a/util/riscos.c
+++ b/util/riscos.c
@@ -22,6 +22,7 @@
#define __RISCOS__C__
#include <config.h>
+#include <stdlib.h>
#include <stdarg.h>
#include <sys/types.h>
#include <sys/stat.h>