/[ascend]/trunk/test/assertimpl.c
ViewVC logotype

Diff of /trunk/test/assertimpl.c

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 100 by jds, Mon Oct 31 03:39:15 2005 UTC revision 101 by jds, Sat Dec 10 04:22:07 2005 UTC
# Line 40  void enable_assert_longjmp(int TRUE_or_F Line 40  void enable_assert_longjmp(int TRUE_or_F
40    
41  /* Override implementation of assert using the signature of the relevant compiler */  /* Override implementation of assert using the signature of the relevant compiler */
42  #ifdef __WIN32__  #ifdef __WIN32__
43  #if defined(__GNUC__) || defined(__MINGW32_VERSION)  #  if defined(__GNUC__) || defined(__MINGW32_VERSION)
44  _CRTIMP void __cdecl _assert(const char *cond, const char *file, int line)  _CRTIMP void __cdecl _assert(const char *cond, const char *file, int line)
45    {
46    
47  #elif defined(_MSC_VER)  #  elif defined(_MSC_VER)
48  _CRTIMP void __cdecl _assert(const char *cond, const char *file, unsigned line)  _CRTIMP void __cdecl _assert(const char *cond, const char *file, unsigned line)
49    {
50    
51  #elif defined(__BORLANDC__)  #  elif defined(__BORLANDC__)
52  #ifdef __cplusplus  #    ifdef __cplusplus
53  namespace std {  namespace std {
54  #endif  #    endif
55  void _RTLENTRY _EXPFUNC _assert(char *cond, char *file, int line)  void _RTLENTRY _EXPFUNC _assert(char *cond, char *file, int line)
56    {
57    
58  #else  #  else
59  #error Unrecognized compiler.  #    error Unrecognized compiler.
60    
61  #endif  #  endif
62  #else    /* !__WIN32__ */  #else    /* !__WIN32__ */
63  #if defined(__GNUC__)  #  if defined(__GNUC__)
64  void __assert_fail (const char *cond, const char *file,  void __assert_fail (const char *cond, const char *file,
65             unsigned int line, const char *__function)             unsigned int line, const char *__function)
66  /*     __THROW __attribute__ ((__noreturn__)) */  /*     __THROW __attribute__ ((__noreturn__)) */
 #else  
 #error Unrecognized compiler.  
 #endif    
 #endif    /* __WIN32__ */  
67  {  {
68      UNUSED_PARAMETER(__function);
69    
70    #  else
71    #    error Unrecognized compiler.
72    #  endif
73    #endif    /* __WIN32__ */
74    
75    g_assert_status = ast_failed;    g_assert_status = ast_failed;
76    if (TRUE == f_use_longjump) {    if (TRUE == f_use_longjump) {
77      longjmp(g_asc_test_env, -1);      longjmp(g_asc_test_env, -1);
# Line 77  void __assert_fail (const char *cond, co Line 83  void __assert_fail (const char *cond, co
83  }  }
84    
85  #if defined(__BORLANDC__)  #if defined(__BORLANDC__)
86  #ifdef __cplusplus  #  ifdef __cplusplus
87  }  }
88  #endif  #  endif
89  #endif  #endif
90    
91  static int f_asc_assert_failed = FALSE;  static int f_asc_assert_failed = FALSE;

Legend:
Removed from v.100  
changed lines
  Added in v.101

john.pye@anu.edu.au
ViewVC Help
Powered by ViewVC 1.1.22