summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--winsup/cygwin/ChangeLog12
-rw-r--r--winsup/cygwin/debug.cc5
-rw-r--r--winsup/cygwin/dlfcn.cc4
-rw-r--r--winsup/cygwin/fhandler.h4
-rw-r--r--winsup/cygwin/pipe.cc8
5 files changed, 22 insertions, 11 deletions
diff --git a/winsup/cygwin/ChangeLog b/winsup/cygwin/ChangeLog
index 0197dd377..83accc0c8 100644
--- a/winsup/cygwin/ChangeLog
+++ b/winsup/cygwin/ChangeLog
@@ -1,5 +1,17 @@
2007-07-09 Christopher Faylor <me+cygwin@cgf.cx>
+ * debug.cc (close_handle): Change debug output format slightly.
+
+ * dlfcn.cc (dlclose): Don't close handle returned from
+ GetModuleHandle(NULL).
+
+ * fhandler.h (fhandler_pipe::create): Remove obsolete argument.
+ (fhandler_pipe::create): Ditto.
+ * fhandler.cc (fhandler_pipe::create): Ditto.
+ (fhandler_pipe::create): Ditto.
+
+2007-07-09 Christopher Faylor <me+cygwin@cgf.cx>
+
* strsig.cc (__signals): New macro.
(sys_sigabbrev): New array of signal strings, patterned after linux.
(siglist): Use __signals.
diff --git a/winsup/cygwin/debug.cc b/winsup/cygwin/debug.cc
index bb75b3162..4ef0872bc 100644
--- a/winsup/cygwin/debug.cc
+++ b/winsup/cygwin/debug.cc
@@ -1,6 +1,7 @@
/* debug.cc
- Copyright 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005 Red Hat, Inc.
+ Copyright 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007
+ Red Hat, Inc.
This software is a copyrighted work licensed under the terms of the
Cygwin license. Please consult the file "CYGWIN_LICENSE" for
@@ -240,7 +241,7 @@ close_handle (const char *func, int ln, HANDLE h, const char *name, bool force)
#if 1 /* Uncomment to see CloseHandle failures */
if (!ret)
- small_printf ("CloseHandle(%s) %p failed %s:%d, %E\n", name, h, func, ln);
+ small_printf ("CloseHandle(%s<%p>) failed %s:%d, %E\n", name, h, func, ln);
#endif
return ret;
}
diff --git a/winsup/cygwin/dlfcn.cc b/winsup/cygwin/dlfcn.cc
index 5bea77419..3893045b3 100644
--- a/winsup/cygwin/dlfcn.cc
+++ b/winsup/cygwin/dlfcn.cc
@@ -145,12 +145,10 @@ int
dlclose (void *handle)
{
int ret = -1;
- void *temphandle = (void *) GetModuleHandle (NULL);
- if (temphandle == handle || FreeLibrary ((HMODULE) handle))
+ if (handle == GetModuleHandle (NULL) || FreeLibrary ((HMODULE) handle))
ret = 0;
if (ret)
set_dl_error ("dlclose");
- CloseHandle ((HMODULE) temphandle);
return ret;
}
diff --git a/winsup/cygwin/fhandler.h b/winsup/cygwin/fhandler.h
index 996f361cc..07b26607e 100644
--- a/winsup/cygwin/fhandler.h
+++ b/winsup/cygwin/fhandler.h
@@ -546,8 +546,8 @@ public:
int __stdcall fadvise (_off64_t, _off64_t, int) __attribute__ ((regparm (3)));
int __stdcall ftruncate (_off64_t, bool) __attribute__ ((regparm (3)));
int ready_for_read (int fd, DWORD howlong);
- static int create (fhandler_pipe *[2], unsigned, int, bool = false);
- static int create_selectable (LPSECURITY_ATTRIBUTES, HANDLE&, HANDLE&, DWORD, bool);
+ static int create (fhandler_pipe *[2], unsigned, int);
+ static int create_selectable (LPSECURITY_ATTRIBUTES, HANDLE&, HANDLE&, DWORD);
};
enum fifo_state
diff --git a/winsup/cygwin/pipe.cc b/winsup/cygwin/pipe.cc
index 637defb16..b9314aa4f 100644
--- a/winsup/cygwin/pipe.cc
+++ b/winsup/cygwin/pipe.cc
@@ -181,13 +181,13 @@ fhandler_pipe::dup (fhandler_base *child)
unlike CreatePipe, which returns a bool for success or failure. */
int
fhandler_pipe::create_selectable (LPSECURITY_ATTRIBUTES sa_ptr, HANDLE& r,
- HANDLE& w, DWORD psize, bool fifo)
+ HANDLE& w, DWORD psize)
{
/* Default to error. */
r = w = INVALID_HANDLE_VALUE;
/* Ensure that there is enough pipe buffer space for atomic writes. */
- if (!fifo && psize < PIPE_BUF)
+ if (psize < PIPE_BUF)
psize = PIPE_BUF;
char pipename[CYG_MAX_PATH];
@@ -269,13 +269,13 @@ fhandler_pipe::create_selectable (LPSECURITY_ATTRIBUTES sa_ptr, HANDLE& r,
}
int
-fhandler_pipe::create (fhandler_pipe *fhs[2], unsigned psize, int mode, bool fifo)
+fhandler_pipe::create (fhandler_pipe *fhs[2], unsigned psize, int mode)
{
HANDLE r, w;
SECURITY_ATTRIBUTES *sa = (mode & O_NOINHERIT) ? &sec_none_nih : &sec_none;
int res = -1;
- int ret = create_selectable (sa, r, w, psize, fifo);
+ int ret = create_selectable (sa, r, w, psize);
if (ret)
__seterrno_from_win_error (ret);
else