Index: cygwin.din =================================================================== RCS file: /cvs/src/src/winsup/cygwin/cygwin.din,v retrieving revision 1.176 diff -u -p -r1.176 cygwin.din --- cygwin.din 21 Jun 2007 15:57:54 -0000 1.176 +++ cygwin.din 27 Jun 2007 00:43:20 -0000 @@ -118,6 +118,7 @@ _asprintf = asprintf SIGFE asprintf_r = _asprintf_r SIGFE _asprintf_r SIGFE __assert SIGFE +__assert_func SIGFE __assertfail SIGFE atan NOSIGFE _atan = atan NOSIGFE Index: assert.cc =================================================================== RCS file: /cvs/src/src/winsup/cygwin/assert.cc,v retrieving revision 1.9 diff -u -p -r1.9 assert.cc --- assert.cc 19 Sep 2002 15:12:48 -0000 1.9 +++ assert.cc 27 Jun 2007 00:43:20 -0000 @@ -1,6 +1,6 @@ /* assert.cc: Handle the assert macro for WIN32. - Copyright 1997, 1998, 2000, 2001 Red Hat, Inc. + Copyright 1997, 1998, 2000, 2001, 2007 Red Hat, Inc. This file is part of Cygwin. @@ -23,6 +23,13 @@ details. */ extern "C" void __assert (const char *file, int line, const char *failedexpr) { + __assert_func (file, line, NULL, failedexpr); +} + +extern "C" void +__assert_func (const char *file, int line, const char *func, + const char *failedexpr) +{ HANDLE h; /* If we don't have a console in a Windows program, then bring up a @@ -35,15 +42,17 @@ __assert (const char *file, int line, co char *buf; buf = (char *) alloca (100 + strlen (failedexpr)); - __small_sprintf (buf, "Failed assertion\n\t%s\nat line %d of file %s", - failedexpr, line, file); + __small_sprintf (buf, "Failed assertion\n\t%s\nat line %d of file %s%s%s", + failedexpr, line, file, + func ? "\nin function " : "", func ? func : ""); MessageBox (NULL, buf, NULL, MB_OK | MB_ICONERROR | MB_TASKMODAL); } else { CloseHandle (h); - small_printf ("assertion \"%s\" failed: file \"%s\", line %d\n", - failedexpr, file, line); + small_printf ("assertion \"%s\" failed: file \"%s\", line %d%s%s\n", + failedexpr, file, line, + func ? ", function: " : "", func ? func : ""); } #ifdef DEBUGGING Index: include/cygwin/version.h =================================================================== RCS file: /cvs/src/src/winsup/cygwin/include/cygwin/version.h,v retrieving revision 1.246 diff -u -p -r1.246 version.h --- include/cygwin/version.h 21 Jun 2007 15:57:54 -0000 1.246 +++ include/cygwin/version.h 27 Jun 2007 00:43:20 -0000 @@ -313,12 +313,13 @@ details. */ 171: Export exp10, exp10f, pow10, pow10f, strcasestr, funopen, fopencookie. 172: Export getifaddrs, freeifaddrs. + 173: Export __assert_func. */ /* Note that we forgot to bump the api for ualarm, strtoll, strtoull */ #define CYGWIN_VERSION_API_MAJOR 0 -#define CYGWIN_VERSION_API_MINOR 172 +#define CYGWIN_VERSION_API_MINOR 173 /* There is also a compatibity version number associated with the shared memory regions. It is incremented when incompatible