- Timestamp:
- Jun 23, 2017, 9:59:08 AM (7 years ago)
- Branches:
- ADT, aaron-thesis, arm-eh, ast-experimental, cleanup-dtors, deferred_resn, demangler, enum, forall-pointer-decay, jacob/cs343-translation, jenkins-sandbox, master, new-ast, new-ast-unique-expr, new-env, no_list, persistent-indexer, pthread-emulation, qualifiedEnum, resolv-new, with_gc
- Children:
- 1c273d0
- Parents:
- 7d9c987
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/libcfa/libhdr/libdebug.h
r7d9c987 raa3d77b 18 18 19 19 #ifdef __CFA_DEBUG__ 20 #define LIB_DEBUG_DO( x) x21 #define LIB_NO_DEBUG_DO( x)20 #define LIB_DEBUG_DO(...) __VA_ARGS__ 21 #define LIB_NO_DEBUG_DO(...) 22 22 #else 23 #define LIB_DEBUG_DO( x)24 #define LIB_NO_DEBUG_DO( x) x23 #define LIB_DEBUG_DO(...) 24 #define LIB_NO_DEBUG_DO(...) __VA_ARGS__ 25 25 #endif 26 26 … … 51 51 52 52 #ifdef __CFA_DEBUG_PRINT__ 53 #define LIB_DEBUG_WRITE( fd, buffer, len ) __lib_debug_write( fd, buffer, len ) 54 #define LIB_DEBUG_ACQUIRE() __lib_debug_acquire() 55 #define LIB_DEBUG_RELEASE() __lib_debug_release() 56 #define LIB_DEBUG_PRINT_SAFE(...) __lib_debug_print_safe (__VA_ARGS__) 57 #define LIB_DEBUG_PRINT_NOLOCK(...) __lib_debug_print_nolock (__VA_ARGS__) 58 #define LIB_DEBUG_PRINT_BUFFER(...) __lib_debug_print_buffer (__VA_ARGS__) 53 #define LIB_DEBUG_WRITE( fd, buffer, len ) __lib_debug_write( fd, buffer, len ) 54 #define LIB_DEBUG_ACQUIRE() __lib_debug_acquire() 55 #define LIB_DEBUG_RELEASE() __lib_debug_release() 56 #define LIB_DEBUG_PRINT_SAFE(...) __lib_debug_print_safe (__VA_ARGS__) 57 #define LIB_DEBUG_PRINT_NOLOCK(...) __lib_debug_print_nolock (__VA_ARGS__) 58 #define LIB_DEBUG_PRINT_BUFFER(...) __lib_debug_print_buffer (__VA_ARGS__) 59 #define LIB_DEBUG_PRINT_BUFFER_DECL(fd, ...) char text[256]; int len = snprintf( text, 256, __VA_ARGS__ ); __lib_debug_write( fd, text, len ); 60 #define LIB_DEBUG_PRINT_BUFFER_LOCAL(fd, ...) len = snprintf( text, 256, __VA_ARGS__ ); __lib_debug_write( fd, text, len ); 59 61 #else 60 #define LIB_DEBUG_WRITE(...) ((void)0) 61 #define LIB_DEBUG_ACQUIRE() ((void)0) 62 #define LIB_DEBUG_RELEASE() ((void)0) 63 #define LIB_DEBUG_PRINT_SAFE(...) ((void)0) 64 #define LIB_DEBUG_PRINT_NOLOCK(...) ((void)0) 65 #define LIB_DEBUG_PRINT_BUFFER(...) ((void)0) 62 #define LIB_DEBUG_WRITE(...) ((void)0) 63 #define LIB_DEBUG_ACQUIRE() ((void)0) 64 #define LIB_DEBUG_RELEASE() ((void)0) 65 #define LIB_DEBUG_PRINT_SAFE(...) ((void)0) 66 #define LIB_DEBUG_PRINT_NOLOCK(...) ((void)0) 67 #define LIB_DEBUG_PRINT_BUFFER(...) ((void)0) 68 #define LIB_DEBUG_PRINT_BUFFER_DECL(...) ((void)0) 69 #define LIB_DEBUG_PRINT_BUFFER_LOCAL(...) ((void)0) 66 70 #endif 67 71
Note: See TracChangeset
for help on using the changeset viewer.