More Borland removal.
authorRich Salz <rsalz@openssl.org>
Thu, 24 Mar 2016 17:36:23 +0000 (13:36 -0400)
committerRich Salz <rsalz@openssl.org>
Thu, 24 Mar 2016 18:05:48 +0000 (14:05 -0400)
And thanks to Miod Vallat for the nudge about ERR_PACK :)

Reviewed-by: Richard Levitte <levitte@openssl.org>
e_os.h
include/openssl/err.h
ms/applink.c

diff --git a/e_os.h b/e_os.h
index 212a524a15404f09061c061841cdde1a680da6ae..f0a441ec8bfcc475acd567e8484601247752d028 100644 (file)
--- a/e_os.h
+++ b/e_os.h
@@ -300,14 +300,6 @@ extern FILE *_imp___iob;
 #   define OPENSSL_NO_POSIX_IO
 #  endif
 
 #   define OPENSSL_NO_POSIX_IO
 #  endif
 
-#  if defined (__BORLANDC__)
-#   define _setmode setmode
-#   define _O_TEXT O_TEXT
-#   define _O_BINARY O_BINARY
-#   define _int64 __int64
-#   define _kbhit kbhit
-#  endif
-
 #  define EXIT(n) exit(n)
 #  define LIST_SEPARATOR_CHAR ';'
 #  ifndef X_OK
 #  define EXIT(n) exit(n)
 #  define LIST_SEPARATOR_CHAR ';'
 #  ifndef X_OK
index 4b6c663bb2b61d1bb2d08d9d3fa90baea91e2ac8..d372520d03ed6f6e47d0e0d6f0d09c46c4306c27 100644 (file)
@@ -234,13 +234,8 @@ typedef struct err_state_st {
 # define ASYNCerr(f,r) ERR_PUT_error(ERR_LIB_ASYNC,(f),(r),OPENSSL_FILE,OPENSSL_LINE)
 # define KDFerr(f,r) ERR_PUT_error(ERR_LIB_KDF,(f),(r),OPENSSL_FILE,OPENSSL_LINE)
 
 # define ASYNCerr(f,r) ERR_PUT_error(ERR_LIB_ASYNC,(f),(r),OPENSSL_FILE,OPENSSL_LINE)
 # define KDFerr(f,r) ERR_PUT_error(ERR_LIB_KDF,(f),(r),OPENSSL_FILE,OPENSSL_LINE)
 
-/*
- * Borland C seems too stupid to be able to shift and do longs in the
- * pre-processor :-(
- */
-# define ERR_PACK(l,f,r)         (((((unsigned long)l)&0xffL)*0x1000000)| \
-                                ((((unsigned long)f)&0xfffL)*0x1000)| \
-                                ((((unsigned long)r)&0xfffL)))
+# define ERR_PACK(l,f,r) \
+    ( (((l) & 0x0FF) << 24L) | (((f) & 0xFFF) << 12L) | ((r) & 0xFFF) )
 # define ERR_GET_LIB(l)          (int)((((unsigned long)l)>>24L)&0xffL)
 # define ERR_GET_FUNC(l)         (int)((((unsigned long)l)>>12L)&0xfffL)
 # define ERR_GET_REASON(l)       (int)((l)&0xfffL)
 # define ERR_GET_LIB(l)          (int)((((unsigned long)l)>>24L)&0xffL)
 # define ERR_GET_FUNC(l)         (int)((((unsigned long)l)>>12L)&0xfffL)
 # define ERR_GET_REASON(l)       (int)((l)&0xfffL)
index 2831b39e9a7d27e4811d2ce22cf9a06d62bd92e1..c844b01887d0395d36557e525d84da8c73f1340b 100644 (file)
@@ -75,16 +75,7 @@ extern "C" {
 
 __declspec(dllexport)
 void **
 
 __declspec(dllexport)
 void **
-# if defined(__BORLANDC__)
-/*
- * __stdcall appears to be the only way to get the name
- * decoration right with Borland C. Otherwise it works
- * purely incidentally, as we pass no parameters.
- */
- __stdcall
-# else
  __cdecl
  __cdecl
-# endif
 OPENSSL_Applink(void)
 {
     static int once = 1;
 OPENSSL_Applink(void)
 {
     static int once = 1;