#include <stdio.h>
#include <stdlib.h>
#include <string.h>
+#ifndef OPENSSL_SYSNAME_WIN32
+#include <strings.h>
+#endif
#include <sys/types.h>
#include <ctype.h>
#include <errno.h>
int load_config(BIO *err, CONF *cnf)
{
+ static int load_config_called = 0;
+ if (load_config_called)
+ return 1;
+ load_config_called = 1;
if (!cnf)
cnf = config;
if (!cnf)
return ret;
}
-int pkey_ctrl_string(BIO *err, EVP_PKEY_CTX *ctx, char *value)
+int pkey_ctrl_string(EVP_PKEY_CTX *ctx, char *value)
{
+ int rv;
char *stmp, *vtmp = NULL;
stmp = BUF_strdup(value);
- int rv;
if (!stmp)
return -1;
vtmp = strchr(stmp, ':');
return (ret);
}
-#elif defined(OPENSSL_SYSTEM_NETWARE)
+#elif defined(OPENSSL_SYS_NETWARE)
#include <time.h>
double app_tminterval(int stop,int usertime)
if (usertime) now = rus.tms_utime;
if (stop==TM_START) tmstart = now;
- else ret = (now - tmstart)/(double)sysconf(_SC_CLK_TCK);
+ else
+ {
+ long int tck = sysconf(_SC_CLK_TCK);
+ ret = (now - tmstart)/(double)tck;
+ }
return (ret);
}
struct timeval now;
static struct timeval tmstart;
- if (usertime) getrusage(RUSAGE_SELF,&rus), now = rus.ru_time;
+ if (usertime) getrusage(RUSAGE_SELF,&rus), now = rus.ru_utime;
else gettimeofday(&now,NULL);
if (stop==TM_START) tmstart = now;
#endif
#if defined(_WIN32) && defined(STD_OUTPUT_HANDLE)
-int raw_write_stdout(void *buf,int siz)
+int raw_write_stdout(const void *buf,int siz)
{
DWORD n;
if (WriteFile(GetStdHandle(STD_OUTPUT_HANDLE),buf,siz,&n,NULL))