Submitted by: "Paul Smedley" <pauldespam@despamsmedley.id.au>
Approved by: steve@openssl.org

OS/2 fixes (excludes Makefile.shared patch for now).
This commit is contained in:
Dr. Stephen Henson 2009-04-22 16:21:20 +00:00
parent b61a84c8e6
commit 346b1001eb
2 changed files with 7 additions and 1 deletions

View File

@ -573,7 +573,7 @@ my %table=(
my @MK1MF_Builds=qw(VC-WIN64I VC-WIN64A my @MK1MF_Builds=qw(VC-WIN64I VC-WIN64A
VC-NT VC-CE VC-WIN32 VC-NT VC-CE VC-WIN32
BC-32 OS2-EMX BC-32
netware-clib netware-clib-bsdsock netware-clib netware-clib-bsdsock
netware-libc netware-libc-bsdsock); netware-libc netware-libc-bsdsock);

View File

@ -78,8 +78,10 @@ typedef struct _CPUUTIL {
ULONG ulIntrHigh; /* High 32 bits of interrupt time */ ULONG ulIntrHigh; /* High 32 bits of interrupt time */
} CPUUTIL; } CPUUTIL;
#ifndef __KLIBC__
APIRET APIENTRY(*DosPerfSysCall) (ULONG ulCommand, ULONG ulParm1, ULONG ulParm2, ULONG ulParm3) = NULL; 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; APIRET APIENTRY(*DosQuerySysState) (ULONG func, ULONG arg1, ULONG pid, ULONG _res_, PVOID buf, ULONG bufsz) = NULL;
#endif
HMODULE hDoscalls = 0; HMODULE hDoscalls = 0;
int RAND_poll(void) int RAND_poll(void)
@ -91,6 +93,7 @@ int RAND_poll(void)
if (hDoscalls == 0) { if (hDoscalls == 0) {
ULONG rc = DosLoadModule(failed_module, sizeof(failed_module), "DOSCALLS", &hDoscalls); ULONG rc = DosLoadModule(failed_module, sizeof(failed_module), "DOSCALLS", &hDoscalls);
#ifndef __KLIBC__
if (rc == 0) { if (rc == 0) {
rc = DosQueryProcAddr(hDoscalls, 976, NULL, (PFN *)&DosPerfSysCall); rc = DosQueryProcAddr(hDoscalls, 976, NULL, (PFN *)&DosPerfSysCall);
@ -102,6 +105,7 @@ int RAND_poll(void)
if (rc) if (rc)
DosQuerySysState = NULL; DosQuerySysState = NULL;
} }
#endif
} }
/* Sample the hi-res timer, runs at around 1.1 MHz */ /* Sample the hi-res timer, runs at around 1.1 MHz */
@ -122,7 +126,9 @@ int RAND_poll(void)
RAND_add(&util, sizeof(util), 10); RAND_add(&util, sizeof(util), 10);
} }
else { else {
#ifndef __KLIBC__
DosPerfSysCall = NULL; DosPerfSysCall = NULL;
#endif
} }
} }