parent
1ff7b6492b
commit
f17c45611e
@ -279,7 +279,7 @@ static long MS_CALLBACK file_ctrl(BIO *b, int cmd, long num, void *ptr)
|
|||||||
#endif
|
#endif
|
||||||
{
|
{
|
||||||
#if defined(OPENSSL_SYS_WINDOWS)
|
#if defined(OPENSSL_SYS_WINDOWS)
|
||||||
int fd = fileno((FILE*)ptr);
|
int fd = _fileno((FILE*)ptr);
|
||||||
if (num & BIO_FP_TEXT)
|
if (num & BIO_FP_TEXT)
|
||||||
_setmode(fd,_O_TEXT);
|
_setmode(fd,_O_TEXT);
|
||||||
else
|
else
|
||||||
|
@ -147,7 +147,11 @@ int DES_enc_read(int fd, void *buf, int len, DES_key_schedule *sched,
|
|||||||
/* first - get the length */
|
/* first - get the length */
|
||||||
while (net_num < HDRSIZE)
|
while (net_num < HDRSIZE)
|
||||||
{
|
{
|
||||||
|
#ifndef _WIN32
|
||||||
i=read(fd,(void *)&(net[net_num]),HDRSIZE-net_num);
|
i=read(fd,(void *)&(net[net_num]),HDRSIZE-net_num);
|
||||||
|
#else
|
||||||
|
i=_read(fd,(void *)&(net[net_num]),HDRSIZE-net_num);
|
||||||
|
#endif
|
||||||
#ifdef EINTR
|
#ifdef EINTR
|
||||||
if ((i == -1) && (errno == EINTR)) continue;
|
if ((i == -1) && (errno == EINTR)) continue;
|
||||||
#endif
|
#endif
|
||||||
|
@ -153,7 +153,11 @@ int DES_enc_write(int fd, const void *_buf, int len,
|
|||||||
{
|
{
|
||||||
/* eay 26/08/92 I was not doing writing from where we
|
/* eay 26/08/92 I was not doing writing from where we
|
||||||
* got up to. */
|
* got up to. */
|
||||||
|
#ifndef _WIN32
|
||||||
i=write(fd,(void *)&(outbuf[j]),outnum-j);
|
i=write(fd,(void *)&(outbuf[j]),outnum-j);
|
||||||
|
#else
|
||||||
|
i=_write(fd,(void *)&(outbuf[j]),outnum-j);
|
||||||
|
#endif
|
||||||
if (i == -1)
|
if (i == -1)
|
||||||
{
|
{
|
||||||
#ifdef EINTR
|
#ifdef EINTR
|
||||||
|
@ -56,11 +56,12 @@
|
|||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <openssl/asn1.h>
|
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include <ctype.h>
|
#include <ctype.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
|
#include "e_os.h"
|
||||||
|
#include <openssl/asn1.h>
|
||||||
#include <openssl/ocsp.h>
|
#include <openssl/ocsp.h>
|
||||||
#include <openssl/err.h>
|
#include <openssl/err.h>
|
||||||
#include <openssl/buffer.h>
|
#include <openssl/buffer.h>
|
||||||
|
@ -81,6 +81,13 @@
|
|||||||
# include <sys/stat.h>
|
# include <sys/stat.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#ifdef _WIN32
|
||||||
|
#define stat _stat
|
||||||
|
#define chmod _chmod
|
||||||
|
#define open _open
|
||||||
|
#define fdopen _fdopen
|
||||||
|
#endif
|
||||||
|
|
||||||
#undef BUFSIZE
|
#undef BUFSIZE
|
||||||
#define BUFSIZE 1024
|
#define BUFSIZE 1024
|
||||||
#define RAND_DATA 1024
|
#define RAND_DATA 1024
|
||||||
|
@ -677,6 +677,8 @@ static int noecho_fgets(char *buf, int size, FILE *tty)
|
|||||||
size--;
|
size--;
|
||||||
#ifdef WIN16TTY
|
#ifdef WIN16TTY
|
||||||
i=_inchar();
|
i=_inchar();
|
||||||
|
#elif defined(_WIN32)
|
||||||
|
i=_getch();
|
||||||
#else
|
#else
|
||||||
i=getch();
|
i=getch();
|
||||||
#endif
|
#endif
|
||||||
|
@ -74,6 +74,10 @@
|
|||||||
#include <openssl/lhash.h>
|
#include <openssl/lhash.h>
|
||||||
#include <openssl/x509.h>
|
#include <openssl/x509.h>
|
||||||
|
|
||||||
|
#ifdef _WIN32
|
||||||
|
#define stat _stat
|
||||||
|
#endif
|
||||||
|
|
||||||
typedef struct lookup_dir_st
|
typedef struct lookup_dir_st
|
||||||
{
|
{
|
||||||
BUF_MEM *buffer;
|
BUF_MEM *buffer;
|
||||||
|
28
e_os.h
28
e_os.h
@ -269,6 +269,7 @@ extern "C" {
|
|||||||
# define _WIN32_WINNT 0x0400
|
# define _WIN32_WINNT 0x0400
|
||||||
# endif
|
# endif
|
||||||
# include <windows.h>
|
# include <windows.h>
|
||||||
|
# include <stdio.h>
|
||||||
# include <stddef.h>
|
# include <stddef.h>
|
||||||
# include <errno.h>
|
# include <errno.h>
|
||||||
# include <string.h>
|
# include <string.h>
|
||||||
@ -284,13 +285,38 @@ static unsigned int _strlen31(const char *str)
|
|||||||
# endif
|
# endif
|
||||||
# include <malloc.h>
|
# include <malloc.h>
|
||||||
# if defined(_MSC_VER) && _MSC_VER<=1200 && defined(_MT) && defined(isspace)
|
# if defined(_MSC_VER) && _MSC_VER<=1200 && defined(_MT) && defined(isspace)
|
||||||
/* compensate for bug is VC6 ctype.h */
|
/* compensate for bug in VC6 ctype.h */
|
||||||
# undef isspace
|
# undef isspace
|
||||||
# undef isdigit
|
# undef isdigit
|
||||||
# undef isalnum
|
# undef isalnum
|
||||||
# undef isupper
|
# undef isupper
|
||||||
# undef isxdigit
|
# undef isxdigit
|
||||||
# endif
|
# endif
|
||||||
|
# if defined(_MSC_VER) && !defined(_DLL) && defined(stdin)
|
||||||
|
# if _MSC_VER>=1300
|
||||||
|
# undef stdin
|
||||||
|
# undef stdout
|
||||||
|
# undef stderr
|
||||||
|
FILE *__iob_func();
|
||||||
|
# define stdin (&__iob_func()[0])
|
||||||
|
# define stdout (&__iob_func()[1])
|
||||||
|
# define stderr (&__iob_func()[2])
|
||||||
|
# elif defined(I_CAN_LIVE_WITH_LNK4049)
|
||||||
|
# undef stdin
|
||||||
|
# undef stdout
|
||||||
|
# undef stderr
|
||||||
|
/* pre-1300 has __p__iob(), but it's available only in msvcrt.lib,
|
||||||
|
* or in other words with /MD. Declaring implicit import, i.e.
|
||||||
|
* with _imp_ prefix, works correctly with all compiler options,
|
||||||
|
* but without /MD results in LINK warning LNK4049:
|
||||||
|
* 'locally defined symbol "__iob" imported'.
|
||||||
|
*/
|
||||||
|
extern FILE *_imp___iob;
|
||||||
|
# define stdin (&_imp___iob[0])
|
||||||
|
# define stdout (&_imp___iob[1])
|
||||||
|
# define stderr (&_imp___iob[2])
|
||||||
|
# endif
|
||||||
|
# endif
|
||||||
# endif
|
# endif
|
||||||
# include <io.h>
|
# include <io.h>
|
||||||
# include <fcntl.h>
|
# include <fcntl.h>
|
||||||
|
@ -867,10 +867,12 @@ static AEP_RV aep_get_connection(AEP_CONNECTION_HNDL_PTR phConnection)
|
|||||||
|
|
||||||
CRYPTO_w_lock(CRYPTO_LOCK_ENGINE);
|
CRYPTO_w_lock(CRYPTO_LOCK_ENGINE);
|
||||||
|
|
||||||
#ifndef NETWARE_CLIB
|
#ifdef NETWARE_CLIB
|
||||||
curr_pid = getpid();
|
|
||||||
#else
|
|
||||||
curr_pid = GetThreadID();
|
curr_pid = GetThreadID();
|
||||||
|
#elif defined(_WIN32)
|
||||||
|
curr_pid = _getpid();
|
||||||
|
#else
|
||||||
|
curr_pid = getpid();
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/*Check if this is the first time this is being called from the current
|
/*Check if this is the first time this is being called from the current
|
||||||
|
Loading…
x
Reference in New Issue
Block a user