diff options
Diffstat (limited to 'src/microhttpd/internal.h')
-rw-r--r-- | src/microhttpd/internal.h | 40 |
1 files changed, 37 insertions, 3 deletions
diff --git a/src/microhttpd/internal.h b/src/microhttpd/internal.h index 8f0e821a..cfaca9af 100644 --- a/src/microhttpd/internal.h +++ b/src/microhttpd/internal.h | |||
@@ -76,6 +76,18 @@ | |||
76 | 76 | ||
77 | 77 | ||
78 | /** | 78 | /** |
79 | * @def _MHD_MACRO_NO | ||
80 | * "Negative answer"/"false" for use in macros, meaningful for precompiler | ||
81 | */ | ||
82 | #define _MHD_MACRO_NO 0 | ||
83 | |||
84 | /** | ||
85 | * @def _MHD_MACRO_YES | ||
86 | * "Positive answer"/"true" for use in macros, meaningful for precompiler | ||
87 | */ | ||
88 | #define _MHD_MACRO_YES 1 | ||
89 | |||
90 | /** | ||
79 | * Close FD and abort execution if error is detected. | 91 | * Close FD and abort execution if error is detected. |
80 | * @param fd the FD to close | 92 | * @param fd the FD to close |
81 | */ | 93 | */ |
@@ -84,11 +96,33 @@ | |||
84 | MHD_PANIC (_ ("Failed to close FD.\n")); \ | 96 | MHD_PANIC (_ ("Failed to close FD.\n")); \ |
85 | } while (0) | 97 | } while (0) |
86 | 98 | ||
99 | /* | ||
100 | #define EXTRA_CHECKS _MHD_MACRO_NO | ||
101 | * Not used. Behaviour is controlled by _DEBUG/NDEBUG macros. | ||
102 | */ | ||
103 | |||
104 | #ifndef _MHD_DEBUG_CONNECT | ||
105 | /** | ||
106 | * Print extra messages when establishing | ||
107 | * connections? (only adds non-error messages). | ||
108 | */ | ||
109 | #define _MHD_DEBUG_CONNECT _MHD_MACRO_NO | ||
110 | #endif /* ! _MHD_DEBUG_CONNECT */ | ||
111 | |||
112 | #ifndef _MHD_DEBUG_SEND_DATA | ||
113 | /** | ||
114 | * Should all data send be printed to stderr? | ||
115 | */ | ||
116 | #define _MHD_DEBUG_SEND_DATA _MHD_MACRO_NO | ||
117 | #endif /* ! _MHD_DEBUG_SEND_DATA */ | ||
118 | |||
119 | #ifndef _MHD_DEBUG_CLOSE | ||
87 | /** | 120 | /** |
88 | * Should we perform additional sanity checks at runtime (on our internal | 121 | * Add extra debug messages with reasons for closing connections |
89 | * invariants)? This may lead to aborts, but can be useful for debugging. | 122 | * (non-error reasons). |
90 | */ | 123 | */ |
91 | #define EXTRA_CHECKS MHD_NO | 124 | #define _MHD_DEBUG_CLOSE _MHD_MACRO_NO |
125 | #endif /* ! _MHD_DEBUG_CLOSE */ | ||
92 | 126 | ||
93 | #define MHD_MAX(a,b) (((a)<(b)) ? (b) : (a)) | 127 | #define MHD_MAX(a,b) (((a)<(b)) ? (b) : (a)) |
94 | #define MHD_MIN(a,b) (((a)<(b)) ? (a) : (b)) | 128 | #define MHD_MIN(a,b) (((a)<(b)) ? (a) : (b)) |