From 8762951e1db488d9f84e67e1007f0d54a675f70e Mon Sep 17 00:00:00 2001 From: Christopher Faylor Date: Thu, 27 Feb 2003 15:10:21 +0000 Subject: merge from trunk --- winsup/cygwin/ChangeLog | 18 ++++++++++++++++++ winsup/cygwin/ChangeLog.branch | 5 +++++ winsup/cygwin/cygthread.cc | 2 +- winsup/cygwin/cygwin-gperf | 14 +++++++++++++- winsup/cygwin/devices.gperf | 6 ------ winsup/cygwin/mmap.cc | 2 +- winsup/cygwin/sec_helper.cc | 3 +++ winsup/cygwin/syslog.cc | 3 --- 8 files changed, 41 insertions(+), 12 deletions(-) diff --git a/winsup/cygwin/ChangeLog b/winsup/cygwin/ChangeLog index 6c313cde75b..4065d80c879 100644 --- a/winsup/cygwin/ChangeLog +++ b/winsup/cygwin/ChangeLog @@ -1,3 +1,21 @@ +2003-02-27 Christopher Faylor + + * cygthread::detach: Improve error message. + +2003-02-26 Pierre Humblet + + * sec_helper.cc (get_sids_info): debug_print owner_sid and group_sid. + +2003-02-25 Corinna Vinschen + + * mmap.cc (mmap64): Fix returned address by taking the granularity + into account. + +2003-02-23 Pierre Humblet + + * syslog.cc (syslog): Do not unlock the file before closing it + and remove debug_printf about stream errors. + 2003-02-22 Christopher Faylor * cygmalloc.h: Remove MORECORE_CANNOT_TRIM. It's not true. diff --git a/winsup/cygwin/ChangeLog.branch b/winsup/cygwin/ChangeLog.branch index 83c8445a8ac..0fcc2910016 100644 --- a/winsup/cygwin/ChangeLog.branch +++ b/winsup/cygwin/ChangeLog.branch @@ -1,3 +1,8 @@ +2003-02-24 Christopher Faylor + + * device.gperf: Remove nonsensical devices. + * cygwin-gperf: Special case some devices. + 2003-02-23 Christopher Faylor * cygwin-gperf: Fix typo in FH_FS static storage. diff --git a/winsup/cygwin/cygthread.cc b/winsup/cygwin/cygthread.cc index 2099f19bea5..ca57a9a467a 100644 --- a/winsup/cygwin/cygthread.cc +++ b/winsup/cygwin/cygthread.cc @@ -288,7 +288,7 @@ cygthread::detach (HANDLE sigwait) w4[1] = *this; res = WaitForSingleObject (sigwait, INFINITE); if (res != WAIT_OBJECT_0) - system_printf ("WFSO sigwait failed, res %u", res); + system_printf ("WFSO sigwait %p failed, res %u, %E", sigwait, res); res = WaitForMultipleObjects (2, w4, FALSE, INFINITE); if (res != WAIT_OBJECT_0) /* nothing */; diff --git a/winsup/cygwin/cygwin-gperf b/winsup/cygwin/cygwin-gperf index 4a989af0578..3b083732a01 100755 --- a/winsup/cygwin/cygwin-gperf +++ b/winsup/cygwin/cygwin-gperf @@ -18,7 +18,10 @@ my %fh_declare = ( 'fs_dev' => '&fs_dev_storage', 'proc_dev' => '&proc_dev_storage', 'registry_dev' => '®istry_dev_storage', - 'process_dev' => '&process_dev_storage' + 'process_dev' => '&process_dev_storage', + 'piper_dev' => '&piper_dev_storage', + 'pipew_dev' => '&pipew_dev_storage', + 'socket_dev' => '&socket_dev_storage' ); foreach (@lines) { @@ -46,6 +49,15 @@ static const device registry_dev_storage = static const device process_dev_storage = {"", FH_PROCESS, "", 0, 0, 0, 0}; +static const device socket_dev_storage = + {"", FH_SOCKET, "", 0, 0, 0, 0}; + +static const device piper_dev_storage = + {"", FH_PIPER, "", 0, 0, 0, 0}; + +static const device pipew_dev_storage = + {"", FH_PIPEW, "", 0, 0, 0, 0}; + EOF for my $f (sort keys %fh_declare) { $_ .= "const device *$f = $fh_declare{$f};\n"; diff --git a/winsup/cygwin/devices.gperf b/winsup/cygwin/devices.gperf index 8e013e3a6b9..5251f59f302 100644 --- a/winsup/cygwin/devices.gperf +++ b/winsup/cygwin/devices.gperf @@ -34,13 +34,7 @@ struct device; "/dev/com", FH_SERIAL, "\\.\\com%d", 1, 99 "/dev/ttyS", FH_SERIAL, "\\.\\com%d", 0, 99, -1 "/dev/pipe", FH_PIPE, "\\dev\\pipe", 0, 0, 0, 0 -"/dev/piper", FH_PIPER, "\\dev\\piper", 0, 0, 0, 0 -"/dev/pipew", FH_PIPEW, "\\dev\\pipew", 0, 0, 0, 0 "/dev/fifo", FH_FIFO, "\\dev\\fifo", 0, 0, 0, 0 -"/dev/streamsocket", FH_SOCKET, "\\dev\\socket", 0, 0, 0, 0 -"/dev/tcp", FH_SOCKET, "\\dev\\socket", 0, 0, 0, 0 -"/dev/udp", FH_SOCKET, "\\dev\\socket", 0, 0, 0, 0 -"/dev/dgsocket", FH_SOCKET, "\\dev\\socket", 0, 0, 0, 0 "/dev/st", FH_TAPE, "\\Device\\Tape%d", 0, 127 "/dev/nst", FH_NTAPE, "\\Device\\Tape%d", 0, 127 "/dev/fd", FH_FLOPPY, "\\Device\\Floppy%d", 0, 15 diff --git a/winsup/cygwin/mmap.cc b/winsup/cygwin/mmap.cc index 920f93e3ea4..f28721ac8b8 100644 --- a/winsup/cygwin/mmap.cc +++ b/winsup/cygwin/mmap.cc @@ -578,7 +578,7 @@ mmap64 (caddr_t addr, size_t len, int prot, int flags, int fd, __off64_t off) /* Insert into the list */ mmap_record *rec = map_list->add_record (mmap_rec, off, len); - caddr_t ret = rec->get_address () + off; + caddr_t ret = rec->get_address () + (off - gran_off); syscall_printf ("%x = mmap() succeeded", ret); ReleaseResourceLock (LOCK_MMAP_LIST, READ_LOCK | WRITE_LOCK, "mmap"); return ret; diff --git a/winsup/cygwin/sec_helper.cc b/winsup/cygwin/sec_helper.cc index e5d8d6f5cb9..95c851ae4bc 100644 --- a/winsup/cygwin/sec_helper.cc +++ b/winsup/cygwin/sec_helper.cc @@ -193,6 +193,9 @@ get_sids_info (cygpsid owner_sid, cygpsid group_sid, __uid32_t * uidret, __gid32 struct __group32 *gr = NULL; bool ret = false; + owner_sid.debug_print ("get_sids_info: owner SID ="); + group_sid.debug_print ("get_sids_info: group SID ="); + if (group_sid == cygheap->user.groups.pgsid) *gidret = myself->gid; else if ((gr = internal_getgrsid (group_sid))) diff --git a/winsup/cygwin/syslog.cc b/winsup/cygwin/syslog.cc index 761708f1d3f..67629b2f900 100644 --- a/winsup/cygwin/syslog.cc +++ b/winsup/cygwin/syslog.cc @@ -406,9 +406,6 @@ syslog (int priority, const char *message, ...) fputs (timestamp, fp); fputs (msg_strings[0], fp); fputc ('\n', fp); - UnlockFile (fHandle, 0, 0, 1, 0); - if (ferror (fp)) - debug_printf ("error in writing syslog"); fclose (fp); } } -- cgit v1.2.1