summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--cipher/ChangeLog8
-rw-r--r--cipher/idea-stub.c11
-rw-r--r--cipher/random.c3
-rw-r--r--cipher/rndriscos.c62
-rw-r--r--include/util.h2
-rw-r--r--keyserver/ChangeLog4
-rw-r--r--keyserver/gpgkeys_ldap.c8
-rw-r--r--scripts/ChangeLog9
-rw-r--r--scripts/conf-riscos/Makefile11
-rw-r--r--scripts/conf-riscos/include/config.h12
-rw-r--r--scripts/conf-riscos/include/g10defs.h1
-rw-r--r--util/riscos.c2
12 files changed, 66 insertions, 67 deletions
diff --git a/cipher/ChangeLog b/cipher/ChangeLog
index 6599a51bc..98b40ded2 100644
--- a/cipher/ChangeLog
+++ b/cipher/ChangeLog
@@ -1,3 +1,11 @@
+2002-08-03 Stefan Bellon <sbellon@sbellon.de>
+
+ * idea-stub.c (idea_get_info): RISC OS' Norcroft C needs a cast.
+
+ * random.c (getfnc_gather_random): Added RISC OS support.
+
+ * rndriscos.c: Removed dynload code.
+
2002-08-03 Werner Koch <wk@gnupg.org>
* rndegd.c (do_read): Handle case when read returns 0 to avoid
diff --git a/cipher/idea-stub.c b/cipher/idea-stub.c
index 3a9782037..9dd0ced30 100644
--- a/cipher/idea-stub.c
+++ b/cipher/idea-stub.c
@@ -148,6 +148,13 @@ load_module (const char *name)
return NULL;
}
+#ifdef __riscos__
+typedef
+const char *(*INFO_CAST)(int, size_t*, size_t*, size_t*,
+ int (**)( void *, byte *, unsigned),
+ void (**)( void *, byte *, byte *),
+ void (**)( void *, byte *, byte *));
+#endif /* __riscos__ */
const char *
idea_get_info( int algo, size_t *keylen,
@@ -170,7 +177,11 @@ idea_get_info( int algo, size_t *keylen,
initialized = 1;
for (i=0; (rstr = dynload_enum_module_names (i)); i++)
{
+#ifndef __riscos__
info_fnc = load_module (rstr);
+#else /* __riscos__ */
+ info_fnc = (INFO_CAST) load_module (rstr);
+#endif /* __riscos__ */
if (info_fnc)
break;
}
diff --git a/cipher/random.c b/cipher/random.c
index 1d7bf8a93..d7ebf5787 100644
--- a/cipher/random.c
+++ b/cipher/random.c
@@ -141,6 +141,9 @@ getfnc_gather_random (void))(void (*)(const void*, size_t, int), int,
#ifdef USE_RNDW32
return rndw32_gather_random;
#endif
+#ifdef USE_RNDRISCOS
+ return rndriscos_gather_random;
+#endif
return NULL;
}
diff --git a/cipher/rndriscos.c b/cipher/rndriscos.c
index 47144517a..3aa16d523 100644
--- a/cipher/rndriscos.c
+++ b/cipher/rndriscos.c
@@ -19,6 +19,9 @@
*/
#include <config.h>
+
+#ifdef USE_RNDRISCOS
+
#include <stdio.h>
#include <stdlib.h>
#include <errno.h>
@@ -26,11 +29,9 @@
#include <kernel.h>
#include <swis.h>
#include "util.h"
-#include "dynload.h"
+#include "algorithms.h"
static int init_device(void);
-static int gather_random(void (*add)(const void*, size_t, int), int requester,
- size_t length, int level);
#define CryptRandom_Byte 0x51980
@@ -67,9 +68,9 @@ init_device(void)
/****************
*/
-static int
-gather_random(void (*add)(const void*, size_t, int), int requester,
- size_t length, int level)
+int
+rndriscos_gather_random(void (*add)(const void*, size_t, int), int requester,
+ size_t length, int level)
{
static int initialized = 0;
int n;
@@ -97,51 +98,4 @@ gather_random(void (*add)(const void*, size_t, int), int requester,
return 0; /* success */
}
-
-
-#ifndef IS_MODULE
-static
-#endif
-const char * const gnupgext_version = "RNDRISCOS ($Revision$)";
-
-static struct {
- int class;
- int version;
- int (*func)(void);
-} func_table[] = {
- { 40, 1, (int (*)(void))gather_random },
-};
-
-
-#ifndef IS_MODULE
-static
-#endif
-void *
-gnupgext_enum_func( int what, int *sequence, int *class, int *vers )
-{
- void *ret;
- int i = *sequence;
-
- do {
- if ( i >= DIM(func_table) || i < 0 ) {
- return NULL;
- }
- *class = func_table[i].class;
- *vers = func_table[i].version;
- ret = (void*) func_table[i].func;
- i++;
- } while ( what && what != *class );
-
- *sequence = i;
- return ret;
-}
-
-#ifndef IS_MODULE
-void
-rndriscos_constructor(void)
-{
- register_internal_cipher_extension( gnupgext_version,
- gnupgext_enum_func );
-}
-#endif
-
+#endif /*USE_RNDRISCOS */
diff --git a/include/util.h b/include/util.h
index 1d0e4edd5..97a19ce3f 100644
--- a/include/util.h
+++ b/include/util.h
@@ -264,7 +264,7 @@ int vasprintf ( char **result, const char *format, va_list args);
#include <unixlib/local.h>
/* needed for image file system feature */
#include <unixlib/features.h>
-void riscos_global_defaults();
+void riscos_global_defaults(void);
#define RISCOS_GLOBAL_STATICS(a) const char *__dynamic_da_name = (a);
void riscos_set_filetype(const char *filename, const char *mimetype);
pid_t riscos_getpid(void);
diff --git a/keyserver/ChangeLog b/keyserver/ChangeLog
index 600d722c3..5826910cf 100644
--- a/keyserver/ChangeLog
+++ b/keyserver/ChangeLog
@@ -1,3 +1,7 @@
+2002-08-03 Stefan Bellon <sbellon@sbellon.de>
+
+ * gpgkeys_ldap.c: Tidied up RISC OS initializations.
+
2002-07-25 David Shaw <dshaw@jabberwocky.com>
* gpgkeys_hkp.c: "Warning" -> "WARNING"
diff --git a/keyserver/gpgkeys_ldap.c b/keyserver/gpgkeys_ldap.c
index f6b9d2528..1981ace4e 100644
--- a/keyserver/gpgkeys_ldap.c
+++ b/keyserver/gpgkeys_ldap.c
@@ -32,7 +32,7 @@
#include "keyserver.h"
#ifdef __riscos__
-#include <unixlib/local.h>
+#include "util.h"
#endif
#define GET 0
@@ -54,6 +54,10 @@ struct keylist
struct keylist *next;
};
+#ifdef __riscos__
+RISCOS_GLOBAL_STATICS("LDAP Keyfetcher Heap")
+#endif /* __riscos__ */
+
/* Returns 0 on success, -1 on failure, and 1 on eof */
int send_key(void)
{
@@ -621,7 +625,7 @@ int main(int argc,char *argv[])
struct keylist *keylist=NULL,*keyptr=NULL;
#ifdef __riscos__
- __riscosify_control = __RISCOSIFY_NO_PROCESS;
+ riscos_global_defaults();
#endif
console=stderr;
diff --git a/scripts/ChangeLog b/scripts/ChangeLog
index 99fd66604..41145b026 100644
--- a/scripts/ChangeLog
+++ b/scripts/ChangeLog
@@ -1,3 +1,12 @@
+2002-08-03 Stefan Bellon <sbellon@sbellon.de>
+
+ * conf-riscos/include/g10defs.h: Added GNUPG_LIBEXECDIR.
+
+ * conf-riscos/include/config.h: Changes due to dynload removal and
+ minor changes to avoid some warnings.
+
+ * conf-riscos/Makefile: Changes due to dynload removal.
+
2002-07-25 David Shaw <dshaw@jabberwocky.com>
* gnupgbug: "Warning" -> "WARNING"
diff --git a/scripts/conf-riscos/Makefile b/scripts/conf-riscos/Makefile
index 3461fa196..eeb6206c6 100644
--- a/scripts/conf-riscos/Makefile
+++ b/scripts/conf-riscos/Makefile
@@ -5,13 +5,12 @@ AS=objasm
MAKE=amu
DEPEND=-depend !Depend
LIBLDAP=^.^.openldap-2/0/18
-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"
+CC_FLAGS=-Wpc -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 -throwback -predefine "ARMv4 SETA 0"
LD_FLAGS=Unix:o.unixlib
CIPHER_OBJS=cipher.o.blowfish \
cipher.o.cast5 \
cipher.o.cipher \
- cipher.o.construct \
cipher.o.des \
cipher.o.dsa \
cipher.o.dynload \
@@ -170,15 +169,17 @@ GPGV_OBJS=g10.o.armor \
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.md5 \
cipher.o.pubkey \
cipher.o.rmd160 \
cipher.o.rsa \
+ cipher.o.sha1 \
+ cipher.o.tiger32 \
mpi.mpi \
zlib.zlib
GPGKEYS_OBJS=util.o.riscos \
@@ -375,7 +376,7 @@ clean-g10:
-ifthere g10.o.* then wipe g10.o.* ~CFR~V
clean-keyserver:
- -ifthere keyserver.gpgkeys_* then wipe keyserver.gpgkeys_* ~CFR~V
+ -ifthere keyserver.gpgkeys_ldap then wipe keyserver.gpgkeys_ldap ~CFR~V
-ifthere keyserver.o.* then wipe keyserver.o.* ~CFR~V
clean-tools:
diff --git a/scripts/conf-riscos/include/config.h b/scripts/conf-riscos/include/config.h
index 6a3440235..faa7fe852 100644
--- a/scripts/conf-riscos/include/config.h
+++ b/scripts/conf-riscos/include/config.h
@@ -84,16 +84,16 @@
#define PRINTABLE_OS_NAME "RISC OS"
/* Define if your locale.h file contains LC_MESSAGES. */
-#undef HAVE_LC_MESSAGES
+#define HAVE_LC_MESSAGES
/* Define to 1 if NLS is requested. */
#define ENABLE_NLS 1
/* Define as 1 if you have catgets and don't want to use GNU gettext. */
-#undef HAVE_CATGETS
+#define HAVE_CATGETS 0
/* Define as 1 if you have gettext and don't want to use GNU gettext. */
-#undef HAVE_GETTEXT
+#define HAVE_GETTEXT 0
#undef BIG_ENDIAN_HOST
#define LITTLE_ENDIAN_HOST 1
@@ -175,7 +175,7 @@
#undef HAVE_CLOCK_GETTIME
/* Define if you have the dcgettext function. */
-#undef HAVE_DCGETTEXT
+#define HAVE_DCGETTEXT 0
/* Define if you have the dlopen function. */
#undef HAVE_DLOPEN
@@ -367,9 +367,13 @@
#define M_GUARD
#endif
+#define USE_RNDRISCOS
/* RISC OS specifica */
#if (__CC_NORCROFT == 1) /* Norcroft */
+# undef __GNUC__
+# define __GNUC_MINOR__ 0
+# define __GLIBC__ 0
# define __attribute__(x)
# if (__CC_NORCROFT_VERSION < 544) /* old version of Norcroft */
# define inline __inline
diff --git a/scripts/conf-riscos/include/g10defs.h b/scripts/conf-riscos/include/g10defs.h
index a02dff42a..46acdbfe1 100644
--- a/scripts/conf-riscos/include/g10defs.h
+++ b/scripts/conf-riscos/include/g10defs.h
@@ -21,6 +21,7 @@
/* Path variables and filing system constants for RISC OS */
#define G10_LOCALEDIR "<GnuPG$Dir>.locale"
#define GNUPG_LIBDIR "<GnuPG$Dir>"
+#define GNUPG_LIBEXECDIR "<GnuPG$Dir>"
#define GNUPG_DATADIR "<GnuPG$Dir>"
#define GNUPG_HOMEDIR "<GnuPGUser$Dir>"
#define LOCALE_ALIAS_PATH "<GnuPG$Dir>.locale"
diff --git a/util/riscos.c b/util/riscos.c
index e0844a205..18d15c2d7 100644
--- a/util/riscos.c
+++ b/util/riscos.c
@@ -96,7 +96,7 @@ riscos_set_filetype_by_number(const char *filename, int type)
/* exported RISC OS functions */
void
-riscos_global_defaults()
+riscos_global_defaults(void)
{
__riscosify_control = __RISCOSIFY_NO_PROCESS;
__feature_imagefs_is_file = 1;