Changes in src/libcfa/libhdr/libdebug.h [9d944b2:d9c44c3]
- File:
-
- 1 edited
-
src/libcfa/libhdr/libdebug.h (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
src/libcfa/libhdr/libdebug.h
r9d944b2 rd9c44c3 25 25 #endif 26 26 27 #ifdef __cforall28 extern "C" {29 #endif30 #include <stdarg.h>31 32 extern void __lib_debug_write( int fd, const char *buffer, int len );33 extern void __lib_debug_acquire();34 extern void __lib_debug_release();35 extern void __lib_debug_print_safe ( const char fmt[], ... ) __attribute__(( format (printf, 1, 2) ));36 extern void __lib_debug_print_nolock( const char fmt[], ... ) __attribute__(( format (printf, 1, 2) ));37 extern void __lib_debug_print_vararg( const char fmt[], va_list arg );38 extern void __lib_debug_print_buffer( char buffer[], int buffer_size, const char fmt[], ... ) __attribute__(( format (printf, 3, 4) ));39 #ifdef __cforall40 }41 #endif42 43 27 #ifdef __CFA_DEBUG_PRINT__ 44 #define LIB_DEBUG_WRITE( fd, buffer, len ) __lib_debug_write( fd, buffer, len ) 45 #define LIB_DEBUG_ACQUIRE() __lib_debug_acquire() 46 #define LIB_DEBUG_RELEASE() __lib_debug_release() 47 #define LIB_DEBUG_PRINT_SAFE(...) __lib_debug_print_safe (__VA_ARGS__) 48 #define LIB_DEBUG_PRINT_NOLOCK(...) __lib_debug_print_nolock (__VA_ARGS__) 49 #define LIB_DEBUG_PRINT_BUFFER(...) __lib_debug_print_buffer (__VA_ARGS__) 28 #define LIB_DEBUG_PRINTF(...) printf (__VA_ARGS__) 29 #define LIB_DEBUG_FPRINTF(...) fprintf (stderr, __VA_ARGS__) 50 30 #else 51 #define LIB_DEBUG_WRITE(...) ((void)0) 52 #define LIB_DEBUG_ACQUIRE() ((void)0) 53 #define LIB_DEBUG_RELEASE() ((void)0) 54 #define LIB_DEBUG_PRINT_SAFE(...) ((void)0) 55 #define LIB_DEBUG_PRINT_NOLOCK(...) ((void)0) 56 #define LIB_DEBUG_PRINT_BUFFER(...) ((void)0) 31 #define LIB_DEBUG_PRINTF(...) ((void)0) 32 #define LIB_DEBUG_FPRINTF(...) ((void)0) 57 33 #endif 58 34
Note:
See TracChangeset
for help on using the changeset viewer.