Welcome to mirror list, hosted at ThFree Co, Russian Federation.

cygwin.com/git/newlib-cygwin.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCharles Wilson <cygwin@cwilson.fastmail.fm>2009-11-02 15:16:21 +0300
committerCharles Wilson <cygwin@cwilson.fastmail.fm>2009-11-02 15:16:21 +0300
commit599b80fc864f6fc98313a41611693e907357e72d (patch)
treec5fb4d928726885668cb895e2271c105fc1a7015
parenta657970571be50681055aa60289e35f312dea761 (diff)
Final sync of pseudo-reloc.c with mingw64 and cygwin
-rw-r--r--winsup/mingw/ChangeLog6
-rw-r--r--winsup/mingw/pseudo-reloc.c5
2 files changed, 9 insertions, 2 deletions
diff --git a/winsup/mingw/ChangeLog b/winsup/mingw/ChangeLog
index abe67bbda..62ae570db 100644
--- a/winsup/mingw/ChangeLog
+++ b/winsup/mingw/ChangeLog
@@ -1,3 +1,9 @@
+2009-11-02 Charles Wilson <mingw@cwilson.fastmail.fm>
+
+ Final sync of pseudo-reloc.c with mingw64 and cygwin
+ * lib/pseudo-reloc.c (__report_error) [CYGWIN]: Correct size bug
+ regarding error messages.
+
2009-10-29 Charles Wilson <mingw@cwilson.fastmail.fm>
Honor DESTDIR for winsup/mingw and winsup/w32api.
diff --git a/winsup/mingw/pseudo-reloc.c b/winsup/mingw/pseudo-reloc.c
index 736f5318d..77f041114 100644
--- a/winsup/mingw/pseudo-reloc.c
+++ b/winsup/mingw/pseudo-reloc.c
@@ -93,7 +93,8 @@ __report_error (const char *msg, ...)
char buf[SHORT_MSG_BUF_SZ];
wchar_t module[MAX_PATH];
char * posix_module = NULL;
- static const char * UNKNOWN_MODULE = "<unknown module>: ";
+ static const char UNKNOWN_MODULE[] = "<unknown module>: ";
+ static const size_t UNKNOWN_MODULE_LEN = sizeof (UNKNOWN_MODULE) - 1;
static const char CYGWIN_FAILURE_MSG[] = "Cygwin runtime failure: ";
static const size_t CYGWIN_FAILURE_MSG_LEN = sizeof (CYGWIN_FAILURE_MSG) - 1;
DWORD len;
@@ -130,7 +131,7 @@ __report_error (const char *msg, ...)
WriteFile (errh, (PCVOID)CYGWIN_FAILURE_MSG,
CYGWIN_FAILURE_MSG_LEN, &done, NULL);
WriteFile (errh, (PCVOID)UNKNOWN_MODULE,
- sizeof(UNKNOWN_MODULE), &done, NULL);
+ UNKNOWN_MODULE_LEN, &done, NULL);
WriteFile (errh, (PCVOID)buf, len, &done, NULL);
}
WriteFile (errh, (PCVOID)"\n", 1, &done, NULL);