Ignore:
Timestamp:
Jul 12, 2017, 9:50:58 PM (4 years ago)
Author:
Peter A. Buhr <pabuhr@…>
Branches:
aaron-thesis, arm-eh, cleanup-dtors, deferred_resn, demangler, jacob/cs343-translation, jenkins-sandbox, master, new-ast, new-ast-unique-expr, new-env, no_list, persistent-indexer, resolv-new, with_gc
Children:
1a6e855
Parents:
8b47e50 (diff), acb89ed (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the (diff) links above to see all the changes relative to each parent.
Message:

Merge branch 'master' of plg2:software/cfa/cfa-cc

File:
1 edited

Legend:

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

    r8b47e50 ref6851a  
    1818
    1919#ifdef __CFA_DEBUG__
    20         #define LIB_DEBUG_DO(x) x
    21         #define LIB_NO_DEBUG_DO(x) ((void)0)
     20        #define LIB_DEBUG_DO(...) __VA_ARGS__
     21        #define LIB_NO_DEBUG_DO(...)
     22        #define DEBUG_CTX __PRETTY_FUNCTION__
     23        #define DEBUG_CTX2 , __PRETTY_FUNCTION__
     24        #define DEBUG_CTX_PARAM const char * caller
     25        #define DEBUG_CTX_PARAM2 , const char * caller
    2226#else
    23         #define LIB_DEBUG_DO(x) ((void)0)
    24         #define LIB_NO_DEBUG_DO(x) x     
     27        #define LIB_DEBUG_DO(...)
     28        #define LIB_NO_DEBUG_DO(...) __VA_ARGS__
     29        #define DEBUG_CTX
     30        #define DEBUG_CTX2
     31        #define DEBUG_CTX_PARAM
     32        #define DEBUG_CTX_PARAM2
    2533#endif
    2634
     
    5159
    5260#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__)
     61        #define LIB_DEBUG_WRITE( fd, buffer, len )     __lib_debug_write( fd, buffer, len )
     62        #define LIB_DEBUG_ACQUIRE()                    __lib_debug_acquire()
     63        #define LIB_DEBUG_RELEASE()                    __lib_debug_release()
     64        #define LIB_DEBUG_PRINT_SAFE(...)              __lib_debug_print_safe   (__VA_ARGS__)
     65        #define LIB_DEBUG_PRINT_NOLOCK(...)            __lib_debug_print_nolock (__VA_ARGS__)
     66        #define LIB_DEBUG_PRINT_BUFFER(...)            __lib_debug_print_buffer (__VA_ARGS__)
     67        #define LIB_DEBUG_PRINT_BUFFER_DECL(fd, ...)   char text[256]; int len = snprintf( text, 256, __VA_ARGS__ ); __lib_debug_write( fd, text, len );
     68        #define LIB_DEBUG_PRINT_BUFFER_LOCAL(fd, ...)  len = snprintf( text, 256, __VA_ARGS__ ); __lib_debug_write( fd, text, len );
    5969#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)
     70        #define LIB_DEBUG_WRITE(...)               ((void)0)
     71        #define LIB_DEBUG_ACQUIRE()                ((void)0)
     72        #define LIB_DEBUG_RELEASE()                ((void)0)
     73        #define LIB_DEBUG_PRINT_SAFE(...)          ((void)0)
     74        #define LIB_DEBUG_PRINT_NOLOCK(...)        ((void)0)
     75        #define LIB_DEBUG_PRINT_BUFFER(...)        ((void)0)
     76        #define LIB_DEBUG_PRINT_BUFFER_DECL(...)   ((void)0)
     77        #define LIB_DEBUG_PRINT_BUFFER_LOCAL(...)  ((void)0)
    6678#endif
    6779
Note: See TracChangeset for help on using the changeset viewer.