Commit 2ff622cf authored by Richard Levitte's avatar Richard Levitte
Browse files

Add the configuration target VxWorks.

parent b92fb90d
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -490,6 +490,9 @@ my %table=(
##### Sony NEWS-OS 4.x
"newsos4-gcc","gcc:-O -DB_ENDIAN -DNEWS4::(unknown):-lmld -liberty:BN_LLONG RC4_CHAR RC4_CHUNK DES_PTR DES_RISC1 DES_UNROLL BF_PTR::::",

##### VxWorks for various targets
"vxworks-ppc405","ccppc:-g -msoft-float -mlongcall -DVXWORKS -DCPU=PPC405 -I\$(WIND_BASE)/target/h:::-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
@@ -82,7 +82,7 @@
#    else
#      include <unixlib.h>
#    endif
#  else
#  elif !defined(VXWORKS)
#    include <sys/file.h>
#  endif
#endif
+20 −2
Original line number Diff line number Diff line
@@ -82,7 +82,7 @@
#include "wintext.h"
#endif

#if !defined(MSDOS) && (!defined(VMS) || defined(__DECC)) || defined (_DARWIN)
#if !defined(MSDOS) && !defined(VXWORKS) && (!defined(VMS) || defined(__DECC)) || defined (_DARWIN)
#define TIMES
#endif

@@ -102,7 +102,7 @@
#undef TIMES
#endif

#ifndef TIMES
#if !defined(TIMES) && !defined(VXWORKS)
#include <sys/timeb.h>
#endif

@@ -139,6 +139,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))

@@ -368,6 +370,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(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;
+22 −5
Original line number Diff line number Diff line
@@ -84,10 +84,10 @@

#if defined(__FreeBSD__) || defined(__NetBSD__) || defined(__OpenBSD__) || defined(_DARWIN)
# define USE_TOD
#elif !defined(MSDOS) && (!defined(VMS) || defined(__DECC))
#elif !defined(MSDOS) && !defined(VXWORKS) && (!defined(VMS) || defined(__DECC))
# define TIMES
#endif
#if !defined(_UNICOS) && !defined(__OpenBSD__) && !defined(sgi) && !defined(__FreeBSD__) && !(defined(__bsdi) || defined(__bsdi__)) && !defined(_AIX) && !defined(MPE) && !defined(__NetBSD__) && !defined(_DARWIN)
#if !defined(_UNICOS) && !defined(__OpenBSD__) && !defined(sgi) && !defined(__FreeBSD__) && !(defined(__bsdi) || defined(__bsdi__)) && !defined(_AIX) && !defined(MPE) && !defined(__NetBSD__) && !defined(_DARWIN) && !defined(VXWORKS)
# define TIMEB
#endif

@@ -115,7 +115,7 @@
#include <sys/timeb.h>
#endif

#if !defined(TIMES) && !defined(TIMEB) && !defined(USE_TOD)
#if !defined(TIMES) && !defined(TIMEB) && !defined(USE_TOD) && !defined(VXWORKS)
#error "It seems neither struct tms nor struct timeb is supported in this platform!"
#endif

@@ -284,7 +284,23 @@ static double Time_F(int s, int usertime)
# if defined(TIMES) && defined(TIMEB)
	else
# endif
# ifdef TIMEB
# ifdef 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;
@@ -303,6 +319,7 @@ static double Time_F(int s, int usertime)
			}
		}
# endif

#endif
	}

+7 −2
Original line number Diff line number Diff line
@@ -23,8 +23,13 @@
#include <openssl/crypto.h>

#include "openssl/e_os.h"
#ifndef SSIZE_MAX

/* VxWorks defines SSiZE_MAX with an empty value causing compile errors */
#if defined(VXWORKS)
# undef SSIZE_MAX
# define SSIZE_MAX INT_MAX
#elif !defined(SSIZE_MAX)
# define SSIZE_MAX _INT_MAX
#endif

static int bio_new(BIO *bio);
Loading