diff options
author | Corinna Vinschen <corinna@vinschen.de> | 2011-05-01 14:35:12 +0000 |
---|---|---|
committer | Corinna Vinschen <corinna@vinschen.de> | 2011-05-01 14:35:12 +0000 |
commit | 79e741ef6f0882f993e4b0767cc62b6b417f30cd (patch) | |
tree | f5465cbddbd551b0bb6d4699beb96427e76cfc85 /winsup/cygwin/assert.cc | |
parent | c60d0bbe688ae9ad37e56ab8ba73124e8b6c73b7 (diff) | |
download | cygnal-79e741ef6f0882f993e4b0767cc62b6b417f30cd.tar.gz cygnal-79e741ef6f0882f993e4b0767cc62b6b417f30cd.tar.bz2 cygnal-79e741ef6f0882f993e4b0767cc62b6b417f30cd.zip |
Throughout, use user32 UNICODE functions rather than ANSI functions.
* autoload.cc: Convert all definitions for ANSI user32 functions to
definitions for the corresponding UNICODE function.
(SendMessageA): Remove.
(SendNotifyMessageW): Define.
* fhandler_windows.cc (fhandler_windows::write): Use SendNotifyMessageW
call rather than SendMessage to make function always return immediately.
(fhandler_windows::read): Make function interruptible and a cancellation
point. Handle O_NONBLOCK.
* select.cc (peek_serial): Don't wait for signal_arrived here.
* window.cc (wininfo::winthread): Call CreateWindowExW directly rather
than CreateWindow wrapper.
Diffstat (limited to 'winsup/cygwin/assert.cc')
-rw-r--r-- | winsup/cygwin/assert.cc | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/winsup/cygwin/assert.cc b/winsup/cygwin/assert.cc index a47a3827f..edd0ee7a6 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, 2007, 2008, 2009 Red Hat, Inc. + Copyright 1997, 1998, 2000, 2001, 2007, 2008, 2009, 2011 Red Hat, Inc. This file is part of Cygwin. @@ -37,13 +37,13 @@ __assert_func (const char *file, int line, const char *func, OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL, NULL); if (h == INVALID_HANDLE_VALUE) { - char *buf; - - buf = (char *) alloca (100 + strlen (failedexpr)); - __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); + PWCHAR buf = (PWCHAR) alloca ((100 + strlen (failedexpr)) + * sizeof (WCHAR)); + __small_swprintf (buf, + L"Failed assertion\n\t%s\nat line %d of file %s%s%s", + failedexpr, line, file, + func ? "\nin function " : "", func ? func : ""); + MessageBoxW (NULL, buf, NULL, MB_OK | MB_ICONERROR | MB_TASKMODAL); } else { |