Changeset 1835 for trunk/src/kmk/make.h


Ignore:
Timestamp:
Oct 11, 2008, 9:18:45 PM (17 years ago)
Author:
bird
Message:

kmk: fixed assertion + made them useful.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/kmk/make.h

    r1834 r1835  
    150150#endif
    151151
    152 #ifdef KMK
     152#if defined(KMK) || defined(CONFIG_WITH_VALUE_LENGTH)
    153153# ifdef _MSC_VER
    154 #  define MY_INLINE  _inline static
     154#  define MY_INLINE     _inline static
     155#  define MY_DBGBREAK   __debugbreak()
    155156# elif defined(__GNUC__)
    156 #  define MY_INLINE  static __inline__
    157 # else
    158 #  define MY_INLINE  static
    159 # endif
    160 #endif /* KMK */
    161 #if defined(CONFIG_WITH_VALUE_LENGTH) || defined(KMK)
     157#  define MY_INLINE     static __inline__
     158#  if defined(__i386__) || defined(__x86_64__)
     159#   define MY_DBGBREAK  __asm__ __volatile__ ("int3")
     160#else
     161#   define MY_DBGBREAK  assert(0)
     162#  endif
     163# else
     164#  define MY_INLINE     static
     165#  define MY_DBGBREAK  assert(0)
     166# endif
    162167# ifndef NDEBUG
    163168#  define MY_ASSERT_MSG(expr, printfargs) \
    164     do { if (!(expr)) { printf printfargs; assert(expr); } } while (0)
     169    do { if (!(expr)) { printf printfargs; MY_DBGBREAK; } } while (0)
    165170# else
    166171#  define MY_ASSERT_MSG(expr, printfargs)   do { } while (0)
Note: See TracChangeset for help on using the changeset viewer.