This is the mail archive of the
cygwin-patches
mailing list for the Cygwin project.
Re: Sync pseudo-reloc.c, round #2
- From: Charles Wilson <cygwin at cwilson dot fastmail dot fm>
- To: cygwin-patches at cygwin dot com
- Date: Sun, 25 Oct 2009 16:24:57 -0400
- Subject: Re: Sync pseudo-reloc.c, round #2
- References: <4AE4A701.3050206@cwilson.fastmail.fm>
Charles Wilson wrote:
> Tested on mingw32 and cygwin.
It occurred to me that I hadn't explicitly tested the error path with
this new version, and sure enough, there's a slight problem. Here's the
fix (relative to the previous patch):
--- pseudo-reloc.c.save 2009-10-25 15:45:43.595012200 -0400
+++ pseudo-reloc.c 2009-10-25 16:10:08.236212200 -0400
@@ -94,7 +94,7 @@
wchar_t module[MAX_PATH];
char * posix_module = NULL;
static const char * UNKNOWN_MODULE = "<unknown module>: ";
- static const char * CYGWIN_FAILURE_MSG = "Cygwin runtime failure: ";
+ static const char CYGWIN_FAILURE_MSG[] = "Cygwin runtime failure: ";
static const size_t CYGWIN_FAILURE_MSG_LEN = sizeof
(CYGWIN_FAILURE_MSG) - 1;
DWORD len;
DWORD done;
@@ -133,6 +133,8 @@
sizeof(UNKNOWN_MODULE), &done, NULL);
WriteFile (errh, (PCVOID)buf, len, &done, NULL);
}
+ WriteFile (errh, (PCVOID)"\n", 1, &done, NULL);
+
cygwin_internal (CW_EXIT_PROCESS,
STATUS_ILLEGAL_DLL_PSEUDO_RELOCATION,
1);