Add the configuration target VxWorks.
This commit is contained in:
parent
8f06b00373
commit
3e83e686ba
12 changed files with 102 additions and 21 deletions
|
@ -533,6 +533,9 @@ my %table=(
|
|||
##### OS/2 EMX
|
||||
"OS2-EMX", "gcc::::::::",
|
||||
|
||||
##### VxWorks for various targets
|
||||
"vxworks-ppc405","ccppc:-g -msoft-float -mlongcall -DCPU=PPC405 -I\$(WIND_BASE)/target/h:::VXWORKS:-r:::::",
|
||||
|
||||
);
|
||||
|
||||
my @WinTargets=qw(VC-NT VC-WIN32 VC-WIN16 VC-W31-16 VC-W31-32 VC-MSDOS BC-32
|
||||
|
|
|
@ -90,7 +90,7 @@
|
|||
# else
|
||||
# include <unixlib.h>
|
||||
# endif
|
||||
# else
|
||||
# elif !defined(OPENSSL_SYS_VXWORKS)
|
||||
# include <sys/file.h>
|
||||
# endif
|
||||
#endif
|
||||
|
|
|
@ -85,7 +85,7 @@
|
|||
#include OPENSSL_UNISTD
|
||||
#endif
|
||||
|
||||
#if !defined(OPENSSL_SYS_MSDOS) && (!defined(OPENSSL_SYS_VMS) || defined(__DECC)) && !defined(OPENSSL_SYS_MACOSX)
|
||||
#if !defined(OPENSSL_SYS_MSDOS) && !defined(OPENSSL_SYS_VXWORKS) && (!defined(OPENSSL_SYS_VMS) || defined(__DECC)) && !defined(OPENSSL_SYS_MACOSX)
|
||||
#define TIMES
|
||||
#endif
|
||||
|
||||
|
@ -105,7 +105,7 @@
|
|||
#undef TIMES
|
||||
#endif
|
||||
|
||||
#ifndef TIMES
|
||||
#if !defined(TIMES) && !defined(OPENSSL_SYS_VXWORKS)
|
||||
#include <sys/timeb.h>
|
||||
#endif
|
||||
|
||||
|
@ -150,6 +150,8 @@
|
|||
#undef BUFSIZZ
|
||||
#define BUFSIZZ 1024*10
|
||||
|
||||
#undef min
|
||||
#undef max
|
||||
#define min(a,b) (((a) < (b)) ? (a) : (b))
|
||||
#define max(a,b) (((a) > (b)) ? (a) : (b))
|
||||
|
||||
|
@ -379,6 +381,22 @@ static double tm_Time_F(int s)
|
|||
ret=((double)(tend.tms_utime-tstart.tms_utime))/HZ;
|
||||
return((ret == 0.0)?1e-6:ret);
|
||||
}
|
||||
#elif defined(OPENSSL_SYS_VXWORKS)
|
||||
{
|
||||
static unsigned long tick_start, tick_end;
|
||||
|
||||
if( s == START )
|
||||
{
|
||||
tick_start = tickGet();
|
||||
return 0;
|
||||
}
|
||||
else
|
||||
{
|
||||
tick_end = tickGet();
|
||||
ret = (double)(tick_end - tick_start) / (double)sysClkRateGet();
|
||||
return((ret == 0.0)?1e-6:ret);
|
||||
}
|
||||
}
|
||||
#else /* !times() */
|
||||
static struct timeb tstart,tend;
|
||||
long i;
|
||||
|
|
24
apps/speed.c
24
apps/speed.c
|
@ -89,10 +89,10 @@
|
|||
|
||||
#if defined(__FreeBSD__) || defined(__NetBSD__) || defined(__OpenBSD__) || defined(OPENSSL_SYS_MACOSX)
|
||||
# define USE_TOD
|
||||
#elif !defined(OPENSSL_SYS_MSDOS) && (!defined(OPENSSL_SYS_VMS) || defined(__DECC))
|
||||
#elif !defined(OPENSSL_SYS_MSDOS) && !defined(OPENSSL_SYS_VXWORKS) && (!defined(OPENSSL_SYS_VMS) || defined(__DECC))
|
||||
# define TIMES
|
||||
#endif
|
||||
#if !defined(_UNICOS) && !defined(__OpenBSD__) && !defined(sgi) && !defined(__FreeBSD__) && !(defined(__bsdi) || defined(__bsdi__)) && !defined(_AIX) && !defined(OPENSSL_SYS_MPE) && !defined(__NetBSD__) /* FIXME */
|
||||
#if !defined(_UNICOS) && !defined(__OpenBSD__) && !defined(sgi) && !defined(__FreeBSD__) && !(defined(__bsdi) || defined(__bsdi__)) && !defined(_AIX) && !defined(OPENSSL_SYS_MPE) && !defined(__NetBSD__) && !defined(OPENSSL_SYS_VXWORKS) /* FIXME */
|
||||
# define TIMEB
|
||||
#endif
|
||||
|
||||
|
@ -120,7 +120,7 @@
|
|||
#include <sys/timeb.h>
|
||||
#endif
|
||||
|
||||
#if !defined(TIMES) && !defined(TIMEB) && !defined(USE_TOD)
|
||||
#if !defined(TIMES) && !defined(TIMEB) && !defined(USE_TOD) && !defined(OPENSSL_SYS_VXWORKS)
|
||||
#error "It seems neither struct tms nor struct timeb is supported in this platform!"
|
||||
#endif
|
||||
|
||||
|
@ -326,7 +326,23 @@ static double Time_F(int s)
|
|||
# if defined(TIMES) && defined(TIMEB)
|
||||
else
|
||||
# endif
|
||||
# ifdef TIMEB
|
||||
# ifdef OPENSSL_SYS_VXWORKS
|
||||
{
|
||||
static unsigned long tick_start, tick_end;
|
||||
|
||||
if( s == START )
|
||||
{
|
||||
tick_start = tickGet();
|
||||
return 0;
|
||||
}
|
||||
else
|
||||
{
|
||||
tick_end = tickGet();
|
||||
ret = (double)(tick_end - tick_start) / (double)sysClkRateGet();
|
||||
return((ret < 0.001)?0.001:ret);
|
||||
}
|
||||
}
|
||||
# elif defined(TIMEB)
|
||||
{
|
||||
static struct timeb tstart,tend;
|
||||
long i;
|
||||
|
|
|
@ -23,6 +23,11 @@
|
|||
#include <openssl/crypto.h>
|
||||
|
||||
#include "e_os.h"
|
||||
|
||||
/* VxWorks defines SSIZE_MAX with an empty value causing compile errors */
|
||||
#if defined(OPENSSL_SYS_VSWORKS)
|
||||
# undef SSIZE_MAX
|
||||
#endif
|
||||
#ifndef SSIZE_MAX
|
||||
# define SSIZE_MAX INT_MAX
|
||||
#endif
|
||||
|
|
|
@ -77,7 +77,7 @@
|
|||
# include <starlet.h>
|
||||
#elif defined(__ultrix)
|
||||
# include <sys/syslog.h>
|
||||
#elif !defined(MSDOS) && !defined(NO_SYSLOG) /* Unix */
|
||||
#elif !defined(MSDOS) && !defined(OPENSSL_SYS_VXWORKS) && !defined(NO_SYSLOG) /* Unix */
|
||||
# include <syslog.h>
|
||||
#endif
|
||||
|
||||
|
|
|
@ -133,6 +133,12 @@
|
|||
#define SGTTY
|
||||
#endif
|
||||
|
||||
#if defined(OPENSSL_SYS_VSWORKS)
|
||||
#undef TERMIOS
|
||||
#undef TERMIO
|
||||
#undef SGTTY
|
||||
#endif
|
||||
|
||||
#ifdef TERMIOS
|
||||
#include <termios.h>
|
||||
#define TTY_STRUCT struct termios
|
||||
|
@ -268,7 +274,7 @@ int des_read_pw(char *buf, char *buff, int size, const char *prompt,
|
|||
#ifdef OPENSSL_SYS_MSDOS
|
||||
if ((tty=fopen("con","r")) == NULL)
|
||||
tty=stdin;
|
||||
#elif defined(MAC_OS_pre_X)
|
||||
#elif defined(MAC_OS_pre_X) || defined(OPENSSL_SYS_VSWORKS)
|
||||
tty=stdin;
|
||||
#else
|
||||
#ifndef OPENSSL_SYS_MPE
|
||||
|
|
|
@ -114,7 +114,11 @@ int RAND_egd_bytes(const char *path,int bytes)
|
|||
#include <sys/types.h>
|
||||
#include <sys/socket.h>
|
||||
#ifndef NO_SYS_UN_H
|
||||
# ifdef OPENSSL_SYS_VSWORKS
|
||||
# include <streams/un.h>
|
||||
# else
|
||||
# include <sys/un.h>
|
||||
# endif
|
||||
#else
|
||||
struct sockaddr_un {
|
||||
short sun_family; /* AF_UNIX */
|
||||
|
|
|
@ -109,10 +109,10 @@ typedef struct rsa_meth_st
|
|||
* option is set in 'flags'.
|
||||
*/
|
||||
int (*rsa_sign)(int type,
|
||||
const unsigned char *m, unsigned int m_len,
|
||||
const unsigned char *m, unsigned int m_length,
|
||||
unsigned char *sigret, unsigned int *siglen, const RSA *rsa);
|
||||
int (*rsa_verify)(int dtype,
|
||||
const unsigned char *m, unsigned int m_len,
|
||||
const unsigned char *m, unsigned int m_length,
|
||||
unsigned char *sigbuf, unsigned int siglen, const RSA *rsa);
|
||||
|
||||
} RSA_METHOD;
|
||||
|
@ -231,18 +231,18 @@ RSA *d2i_Netscape_RSA(RSA **a, const unsigned char **pp, long length, int (*cb)(
|
|||
|
||||
/* The following 2 functions sign and verify a X509_SIG ASN1 object
|
||||
* inside PKCS#1 padded RSA encryption */
|
||||
int RSA_sign(int type, const unsigned char *m, unsigned int m_len,
|
||||
int RSA_sign(int type, const unsigned char *m, unsigned int m_length,
|
||||
unsigned char *sigret, unsigned int *siglen, RSA *rsa);
|
||||
int RSA_verify(int type, const unsigned char *m, unsigned int m_len,
|
||||
int RSA_verify(int type, const unsigned char *m, unsigned int m_length,
|
||||
unsigned char *sigbuf, unsigned int siglen, RSA *rsa);
|
||||
|
||||
/* The following 2 function sign and verify a ASN1_OCTET_STRING
|
||||
* object inside PKCS#1 padded RSA encryption */
|
||||
int RSA_sign_ASN1_OCTET_STRING(int type,
|
||||
const unsigned char *m, unsigned int m_len,
|
||||
const unsigned char *m, unsigned int m_length,
|
||||
unsigned char *sigret, unsigned int *siglen, RSA *rsa);
|
||||
int RSA_verify_ASN1_OCTET_STRING(int type,
|
||||
const unsigned char *m, unsigned int m_len,
|
||||
const unsigned char *m, unsigned int m_length,
|
||||
unsigned char *sigbuf, unsigned int siglen, RSA *rsa);
|
||||
|
||||
int RSA_blinding_on(RSA *rsa, BN_CTX *ctx);
|
||||
|
|
|
@ -65,7 +65,7 @@
|
|||
#undef TIMES
|
||||
#endif
|
||||
|
||||
#if !defined(OPENSSL_SYS_MSDOS) && !defined(OPENSSL_SYS_WIN32) && !defined(OPENSSL_SYS_VMS) || defined(__DECC) && !defined(OPENSSL_SYS_MACOSX)
|
||||
#if !defined(OPENSSL_SYS_MSDOS) && !defined(OPENSSL_SYS_WIN32) && !defined(OPENSSL_SYS_VMS) || defined(__DECC) && !defined(OPENSSL_SYS_MACOSX) && !defined(OPENSSL_SYS_VXWORKS)
|
||||
# define TIMES
|
||||
#endif
|
||||
|
||||
|
@ -91,7 +91,7 @@
|
|||
#include <sys/param.h>
|
||||
#endif
|
||||
|
||||
#ifndef TIMES
|
||||
#if !defined(TIMES) && !defined(OPENSSL_SYS_VXWORKS)
|
||||
#include <sys/timeb.h>
|
||||
#endif
|
||||
|
||||
|
@ -120,9 +120,13 @@ typedef struct ms_tm
|
|||
# ifdef OPENSSL_SYS_WIN32
|
||||
HANDLE thread_id;
|
||||
FILETIME ms_win32;
|
||||
# else
|
||||
# ifdef OPENSSL_SYS_VSWORKS
|
||||
unsigned long ticks;
|
||||
# else
|
||||
struct timeb ms_timeb;
|
||||
# endif
|
||||
# endif
|
||||
#endif
|
||||
} MS_TM;
|
||||
|
||||
|
@ -158,9 +162,13 @@ void ms_time_get(char *a)
|
|||
#else
|
||||
# ifdef OPENSSL_SYS_WIN32
|
||||
GetThreadTimes(tm->thread_id,&tmpa,&tmpb,&tmpc,&(tm->ms_win32));
|
||||
# else
|
||||
# ifdef OPENSSL_SYS_VSWORKS
|
||||
tm->ticks = tickGet();
|
||||
# else
|
||||
ftime(&tm->ms_timeb);
|
||||
# endif
|
||||
# endif
|
||||
#endif
|
||||
}
|
||||
|
||||
|
@ -188,11 +196,15 @@ double ms_time_diff(char *ap, char *bp)
|
|||
lb+=b->ms_win32.dwLowDateTime;
|
||||
ret=((double)(lb-la))/1e7;
|
||||
}
|
||||
# else
|
||||
# ifdef OPENSSL_SYS_VSWORKS
|
||||
ret = (double)(b->ticks - a->ticks) / (double)sysClkRateGet();
|
||||
# else
|
||||
ret= (double)(b->ms_timeb.time-a->ms_timeb.time)+
|
||||
(((double)b->ms_timeb.millitm)-
|
||||
((double)a->ms_timeb.millitm))/1000.0;
|
||||
# endif
|
||||
# endif
|
||||
#endif
|
||||
return((ret < 0.0000001)?0.0000001:ret);
|
||||
}
|
||||
|
@ -209,6 +221,9 @@ int ms_time_cmp(char *ap, char *bp)
|
|||
# ifdef OPENSSL_SYS_WIN32
|
||||
d =(b->ms_win32.dwHighDateTime&0x000fffff)*10+b->ms_win32.dwLowDateTime/1e7;
|
||||
d-=(a->ms_win32.dwHighDateTime&0x000fffff)*10+a->ms_win32.dwLowDateTime/1e7;
|
||||
# else
|
||||
# ifdef OPENSSL_SYS_VSWORKS
|
||||
d = (b->ticks - a->ticks);
|
||||
# else
|
||||
d= (double)(b->ms_timeb.time-a->ms_timeb.time)+
|
||||
(((double)b->ms_timeb.millitm)-(double)a->ms_timeb.millitm)/1000.0;
|
||||
|
|
|
@ -191,6 +191,12 @@
|
|||
# define SGTTY
|
||||
#endif
|
||||
|
||||
#if defined(OPENSSL_SYS_VSWORKS)
|
||||
#undef TERMIOS
|
||||
#undef TERMIO
|
||||
#undef SGTTY
|
||||
#endif
|
||||
|
||||
#ifdef TERMIOS
|
||||
# include <termios.h>
|
||||
# define TTY_STRUCT struct termios
|
||||
|
@ -444,7 +450,7 @@ static int open_console(UI *ui)
|
|||
CRYPTO_w_lock(CRYPTO_LOCK_UI);
|
||||
is_a_tty = 1;
|
||||
|
||||
#if defined(OPENSSL_SYS_MACINTOSH_CLASSIC)
|
||||
#if defined(OPENSSL_SYS_MACINTOSH_CLASSIC) || defined(OPENSSL_SYS_VSWORKS)
|
||||
tty_in=stdin;
|
||||
tty_out=stderr;
|
||||
#else
|
||||
|
|
10
e_os.h
10
e_os.h
|
@ -88,6 +88,12 @@ extern "C" {
|
|||
#define DEVRANDOM_EGD "/var/run/egd-pool","/dev/egd-pool","/etc/egd-pool","/etc/entropy"
|
||||
#endif
|
||||
|
||||
#if defined(OPENSSL_SYS_VXWORKS)
|
||||
# define NO_SYS_PARAM_H
|
||||
# define NO_CHMOD
|
||||
# define NO_SYSLOG
|
||||
#endif
|
||||
|
||||
#if defined(OPENSSL_SYS_MACINTOSH_CLASSIC)
|
||||
# if macintosh==1
|
||||
# ifndef MAC_OS_GUSI_SOURCE
|
||||
|
@ -353,7 +359,9 @@ extern HINSTANCE _hInstance;
|
|||
# ifndef NO_SYS_PARAM_H
|
||||
# include <sys/param.h>
|
||||
# endif
|
||||
# ifndef OPENSSL_SYS_MPE
|
||||
# ifdef OPENSSL_SYS_VXWORKS
|
||||
# include <time.h>
|
||||
# elif !defined(OPENSSL_SYS_MPE)
|
||||
# include <sys/time.h> /* Needed under linux for FD_XXX */
|
||||
# endif
|
||||
|
||||
|
|
Loading…
Reference in a new issue