From c3347d0561a509ded33cfe94bfaac3f4d638b025 Mon Sep 17 00:00:00 2001 From: Richard Levitte Date: Thu, 13 Jun 2002 21:41:46 +0000 Subject: [PATCH] Add support for UWIN, a Unix-like environment on top of Windows. PR: 62 --- Configure | 3 +++ crypto/bn/bn.h | 2 +- crypto/des/des.h | 2 +- e_os.h | 9 +++++---- 4 files changed, 10 insertions(+), 6 deletions(-) diff --git a/Configure b/Configure index 5ebff785a9..f4addbe248 100755 --- a/Configure +++ b/Configure @@ -471,6 +471,9 @@ my %table=( # and its library files in util/pl/*) "Mingw32", "gcc:-DL_ENDIAN -fomit-frame-pointer -O3 -m486 -Wall::::BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}::::::::::win32", +# UWIN +"UWIN", "cc:-DTERMIOS -DL_ENDIAN -O -Wall::::BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}::::::::::win32", + # Cygwin "Cygwin-pre1.3", "gcc:-DTERMIOS -DL_ENDIAN -fomit-frame-pointer -O2 -m486 -Wall::(unknown)::BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}::::::::::win32", "Cygwin", "gcc:-DTERMIOS -DL_ENDIAN -fomit-frame-pointer -O2 -m486 -Wall::::BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}::::::::::win32:cygwin-shared:::.dll", diff --git a/crypto/bn/bn.h b/crypto/bn/bn.h index 7ce9d8ce33..2ea9cd7203 100644 --- a/crypto/bn/bn.h +++ b/crypto/bn/bn.h @@ -155,7 +155,7 @@ extern "C" { #define BN_BYTES 4 #define BN_BITS2 32 #define BN_BITS4 16 -#ifdef WIN32 +#ifdef _MSC_VER /* VC++ doesn't like the LL suffix */ #define BN_MASK (0xffffffffffffffffL) #else diff --git a/crypto/des/des.h b/crypto/des/des.h index 6b8a7ee11b..0aaacebe60 100644 --- a/crypto/des/des.h +++ b/crypto/des/des.h @@ -189,7 +189,7 @@ int des_enc_write(int fd,const void *buf,int len,des_key_schedule sched, des_cblock *iv); char *des_fcrypt(const char *buf,const char *salt, char *ret); char *des_crypt(const char *buf,const char *salt); -#if !defined(PERL5) && !defined(__FreeBSD__) && !defined(NeXT) +#if !defined(PERL5) && !defined(__FreeBSD__) && !defined(NeXT) && !defined(_UWIN) char *crypt(const char *buf,const char *salt); #endif void des_ofb_encrypt(const unsigned char *in,unsigned char *out,int numbits, diff --git a/e_os.h b/e_os.h index aba8c6f41b..d49c6ef7e7 100644 --- a/e_os.h +++ b/e_os.h @@ -114,11 +114,11 @@ extern "C" { # define MS_STATIC #endif -#if defined(_WIN32) && !defined(WIN32) && !defined(__CYGWIN32__) +#if defined(_WIN32) && !defined(WIN32) && !defined(__CYGWIN32__) && !defined(_UWIN) # define WIN32 #endif -#if (defined(WIN32) || defined(WIN16)) && !defined(__CYGWIN32__) +#if (defined(WIN32) || defined(WIN16)) && !defined(__CYGWIN32__) && !defined(_UWIN) # ifndef WINDOWS # define WINDOWS # endif @@ -142,7 +142,8 @@ extern "C" { #define clear_sys_error() errno=0 #endif -#if defined(WINDOWS) && !defined(__CYGWIN32__) +#if defined(WINDOWS) && !defined(__CYGWIN32__) && !defined(_UWIN) + #define get_last_socket_error() WSAGetLastError() #define clear_socket_error() WSASetLastError(0) #define readsocket(s,b,n) recv((s),(b),(n),0) @@ -183,7 +184,7 @@ extern "C" { # define NO_FP_API #endif -#if (defined(WINDOWS) || defined(MSDOS)) && !defined(__CYGWIN32__) +#if (defined(WINDOWS) || defined(MSDOS)) && !defined(__CYGWIN32__) && !defined(_UWIN) # ifndef S_IFDIR # define S_IFDIR _S_IFDIR -- 2.25.1