Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
M
mongoose
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Packages
Packages
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
submodule
mongoose
Commits
d60c99b0
Commit
d60c99b0
authored
Oct 31, 2015
by
Deomid Ryabkov
Committed by
Sergey Lyubka
Nov 18, 2015
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Make MG debug go to stderr
PUBLISHED_FROM=11618b6b2a50c62dd612d241c6b13a9aab357909
parent
b8aeba06
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
21 additions
and
11 deletions
+21
-11
mongoose.c
mongoose.c
+0
-0
mongoose.h
mongoose.h
+21
-11
No files found.
mongoose.c
View file @
d60c99b0
This diff is collapsed.
Click to expand it.
mongoose.h
View file @
d60c99b0
...
...
@@ -26,6 +26,10 @@
#ifdef MG_LOCALS
#include <mg_locals.h>
#endif
#if defined(MG_ENABLE_DEBUG) && !defined(CS_ENABLE_DEBUG)
#define CS_ENABLE_DEBUG
#endif
/*
* Copyright (c) 2015 Cesanta Software Limited
* All rights reserved
...
...
@@ -260,25 +264,31 @@ int64_t strtoll(const char *str, char **endptr, int base);
#endif
#endif
/* !_WIN32 */
#define __DBG(x) \
#ifndef ARRAY_SIZE
#define ARRAY_SIZE(array) (sizeof(array) / sizeof(array[0]))
#endif
#endif
/* OSDEP_HEADER_INCLUDED */
#ifndef _CS_DBG_H_
#define _CS_DBG_H_
#ifdef CS_ENABLE_DEBUG
void
cs_dbg_printf
(
const
char
*
fmt
,
...);
#define __DBG(x) \
do { \
printf("%-20s ", __func__); \
printf x; \
putchar('\n'); \
fflush(stdout); \
fprintf(stderr, "%-20s ", __func__); \
cs_dbg_printf x; \
} while (0)
#ifdef MG_ENABLE_DEBUG
#define DBG __DBG
#else
#define DBG(x)
#endif
#ifndef ARRAY_SIZE
#define ARRAY_SIZE(array) (sizeof(array) / sizeof(array[0]))
#endif
#endif
/*
OSDEP_HEADER_INCLUDED
*/
#endif
/*
_CS_DBG_H_
*/
/*
* Copyright (c) 2015 Cesanta Software Limited
* All rights reserved
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment