From c3ddb263315c7196b488f384b3bc82cd474c8698 Mon Sep 17 00:00:00 2001 From: Rich Salz Date: Thu, 24 Mar 2016 13:36:23 -0400 Subject: [PATCH] More Borland removal. And thanks to Miod Vallat for the nudge about ERR_PACK :) Reviewed-by: Richard Levitte --- e_os.h | 8 -------- include/openssl/err.h | 9 ++------- ms/applink.c | 9 --------- 3 files changed, 2 insertions(+), 24 deletions(-) diff --git a/e_os.h b/e_os.h index 212a524a15..f0a441ec8b 100644 --- a/e_os.h +++ b/e_os.h @@ -300,14 +300,6 @@ extern FILE *_imp___iob; # 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 diff --git a/include/openssl/err.h b/include/openssl/err.h index 4b6c663bb2..d372520d03 100644 --- a/include/openssl/err.h +++ b/include/openssl/err.h @@ -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) -/* - * 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) diff --git a/ms/applink.c b/ms/applink.c index 2831b39e9a..c844b01887 100644 --- a/ms/applink.c +++ b/ms/applink.c @@ -75,16 +75,7 @@ extern "C" { __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 -# endif OPENSSL_Applink(void) { static int once = 1; -- 2.39.2