mirror of
git://git.gnupg.org/gnupg.git
synced 2025-03-07 22:01:07 +01:00
RISC OS changes due to dynload removal
This commit is contained in:
parent
85aa3e18c2
commit
582f0d5d98
cipher
include
keyserver
scripts
util
@ -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>
|
2002-08-03 Werner Koch <wk@gnupg.org>
|
||||||
|
|
||||||
* rndegd.c (do_read): Handle case when read returns 0 to avoid
|
* rndegd.c (do_read): Handle case when read returns 0 to avoid
|
||||||
|
@ -148,6 +148,13 @@ load_module (const char *name)
|
|||||||
return NULL;
|
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 *
|
const char *
|
||||||
idea_get_info( int algo, size_t *keylen,
|
idea_get_info( int algo, size_t *keylen,
|
||||||
@ -170,7 +177,11 @@ idea_get_info( int algo, size_t *keylen,
|
|||||||
initialized = 1;
|
initialized = 1;
|
||||||
for (i=0; (rstr = dynload_enum_module_names (i)); i++)
|
for (i=0; (rstr = dynload_enum_module_names (i)); i++)
|
||||||
{
|
{
|
||||||
|
#ifndef __riscos__
|
||||||
info_fnc = load_module (rstr);
|
info_fnc = load_module (rstr);
|
||||||
|
#else /* __riscos__ */
|
||||||
|
info_fnc = (INFO_CAST) load_module (rstr);
|
||||||
|
#endif /* __riscos__ */
|
||||||
if (info_fnc)
|
if (info_fnc)
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
@ -140,6 +140,9 @@ getfnc_gather_random (void))(void (*)(const void*, size_t, int), int,
|
|||||||
#endif
|
#endif
|
||||||
#ifdef USE_RNDW32
|
#ifdef USE_RNDW32
|
||||||
return rndw32_gather_random;
|
return rndw32_gather_random;
|
||||||
|
#endif
|
||||||
|
#ifdef USE_RNDRISCOS
|
||||||
|
return rndriscos_gather_random;
|
||||||
#endif
|
#endif
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
@ -19,6 +19,9 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
#include <config.h>
|
#include <config.h>
|
||||||
|
|
||||||
|
#ifdef USE_RNDRISCOS
|
||||||
|
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include <errno.h>
|
#include <errno.h>
|
||||||
@ -26,11 +29,9 @@
|
|||||||
#include <kernel.h>
|
#include <kernel.h>
|
||||||
#include <swis.h>
|
#include <swis.h>
|
||||||
#include "util.h"
|
#include "util.h"
|
||||||
#include "dynload.h"
|
#include "algorithms.h"
|
||||||
|
|
||||||
static int init_device(void);
|
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
|
#define CryptRandom_Byte 0x51980
|
||||||
|
|
||||||
@ -67,9 +68,9 @@ init_device(void)
|
|||||||
|
|
||||||
/****************
|
/****************
|
||||||
*/
|
*/
|
||||||
static int
|
int
|
||||||
gather_random(void (*add)(const void*, size_t, int), int requester,
|
rndriscos_gather_random(void (*add)(const void*, size_t, int), int requester,
|
||||||
size_t length, int level)
|
size_t length, int level)
|
||||||
{
|
{
|
||||||
static int initialized = 0;
|
static int initialized = 0;
|
||||||
int n;
|
int n;
|
||||||
@ -97,51 +98,4 @@ gather_random(void (*add)(const void*, size_t, int), int requester,
|
|||||||
return 0; /* success */
|
return 0; /* success */
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#endif /*USE_RNDRISCOS */
|
||||||
|
|
||||||
#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
|
|
||||||
|
|
||||||
|
@ -264,7 +264,7 @@ int vasprintf ( char **result, const char *format, va_list args);
|
|||||||
#include <unixlib/local.h>
|
#include <unixlib/local.h>
|
||||||
/* needed for image file system feature */
|
/* needed for image file system feature */
|
||||||
#include <unixlib/features.h>
|
#include <unixlib/features.h>
|
||||||
void riscos_global_defaults();
|
void riscos_global_defaults(void);
|
||||||
#define RISCOS_GLOBAL_STATICS(a) const char *__dynamic_da_name = (a);
|
#define RISCOS_GLOBAL_STATICS(a) const char *__dynamic_da_name = (a);
|
||||||
void riscos_set_filetype(const char *filename, const char *mimetype);
|
void riscos_set_filetype(const char *filename, const char *mimetype);
|
||||||
pid_t riscos_getpid(void);
|
pid_t riscos_getpid(void);
|
||||||
|
@ -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>
|
2002-07-25 David Shaw <dshaw@jabberwocky.com>
|
||||||
|
|
||||||
* gpgkeys_hkp.c: "Warning" -> "WARNING"
|
* gpgkeys_hkp.c: "Warning" -> "WARNING"
|
||||||
|
@ -32,7 +32,7 @@
|
|||||||
#include "keyserver.h"
|
#include "keyserver.h"
|
||||||
|
|
||||||
#ifdef __riscos__
|
#ifdef __riscos__
|
||||||
#include <unixlib/local.h>
|
#include "util.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#define GET 0
|
#define GET 0
|
||||||
@ -54,6 +54,10 @@ struct keylist
|
|||||||
struct keylist *next;
|
struct keylist *next;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
#ifdef __riscos__
|
||||||
|
RISCOS_GLOBAL_STATICS("LDAP Keyfetcher Heap")
|
||||||
|
#endif /* __riscos__ */
|
||||||
|
|
||||||
/* Returns 0 on success, -1 on failure, and 1 on eof */
|
/* Returns 0 on success, -1 on failure, and 1 on eof */
|
||||||
int send_key(void)
|
int send_key(void)
|
||||||
{
|
{
|
||||||
@ -621,7 +625,7 @@ int main(int argc,char *argv[])
|
|||||||
struct keylist *keylist=NULL,*keyptr=NULL;
|
struct keylist *keylist=NULL,*keyptr=NULL;
|
||||||
|
|
||||||
#ifdef __riscos__
|
#ifdef __riscos__
|
||||||
__riscosify_control = __RISCOSIFY_NO_PROCESS;
|
riscos_global_defaults();
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
console=stderr;
|
console=stderr;
|
||||||
|
@ -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>
|
2002-07-25 David Shaw <dshaw@jabberwocky.com>
|
||||||
|
|
||||||
* gnupgbug: "Warning" -> "WARNING"
|
* gnupgbug: "Warning" -> "WARNING"
|
||||||
|
@ -5,13 +5,12 @@ AS=objasm
|
|||||||
MAKE=amu
|
MAKE=amu
|
||||||
DEPEND=-depend !Depend
|
DEPEND=-depend !Depend
|
||||||
LIBLDAP=^.^.openldap-2/0/18
|
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)
|
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/fpe2 -throwback -predefine "ARMv4 SETA 0"
|
AS_FLAGS=-apcs 3/26bit -throwback -predefine "ARMv4 SETA 0"
|
||||||
LD_FLAGS=Unix:o.unixlib
|
LD_FLAGS=Unix:o.unixlib
|
||||||
CIPHER_OBJS=cipher.o.blowfish \
|
CIPHER_OBJS=cipher.o.blowfish \
|
||||||
cipher.o.cast5 \
|
cipher.o.cast5 \
|
||||||
cipher.o.cipher \
|
cipher.o.cipher \
|
||||||
cipher.o.construct \
|
|
||||||
cipher.o.des \
|
cipher.o.des \
|
||||||
cipher.o.dsa \
|
cipher.o.dsa \
|
||||||
cipher.o.dynload \
|
cipher.o.dynload \
|
||||||
@ -170,15 +169,17 @@ GPGV_OBJS=g10.o.armor \
|
|||||||
util.o.secmem \
|
util.o.secmem \
|
||||||
util.o.strgutil \
|
util.o.strgutil \
|
||||||
util.o.riscos \
|
util.o.riscos \
|
||||||
cipher.o.constructv \
|
|
||||||
cipher.o.dsa \
|
cipher.o.dsa \
|
||||||
cipher.o.dynload \
|
cipher.o.dynload \
|
||||||
cipher.o.elgamal \
|
cipher.o.elgamal \
|
||||||
cipher.o.g10c \
|
cipher.o.g10c \
|
||||||
cipher.o.md \
|
cipher.o.md \
|
||||||
|
cipher.o.md5 \
|
||||||
cipher.o.pubkey \
|
cipher.o.pubkey \
|
||||||
cipher.o.rmd160 \
|
cipher.o.rmd160 \
|
||||||
cipher.o.rsa \
|
cipher.o.rsa \
|
||||||
|
cipher.o.sha1 \
|
||||||
|
cipher.o.tiger32 \
|
||||||
mpi.mpi \
|
mpi.mpi \
|
||||||
zlib.zlib
|
zlib.zlib
|
||||||
GPGKEYS_OBJS=util.o.riscos \
|
GPGKEYS_OBJS=util.o.riscos \
|
||||||
@ -375,7 +376,7 @@ clean-g10:
|
|||||||
-ifthere g10.o.* then wipe g10.o.* ~CFR~V
|
-ifthere g10.o.* then wipe g10.o.* ~CFR~V
|
||||||
|
|
||||||
clean-keyserver:
|
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
|
-ifthere keyserver.o.* then wipe keyserver.o.* ~CFR~V
|
||||||
|
|
||||||
clean-tools:
|
clean-tools:
|
||||||
|
@ -84,16 +84,16 @@
|
|||||||
#define PRINTABLE_OS_NAME "RISC OS"
|
#define PRINTABLE_OS_NAME "RISC OS"
|
||||||
|
|
||||||
/* Define if your locale.h file contains LC_MESSAGES. */
|
/* 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 to 1 if NLS is requested. */
|
||||||
#define ENABLE_NLS 1
|
#define ENABLE_NLS 1
|
||||||
|
|
||||||
/* Define as 1 if you have catgets and don't want to use GNU gettext. */
|
/* 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. */
|
/* 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
|
#undef BIG_ENDIAN_HOST
|
||||||
#define LITTLE_ENDIAN_HOST 1
|
#define LITTLE_ENDIAN_HOST 1
|
||||||
@ -175,7 +175,7 @@
|
|||||||
#undef HAVE_CLOCK_GETTIME
|
#undef HAVE_CLOCK_GETTIME
|
||||||
|
|
||||||
/* Define if you have the dcgettext function. */
|
/* Define if you have the dcgettext function. */
|
||||||
#undef HAVE_DCGETTEXT
|
#define HAVE_DCGETTEXT 0
|
||||||
|
|
||||||
/* Define if you have the dlopen function. */
|
/* Define if you have the dlopen function. */
|
||||||
#undef HAVE_DLOPEN
|
#undef HAVE_DLOPEN
|
||||||
@ -367,9 +367,13 @@
|
|||||||
#define M_GUARD
|
#define M_GUARD
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#define USE_RNDRISCOS
|
||||||
|
|
||||||
/* RISC OS specifica */
|
/* RISC OS specifica */
|
||||||
#if (__CC_NORCROFT == 1) /* Norcroft */
|
#if (__CC_NORCROFT == 1) /* Norcroft */
|
||||||
|
# undef __GNUC__
|
||||||
|
# define __GNUC_MINOR__ 0
|
||||||
|
# define __GLIBC__ 0
|
||||||
# define __attribute__(x)
|
# define __attribute__(x)
|
||||||
# if (__CC_NORCROFT_VERSION < 544) /* old version of Norcroft */
|
# if (__CC_NORCROFT_VERSION < 544) /* old version of Norcroft */
|
||||||
# define inline __inline
|
# define inline __inline
|
||||||
|
@ -21,6 +21,7 @@
|
|||||||
/* Path variables and filing system constants for RISC OS */
|
/* Path variables and filing system constants for RISC OS */
|
||||||
#define G10_LOCALEDIR "<GnuPG$Dir>.locale"
|
#define G10_LOCALEDIR "<GnuPG$Dir>.locale"
|
||||||
#define GNUPG_LIBDIR "<GnuPG$Dir>"
|
#define GNUPG_LIBDIR "<GnuPG$Dir>"
|
||||||
|
#define GNUPG_LIBEXECDIR "<GnuPG$Dir>"
|
||||||
#define GNUPG_DATADIR "<GnuPG$Dir>"
|
#define GNUPG_DATADIR "<GnuPG$Dir>"
|
||||||
#define GNUPG_HOMEDIR "<GnuPGUser$Dir>"
|
#define GNUPG_HOMEDIR "<GnuPGUser$Dir>"
|
||||||
#define LOCALE_ALIAS_PATH "<GnuPG$Dir>.locale"
|
#define LOCALE_ALIAS_PATH "<GnuPG$Dir>.locale"
|
||||||
|
@ -96,7 +96,7 @@ riscos_set_filetype_by_number(const char *filename, int type)
|
|||||||
/* exported RISC OS functions */
|
/* exported RISC OS functions */
|
||||||
|
|
||||||
void
|
void
|
||||||
riscos_global_defaults()
|
riscos_global_defaults(void)
|
||||||
{
|
{
|
||||||
__riscosify_control = __RISCOSIFY_NO_PROCESS;
|
__riscosify_control = __RISCOSIFY_NO_PROCESS;
|
||||||
__feature_imagefs_is_file = 1;
|
__feature_imagefs_is_file = 1;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user