Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/libcfa/libhdr/libdebug.h

    r9d944b2 rd9c44c3  
    2525#endif
    2626
    27 #ifdef __cforall
    28 extern "C" {
    29 #endif
    30       #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 __cforall
    40 }
    41 #endif
    42 
    4327#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__)
    5030#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)
    5733#endif
    5834
Note: See TracChangeset for help on using the changeset viewer.