Commit 3e83e686 authored by Richard Levitte's avatar Richard Levitte
Browse files

Add the configuration target VxWorks.

parent 8f06b003
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -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
+1 −1
Original line number Diff line number Diff line
@@ -90,7 +90,7 @@
#    else
#      include <unixlib.h>
#    endif
#  else
#  elif !defined(OPENSSL_SYS_VXWORKS)
#    include <sys/file.h>
#  endif
#endif
+20 −2
Original line number Diff line number Diff line
@@ -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;
+20 −4
Original line number Diff line number Diff line
@@ -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;
+6 −1
Original line number Diff line number Diff line
@@ -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
Loading