summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEric Blake <eblake@redhat.com>2007-06-27 12:46:35 +0000
committerEric Blake <eblake@redhat.com>2007-06-27 12:46:35 +0000
commit048e00e01d23d1f8e59eb990ddc740b779f8f1f5 (patch)
treeca79cdb999e2d90381bc3afa66bfe8b899b93f51
parent3473e6bd7b268deb4314659009512d846a75b368 (diff)
downloadcygnal-048e00e01d23d1f8e59eb990ddc740b779f8f1f5.tar.gz
cygnal-048e00e01d23d1f8e59eb990ddc740b779f8f1f5.tar.bz2
cygnal-048e00e01d23d1f8e59eb990ddc740b779f8f1f5.zip
* assert.cc (__assert_func): New function, to match newlib header
change. * cygwin.din: Export __assert_func. * include/cygwin/version.h: Bump API minor number.
-rw-r--r--winsup/cygwin/ChangeLog9
-rw-r--r--winsup/cygwin/assert.cc19
-rw-r--r--winsup/cygwin/cygwin.din1
-rw-r--r--winsup/cygwin/include/cygwin/version.h3
4 files changed, 25 insertions, 7 deletions
diff --git a/winsup/cygwin/ChangeLog b/winsup/cygwin/ChangeLog
index b03732a5e..67b007087 100644
--- a/winsup/cygwin/ChangeLog
+++ b/winsup/cygwin/ChangeLog
@@ -1,3 +1,10 @@
+2007-06-27 Eric Blake <ebb9@byu.net>
+
+ * assert.cc (__assert_func): New function, to match newlib header
+ change.
+ * cygwin.din: Export __assert_func.
+ * include/cygwin/version.h: Bump API minor number.
+
2007-06-21 Corinna Vinschen <corinna@vinschen.de>
* autoload.cc (WSAIoctl): Remove.
@@ -536,7 +543,7 @@
* Makefile.in (DLL_IMPORTS): Add libntdll.a.
* autoload.cc: Remove all symbols from advapi32.dll, kernel32.dll and
ntdll.dll available on all platforms since NT4.
-
+
Throughout remove all usage of wincap.is_winnt.
* dcrt0.cc (dll_crt0_0): Remove call to mmap_init.
* fhandler.h (class fhandler_base): Remove has_changed flag.
diff --git a/winsup/cygwin/assert.cc b/winsup/cygwin/assert.cc
index 063c7b852..2d50c190c 100644
--- a/winsup/cygwin/assert.cc
+++ b/winsup/cygwin/assert.cc
@@ -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, const char *failedexpr)
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
diff --git a/winsup/cygwin/cygwin.din b/winsup/cygwin/cygwin.din
index 746053214..56a342c50 100644
--- a/winsup/cygwin/cygwin.din
+++ b/winsup/cygwin/cygwin.din
@@ -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
diff --git a/winsup/cygwin/include/cygwin/version.h b/winsup/cygwin/include/cygwin/version.h
index 51bcc6051..1337a283f 100644
--- a/winsup/cygwin/include/cygwin/version.h
+++ b/winsup/cygwin/include/cygwin/version.h
@@ -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