Hi all i patched openssl 0.9.8k to have it building on os/2 nicely. afaik the patch to rand_os2.c is already in openssl 1.0.
would it be possible to add the rest also to 1.0? regards Silvan
diff -Naur -x '*.map' -x '*.ico' -x '*.o' -x '*.a' -x '*.exe' -x '*.obj' -x
'*.bak' -x '*.asm' -x '*.h' -x '*test.c' -x 'fips*.c' -x '*.dll'
e:\trees\openssl-0.9.8k\openssl-0.9.8k/config e:\trees\openssl/config
--- e:\trees\openssl-0.9.8k\openssl-0.9.8k/config 2009-02-16
09:43:40.000000000 +0100
+++ e:\trees\openssl/config 2009-09-23 15:23:02.000000000 +0200
@@ -362,6 +362,9 @@
NONSTOP_KERNEL*)
echo "nsr-tandem-nsk"; exit 0;
;;
+ OS/2*)
+ echo "whatever-ibm-os2"; exit 0;
+ ;;
esac
#
@@ -761,6 +764,11 @@
options="$options no-asm"
fi
;;
+ *os2)
+ EXE=".exe"
+ OUT="OS2-EMX"
+ options="$options no-shared"
+ ;;
# these are all covered by the catchall below
# *-dgux) OUT="dgux" ;;
mips-sony-newsos4) OUT="newsos4-gcc" ;;
@@ -837,6 +845,14 @@
OUT="$CC"
fi
+if [ "$OUT" = "OS2-EMX" ]; then
+
+ if "perl$EXE" -e 'exit($]<5.0)'; then
+ PERL="perl$EXE"
+ fi
+
+fi
+
if [ ".$PERL" = . ] ; then
for i in . `echo $PATH | sed 's/:/ /g'`; do
if [ -f "$i/perl5$EXE" ] ; then
diff -Naur -x '*.map' -x '*.ico' -x '*.o' -x '*.a' -x '*.exe' -x '*.obj' -x
'*.bak' -x '*.asm' -x '*.h' -x '*test.c' -x 'fips*.c' -x '*.dll'
e:\trees\openssl-0.9.8k\openssl-0.9.8k/crypto/rand/rand_os2.c
e:\trees\openssl/crypto/rand/rand_os2.c
--- e:\trees\openssl-0.9.8k\openssl-0.9.8k/crypto/rand/rand_os2.c
2001-07-02 00:39:40.000000000 +0200
+++ e:\trees\openssl/crypto/rand/rand_os2.c 2009-09-21 19:37:42.000000000
+0200
@@ -78,8 +78,10 @@
ULONG ulIntrHigh; /* High 32 bits of interrupt time */
} CPUUTIL;
+#ifndef __KLIBC__
APIRET APIENTRY(*DosPerfSysCall) (ULONG ulCommand, ULONG ulParm1, ULONG
ulParm2, ULONG ulParm3) = NULL;
APIRET APIENTRY(*DosQuerySysState) (ULONG func, ULONG arg1, ULONG pid, ULONG
_res_, PVOID buf, ULONG bufsz) = NULL;
+#endif
HMODULE hDoscalls = 0;
int RAND_poll(void)
@@ -90,7 +92,7 @@
if (hDoscalls == 0) {
ULONG rc = DosLoadModule(failed_module, sizeof(failed_module),
"DOSCALLS", &hDoscalls);
-
+#ifndef __KLIBC__
if (rc == 0) {
rc = DosQueryProcAddr(hDoscalls, 976, NULL, (PFN
*)&DosPerfSysCall);
@@ -102,6 +104,7 @@
if (rc)
DosQuerySysState = NULL;
}
+#endif
}
/* Sample the hi-res timer, runs at around 1.1 MHz */
@@ -122,7 +125,9 @@
RAND_add(&util, sizeof(util), 10);
}
else {
+#ifndef __KLIBC__
DosPerfSysCall = NULL;
+#endif
}
}
diff -Naur -x '*.map' -x '*.ico' -x '*.o' -x '*.a' -x '*.exe' -x '*.obj' -x
'*.bak' -x '*.asm' -x '*.h' -x '*test.c' -x 'fips*.c' -x '*.dll'
e:\trees\openssl-0.9.8k\openssl-0.9.8k/Configure e:\trees\openssl/Configure
--- e:\trees\openssl-0.9.8k\openssl-0.9.8k/Configure 2009-02-16
09:44:22.000000000 +0100
+++ e:\trees\openssl/Configure 2009-09-23 16:22:16.000000000 +0200
@@ -549,7 +549,7 @@
my @MK1MF_Builds=qw(VC-WIN64I VC-WIN64A
VC-NT VC-CE VC-WIN32
- BC-32 OS2-EMX
+ BC-32
netware-clib netware-clib-bsdsock
netware-libc netware-libc-bsdsock);
@@ -1063,7 +1063,7 @@
$no_shared = 0 if ($fipsdso && !$IsMK1MF);
-$exe_ext=".exe" if ($target eq "Cygwin" || $target eq "DJGPP" || $target eq
"mingw");
+$exe_ext=".exe" if ($target eq "Cygwin" || $target eq "DJGPP" || $target eq
"mingw" || $target eq "OS2-EMX");
$exe_ext=".nlm" if ($target =~ /netware/);
$exe_ext=".pm" if ($target =~ /vos/);
if ($openssldir eq "" and $prefix eq "")
<<attachment: silvan_scherrer.vcf>>
