summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorMarcel Raad <Marcel.Raad@teamviewer.com>2018-03-03 19:52:43 +0100
committerMarcel Raad <Marcel.Raad@teamviewer.com>2018-03-03 19:52:43 +0100
commit68d84cfe984e7d0483fad14fdd7deef4bf67de1b (patch)
tree998ed63d51729a65dc02de0ea29d5d161c68d6ab /lib
parentc87c71b3fea35e23eb2d236278e9956555394fc1 (diff)
downloadcurl-68d84cfe984e7d0483fad14fdd7deef4bf67de1b.tar.gz
curl_ctype: fix macro redefinition warnings
On MinGW and Cygwin, GCC and clang have been complaining about macro redefinitions since 4272a0b0fc49a1ac0ceab5c4a365c9f6ab8bf8e2. Fix this by undefining the macros before redefining them as suggested in https://github.com/curl/curl/pull/2269. Suggested-by: Daniel Stenberg
Diffstat (limited to 'lib')
-rw-r--r--lib/curl_ctype.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/lib/curl_ctype.c b/lib/curl_ctype.c
index 70db1630d..4f5abc207 100644
--- a/lib/curl_ctype.c
+++ b/lib/curl_ctype.c
@@ -22,13 +22,21 @@
#include "curl_setup.h"
+#undef _U
#define _U (1<<0) /* upper case */
+#undef _L
#define _L (1<<1) /* lower case */
+#undef _N
#define _N (1<<2) /* decimal numerical digit */
+#undef _S
#define _S (1<<3) /* space */
+#undef _P
#define _P (1<<4) /* punctuation */
+#undef _C
#define _C (1<<5) /* control */
+#undef _X
#define _X (1<<6) /* hexadecimal letter */
+#undef _B
#define _B (1<<7) /* blank */
static const unsigned char ascii[128] = {