"OS2-EMX", "gcc::::::::",
##### VxWorks for various targets
+"vxworks-ppc60x","ccppc:-D_REENTRANT -mrtp -mhard-float -mstrict-align -fno-implicit-fp -DPPC32_fp60x -O2 -fstrength-reduce -fno-builtin -fno-strict-aliasing -Wall -DCPU=PPC32 -DTOOL_FAMILY=gnu -DTOOL=gnu -I\$(WIND_BASE)/target/usr/h -I\$(WIND_BASE)/target/usr/h/wrn/coreip:::VXWORKS:-Wl,--defsym,__wrs_rtp_base=0xe0000000 -L \$(WIND_BASE)/target/usr/lib/ppc/PPC32/common:::linux_ppc32.o:::::::::::::::ranlibppc:",
+"vxworks-ppcgen","ccppc:-D_REENTRANT -mrtp -msoft-float -mstrict-align -O1 -fno-builtin -fno-strict-aliasing -Wall -DCPU=PPC32 -DTOOL_FAMILY=gnu -DTOOL=gnu -I\$(WIND_BASE)/target/usr/h -I\$(WIND_BASE)/target/usr/h/wrn/coreip:::VXWORKS:-Wl,--defsym,__wrs_rtp_base=0xe0000000 -L \$(WIND_BASE)/target/usr/lib/ppc/PPC32/sfcommon:::linux_ppc32.o:::::::::::::::ranlibppc:",
"vxworks-ppc405","ccppc:-g -msoft-float -mlongcall -DCPU=PPC405 -I\$(WIND_BASE)/target/h:::VXWORKS:-r:::::",
"vxworks-ppc750","ccppc:-ansi -nostdinc -DPPC750 -D_REENTRANT -fvolatile -fno-builtin -fno-for-scope -fsigned-char -Wall -msoft-float -mlongcall -DCPU=PPC604 -I\$(WIND_BASE)/target/h \$(DEBUG_FLAG):::VXWORKS:-r:::::",
"vxworks-ppc750-debug","ccppc:-ansi -nostdinc -DPPC750 -D_REENTRANT -fvolatile -fno-builtin -fno-for-scope -fsigned-char -Wall -msoft-float -mlongcall -DCPU=PPC604 -I\$(WIND_BASE)/target/h -DBN_DEBUG -DREF_CHECK -DCONF_DEBUG -DCRYPTO_MDEBUG -DPEDANTIC -DDEBUG_SAFESTACK -DDEBUG -g:::VXWORKS:-r:::::",
# endif
#endif
-#if !defined(OPENSSL_SYS_VMS) && !defined(OPENSSL_SYS_WINDOWS) && !defined(OPENSSL_SYS_MACINTOSH_CLASSIC) && !defined(OPENSSL_SYS_OS2) && !defined(OPENSSL_SYS_NETWARE)
+#if !defined(OPENSSL_SYS_VMS) && !defined(OPENSSL_SYS_WINDOWS) && !defined(OPENSSL_SYS_MACINTOSH_CLASSIC) && !defined(OPENSSL_SYS_OS2) && !defined(OPENSSL_SYS_NETWARE) && !defined(OPENSSL_SYS_VXWORKS)
# define HAVE_FORK 1
#endif
NONSTOP_KERNEL*)
echo "nsr-tandem-nsk"; exit 0;
;;
+
+ vxworks*)
+ echo "${MACHINE}-whatever-vxworks"; exit 0;
+ ;;
esac
#
OUT="linux-ppc64"
;;
ppc-*-linux2) OUT="linux-ppc" ;;
+ ppc60x-*-vxworks*) OUT="vxworks-ppc60x" ;;
+ ppcgen-*-vxworks*) OUT="vxworks-ppcgen" ;;
ia64-*-linux?) OUT="linux-ia64" ;;
sparc64-*-linux2)
OUT="linux64-sparcv9" ;;
#if defined(OPENSSL_SYS_VXWORKS)
+/* Note: the existence of /dev/urandom on VxWorks platforms is uncommon
+* however we check for one and use it if found for those cases where
+* it is present. */
int RAND_poll(void)
- {
+{
+ unsigned long l;
+#ifdef DEVRANDOM
+ unsigned char buf[ENTROPY_NEEDED];
+ int n = 0, r, fd;
+
+ if ((fd = open("/dev/urandom", O_RDONLY, 0)) >= 0)
+ {
+ do
+ {
+ r = read(fd,(unsigned char *)buf+n, ENTROPY_NEEDED-n);
+ if (r > 0)
+ n += r;
+ }
+ while ((r > 0 || errno == EINTR) && n < ENTROPY_NEEDED);
+
+ close(fd);
+ }
+
+ if (n > 0)
+ {
+ RAND_add(buf,sizeof buf,(double)n);
+ OPENSSL_cleanse(buf,n);
+ }
+#endif
+
+ l=time(NULL);
+ RAND_add(&l,sizeof(l),0.0);
+
+#if defined(DEVRANDOM)
+ return 1;
+#else
return 0;
- }
+#endif
+}
#endif
* [including the GNU Public Licence.]
*/
-/* We need to define this to get macros like S_IFBLK and S_IFCHR */
-#define _XOPEN_SOURCE 500
#include <errno.h>
#include <stdio.h>
#include <openssl/rand.h>
#include <openssl/buffer.h>
+#if !defined(OPENSSL_SYS_VXWORKS)
+/* We need to define this to get macros like S_IFBLK and S_IFCHR */
+# define _XOPEN_SOURCE 500
+#endif
#ifdef OPENSSL_SYS_VMS
#include <unixio.h>
#endif
* sigaction and fileno included. -pedantic would be more appropriate for
* the intended purposes, but we can't prevent users from adding -ansi.
*/
-#define _POSIX_C_SOURCE 1
+#if !defined(OPENSSL_SYS_VXWORKS)
+# define _POSIX_C_SOURCE 1
+#endif
#include <signal.h>
#include <stdio.h>
#include <string.h>
# else
return (void *)FIPS_ref_point;
# endif
+#elif defined(__vxworks)
+ return (void *)FIPS_ref_point;
/*
* In case you wonder why there is no #ifdef __linux. All Linux targets
* are GCC-based and therefore are covered by instruction_pointer above
{
$win32 = 1;
}
+ if ($_ eq "--vxworks")
+ {
+ $vxworks = 1;
+ }
elsif ($_ eq "--onedir")
{
$onedir = 1;
}
}
+if ($win32 && $vxworks) {
+ print STDERR "Can't specify both --win32 and --vxworks\n";
+ exit(1);
+}
+
$tvdir = "." unless defined $tvdir;
if ($win32)
rem Auto generated by mkfipsscr.pl script
rem Do not edit
+END
+
+ }
+elsif ($vxworks)
+ {
+ # Always assume onedir.
+ $tprefix = "" unless defined $tprefix;
+ $outfile = "fipstests" unless defined $outfile;
+ open(OUT, ">$outfile");
+
+ print OUT <<END;
+# Test vector run script
+# Auto generated by mkfipsscr.pl script
+# Do not edit
+
END
}
echo Running tests in $req
if exist "$rsp" rd /s /q "$rsp"
md "$rsp"
+END
+ }
+ elsif ($vxworks)
+ {
+ print OUT <<END;
+
+echo Running tests in "$req"
+rm -r "$rsp"
+mkdir "$rsp"
+
END
}
else
$rsp =~ tr|/|\\|;
print OUT "$tprefix$tcmd \"$req\" \"$rsp\"\n";
}
+ elsif ($vxworks)
+ {
+ print OUT "run $tprefix$tcmd \"$req\" \"$rsp\"\n";
+ }
else
{
print OUT <<END;
{
$req =~ tr|/|\\|;
$rsp =~ tr|/|\\|;
- print OUT "$tprefix$tcmd < \"$req\" > \"$rsp\"\n";
+ print OUT "$tprefix$tcmd < \"$req\" > \"$rsp\"\n";
+ }
+ elsif ($vxworks)
+ {
+ print OUT "run $tprefix$tcmd \"$req\" \"$rsp\"\n";
}
else
{