diff options
Diffstat (limited to 'picohttp_debug.h')
-rw-r--r-- | picohttp_debug.h | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/picohttp_debug.h b/picohttp_debug.h new file mode 100644 index 0000000..9454f49 --- /dev/null +++ b/picohttp_debug.h @@ -0,0 +1,27 @@ +#pragma once +#ifndef PICOHTTP_DEBUG_H +#define PICOHTTP_DEBUG_H + +#if 1 +#include <util/debug_utils.h> +#endif + +#ifndef debug_printf +#ifdef HOST_DEBUG +#include <stdio.h> +#define debug_printf(...) do{fprintf(stderr, __VA_ARGS__);}while(0) +#else +#define debug_printf(...) do{}while(0) +#endif +#endif + +#ifndef debug_putc +#ifdef HOST_DEBUG +#include <stdio.h> +#define debug_putc(x) do{fputc(x, stderr);}while(0) +#else +#define debug_putc(x) do{}while(0) +#endif +#endif + +#endif/*PICOHTTP_DEBUG_H*/ |