]> sourceware.org Git - newlib-cygwin.git/commitdiff
Final sync of pseudo-reloc.c with mingw64 and cygwin
authorCharles Wilson <cygwin@cwilson.fastmail.fm>
Mon, 2 Nov 2009 12:16:21 +0000 (12:16 +0000)
committerCharles Wilson <cygwin@cwilson.fastmail.fm>
Mon, 2 Nov 2009 12:16:21 +0000 (12:16 +0000)
winsup/mingw/ChangeLog
winsup/mingw/pseudo-reloc.c

index abe67bbda9a61d5e6ce545fca854d377eae7003a..62ae570dbdd093737ebee900441133948ca9c653 100644 (file)
@@ -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.
index 736f5318df3b8deb492a1385d0b5a6f98e2fabc5..77f041114d738b82d27ff176b485cf10648421c1 100644 (file)
@@ -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);
This page took 0.035968 seconds and 5 git commands to generate.