]> granicus.if.org Git - curl/commitdiff
setup_once.h cleanup and sync
authorYang Tse <yangsita@gmail.com>
Sun, 4 Sep 2011 15:09:22 +0000 (17:09 +0200)
committerYang Tse <yangsita@gmail.com>
Sun, 4 Sep 2011 15:10:51 +0000 (17:10 +0200)
lib/setup.h
lib/setup_once.h
src/setup.h

index c821bc6b48952895268f631e482ee4b86fbd74a2..84c9b1feb7390b9c51d872570c69a6c738a07728 100644 (file)
@@ -603,4 +603,27 @@ int netware_init(void);
 #include "setup_once.h"
 #endif
 
+/*
+ * Definition of our NOP statement Object-like macro
+ */
+
+#ifndef Curl_nop_stmt
+#  define Curl_nop_stmt do { } WHILE_FALSE
+#endif
+
+/*
+ * Ensure that Winsock and lwIP TCP/IP stacks are not mixed.
+ */
+
+#if defined(__LWIP_OPT_H__)
+#  if defined(SOCKET) || \
+     defined(USE_WINSOCK) || \
+     defined(HAVE_ERRNO_H) || \
+     defined(HAVE_WINSOCK_H) || \
+     defined(HAVE_WINSOCK2_H) || \
+     defined(HAVE_WS2TCPIP_H)
+#    error "Winsock and lwIP TCP/IP stack definitions shall not coexist!"
+#  endif
+#endif
+
 #endif /* HEADER_CURL_LIB_SETUP_H */
index fad6f321380ff1db110b095bb51c6d21a1ec6759..8bdb472dfb7272cee0ab5aac45f440f36ec91b29 100644 (file)
@@ -257,10 +257,13 @@ struct timeval {
 #define ISPRINT(x)  (isprint((int)  ((unsigned char)x)))
 #define ISUPPER(x)  (isupper((int)  ((unsigned char)x)))
 #define ISLOWER(x)  (islower((int)  ((unsigned char)x)))
+#define ISASCII(x)  (isascii((int)  ((unsigned char)x)))
 
 #define ISBLANK(x)  (int)((((unsigned char)x) == ' ') || \
                           (((unsigned char)x) == '\t'))
 
+#define TOLOWER(x)  (tolower((int)  ((unsigned char)x)))
+
 
 /*
  * 'bool' exists on platforms with <stdbool.h>, i.e. C99 platforms.
@@ -323,13 +326,6 @@ __pragma(warning(pop))
 #endif
 
 
-/*
- * Definition of our NOP statement Object-like macro
- */
-
-#define Curl_nop_stmt  do { } WHILE_FALSE
-
-
 /*
  * Typedef to 'int' if sig_atomic_t is not an available 'typedefed' type.
  */
@@ -367,7 +363,7 @@ typedef int sig_atomic_t;
 #ifdef DEBUGBUILD
 #define DEBUGF(x) x
 #else
-#define DEBUGF(x) Curl_nop_stmt
+#define DEBUGF(x) do { } WHILE_FALSE
 #endif
 
 
@@ -378,7 +374,7 @@ typedef int sig_atomic_t;
 #if defined(DEBUGBUILD) && defined(HAVE_ASSERT_H)
 #define DEBUGASSERT(x) assert(x)
 #else
-#define DEBUGASSERT(x) Curl_nop_stmt
+#define DEBUGASSERT(x) do { } WHILE_FALSE
 #endif
 
 
@@ -519,19 +515,4 @@ typedef int sig_atomic_t;
 #define ZERO_NULL 0
 
 
-/*
- * Ensure that Winsock and lwIP TCP/IP stacks are not mixed.
- */
-
-#if defined(__LWIP_OPT_H__)
-#  if defined(SOCKET) || \
-     defined(USE_WINSOCK) || \
-     defined(HAVE_ERRNO_H) || \
-     defined(HAVE_WINSOCK_H) || \
-     defined(HAVE_WINSOCK2_H) || \
-     defined(HAVE_WS2TCPIP_H)
-#    error "Winsock and lwIP TCP/IP stack definitions shall not coexist!"
-#  endif
-#endif
-
 #endif /* __SETUP_ONCE_H */
index d2562a24403e5b0c426ac95e7546d74087c9153d..fb6f4e62fe510d92f43002fe1ecc2f517c76c6c4 100644 (file)
@@ -226,4 +226,27 @@ int fileno( FILE *stream);
 #include "setup_once.h"
 #endif
 
+/*
+ * Definition of our NOP statement Object-like macro
+ */
+
+#ifndef Curl_nop_stmt
+#  define Curl_nop_stmt do { } WHILE_FALSE
+#endif
+
+/*
+ * Ensure that Winsock and lwIP TCP/IP stacks are not mixed.
+ */
+
+#if defined(__LWIP_OPT_H__)
+#  if defined(SOCKET) || \
+     defined(USE_WINSOCK) || \
+     defined(HAVE_ERRNO_H) || \
+     defined(HAVE_WINSOCK_H) || \
+     defined(HAVE_WINSOCK2_H) || \
+     defined(HAVE_WS2TCPIP_H)
+#    error "Winsock and lwIP TCP/IP stack definitions shall not coexist!"
+#  endif
+#endif
+
 #endif /* HEADER_CURL_SRC_SETUP_H */