jdk/src/share/instrument/JPLISAssert.h
changeset 13678 5c8001201f98
parent 5506 202f599c92aa
child 14342 8435a30053c1
equal deleted inserted replaced
13508:7c6aa31ff1b2 13678:5c8001201f98
    47 
    47 
    48 #ifndef JPLISASSERT_ENABLEASSERTIONS
    48 #ifndef JPLISASSERT_ENABLEASSERTIONS
    49 #define JPLISASSERT_ENABLEASSERTIONS    (0)
    49 #define JPLISASSERT_ENABLEASSERTIONS    (0)
    50 #endif
    50 #endif
    51 
    51 
       
    52 /* Use THIS_FILE when it is available. */
       
    53 #ifndef THIS_FILE
       
    54     #define THIS_FILE __FILE__
       
    55 #endif
    52 
    56 
    53 #if JPLISASSERT_ENABLEASSERTIONS
    57 #if JPLISASSERT_ENABLEASSERTIONS
    54 #define jplis_assert(x)             JPLISAssertCondition((jboolean)(x), #x, __FILE__, __LINE__)
    58 #define jplis_assert(x)             JPLISAssertCondition((jboolean)(x), #x, THIS_FILE, __LINE__)
    55 #define jplis_assert_msg(x, msg)    JPLISAssertConditionWithMessage((jboolean)(x), #x, msg, __FILE__, __LINE__)
    59 #define jplis_assert_msg(x, msg)    JPLISAssertConditionWithMessage((jboolean)(x), #x, msg, THIS_FILE, __LINE__)
    56 #else
    60 #else
    57 #define jplis_assert(x)
    61 #define jplis_assert(x)
    58 #define jplis_assert_msg(x, msg)
    62 #define jplis_assert_msg(x, msg)
    59 #endif
    63 #endif
    60 
    64