aboutsummaryrefslogtreecommitdiffstats
path: root/include/openssl/err.h
diff options
context:
space:
mode:
authorRich Salz <rsalz@openssl.org>2016-03-24 13:36:23 -0400
committerRich Salz <rsalz@openssl.org>2016-03-24 14:05:48 -0400
commitc3ddb263315c7196b488f384b3bc82cd474c8698 (patch)
tree463b4ed5142cc64fedd431a617c31bf19fcff47f /include/openssl/err.h
parenta5bb160c8c1cb7da13865a5b7916fe1292fae4c0 (diff)
downloadopenssl-c3ddb263315c7196b488f384b3bc82cd474c8698.tar.gz
More Borland removal.
And thanks to Miod Vallat for the nudge about ERR_PACK :) Reviewed-by: Richard Levitte <levitte@openssl.org>
Diffstat (limited to 'include/openssl/err.h')
-rw-r--r--include/openssl/err.h9
1 files changed, 2 insertions, 7 deletions
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)