Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
P
picoquic
Manage
Activity
Members
Labels
Plan
Issues
0
Issue boards
Milestones
Wiki
Requirements
Code
Merge requests
0
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Kashyap Thimmaraju
picoquic
Commits
462426f4
Commit
462426f4
authored
7 years ago
by
Bastian Köcher
Browse files
Options
Downloads
Patches
Plain Diff
Adds Cmake switch `DISABLE_DEBUG_PRINTF` for disabling debug printf macro
parent
c63e403f
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
CMakeLists.txt
+4
-0
4 additions, 0 deletions
CMakeLists.txt
picoquic/util.h
+10
-1
10 additions, 1 deletion
picoquic/util.h
with
14 additions
and
1 deletion
CMakeLists.txt
+
4
−
0
View file @
462426f4
...
...
@@ -9,6 +9,10 @@ SET(CMAKE_C_STANDARD 11)
SET
(
CMAKE_C_FLAGS
"-std=c99 -Wall -O2 -g
${
CC_WARNING_FLAGS
}
${
CMAKE_C_FLAGS
}
"
)
if
((
NOT
${
DISABLE_DEBUG_PRINTF
}
)
OR
(
NOT DEFINED DISABLE_DEBUG_PRINTF
))
SET
(
CMAKE_C_FLAGS
"-DENABLE_DEBUG_PRINTF
${
CMAKE_C_FLAGS
}
"
)
endif
()
INCLUDE_DIRECTORIES
(
picoquic picoquictest ../picotls/include
${
PICOTLS_INCLUDE_DIR
}
)
...
...
This diff is collapsed.
Click to expand it.
picoquic/util.h
+
10
−
1
View file @
462426f4
...
...
@@ -51,10 +51,12 @@ int picoquic_is_connection_id_null(picoquic_connection_id_t cnx_id);
int
picoquic_compare_connection_id
(
picoquic_connection_id_t
*
cnx_id1
,
picoquic_connection_id_t
*
cnx_id2
);
uint64_t
picoquic_val64_connection_id
(
picoquic_connection_id_t
cnx_id
);
#ifndef M
IN
#ifndef M
AX
#define MAX(a, b) ((a) > (b) ? (a) : (b))
#endif
#ifdef ENABLE_DEBUG_PRINTF
#define DBG_PRINTF_FILENAME_MAX 24
#define DBG_PRINTF(fmt, ...) \
debug_printf("%s:%u [%s]: " fmt "\n", \
...
...
@@ -67,4 +69,11 @@ uint64_t picoquic_val64_connection_id(picoquic_connection_id_t cnx_id);
exit(1); \
} while (0)
#else
#define DBG_PRINTF(fmt, ...)
#define DBG_FATAL_PRINTF(fmt, ...)
#endif //#ifdef ENABLE_DEBUG_PRINTF
#endif
This diff is collapsed.
Click to expand it.
Preview
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment