summaryrefslogtreecommitdiffstats
path: root/winsup/cygwin
diff options
context:
space:
mode:
authorChristopher Faylor <me@cgf.cx>2003-03-17 19:08:11 +0000
committerChristopher Faylor <me@cgf.cx>2003-03-17 19:08:11 +0000
commit3543669fd3f89f980180d914ead7e01397f8a502 (patch)
treebae0cab9587d1928f810183f31f7ade7f8eff2b5 /winsup/cygwin
parentdb14b4abb74c2b3be138f117636c7e2d7844f633 (diff)
downloadcygnal-3543669fd3f89f980180d914ead7e01397f8a502.tar.gz
cygnal-3543669fd3f89f980180d914ead7e01397f8a502.tar.bz2
cygnal-3543669fd3f89f980180d914ead7e01397f8a502.zip
* cygwin.din: Export btowc, trunc.
* include/cygwin/version.h: Reflect new exports. * syscalls.cc (_stat): Rename to stat to avoid newlib wrapper. * syscalls.cc (_fstat): Ditto. * fhandler_console.cc (fhandler_console::close): Correct check for current tty. Add debugging output when console is freed. (set_console_state_for_spawn): Add debugging output. * fhandler_tty.cc (fhandler_tty_slave::open): Don't decrement console open flag when vforking. * sigproc.cc (sigproc_terminate): Fix debugging output. * spawn.cc (handle): Eliminate second argument. (spawn_guts): Reflect elimination of argument change to handle. * syscalls.cc (setsid): Add debugging output when console is freed. * syscalls.cc (rename): Revert assumption that DELETE_ON_CLOSE works on Win9x.
Diffstat (limited to 'winsup/cygwin')
-rw-r--r--winsup/cygwin/ChangeLog24
-rw-r--r--winsup/cygwin/cygwin.din10
-rw-r--r--winsup/cygwin/fhandler_console.cc6
-rw-r--r--winsup/cygwin/include/cygwin/version.h5
-rw-r--r--winsup/cygwin/sigproc.cc2
-rw-r--r--winsup/cygwin/syscalls.cc23
6 files changed, 55 insertions, 15 deletions
diff --git a/winsup/cygwin/ChangeLog b/winsup/cygwin/ChangeLog
index ae083bf32..8f6e3c4b4 100644
--- a/winsup/cygwin/ChangeLog
+++ b/winsup/cygwin/ChangeLog
@@ -1,3 +1,27 @@
+2003-03-17 Christopher Faylor <cgf@redhat.com>
+
+ * cygwin.din: Export btowc, trunc.
+ * include/cygwin/version.h: Reflect new exports.
+ * syscalls.cc (_stat): Rename to stat to avoid newlib wrapper.
+ * syscalls.cc (_fstat): Ditto.
+
+2003-03-16 Christopher Faylor <cgf@redhat.com>
+
+ * fhandler_console.cc (fhandler_console::close): Correct check for
+ current tty. Add debugging output when console is freed.
+ (set_console_state_for_spawn): Add debugging output.
+ * fhandler_tty.cc (fhandler_tty_slave::open): Don't decrement console
+ open flag when vforking.
+ * sigproc.cc (sigproc_terminate): Fix debugging output.
+ * spawn.cc (handle): Eliminate second argument.
+ (spawn_guts): Reflect elimination of argument change to handle.
+ * syscalls.cc (setsid): Add debugging output when console is freed.
+
+2003-03-14 Christopher Faylor <cgf@redhat.com>
+
+ * syscalls.cc (rename): Revert assumption that DELETE_ON_CLOSE works on
+ Win9x.
+
2003-03-13 Christopher Faylor <cgf@redhat.com>
* include/cygwin/version.h: Bump DLL minor number to 23.
diff --git a/winsup/cygwin/cygwin.din b/winsup/cygwin/cygwin.din
index e7e7494c6..131192376 100644
--- a/winsup/cygwin/cygwin.din
+++ b/winsup/cygwin/cygwin.din
@@ -73,8 +73,8 @@ _fcloseall_r
fcloseall_r = _fcloseall_r
_fscanf_r
fscanf_r = _fscanf_r
-_fstat
-fstat = _fstat
+fstat
+_fstat = fstat
_pipe
_pthread_cleanup_pop
_pthread_cleanup_push
@@ -82,9 +82,10 @@ _scanf_r
scanf_r = _scanf_r
_sscanf_r
sscanf_r = _sscanf_r
-_stat
-stat = _stat
+stat
+_stat = stat
_strtold
+trunc
_vasprintf_r
vasprintf_r = _vasprintf_r
_vfscanf_r
@@ -181,6 +182,7 @@ bcopy
_bcopy = bcopy
bsearch
_bsearch = bsearch
+btowc
bzero
_bzero = bzero
cabs
diff --git a/winsup/cygwin/fhandler_console.cc b/winsup/cygwin/fhandler_console.cc
index 6833bab67..9620b29d3 100644
--- a/winsup/cygwin/fhandler_console.cc
+++ b/winsup/cygwin/fhandler_console.cc
@@ -648,10 +648,10 @@ fhandler_console::close (void)
set_io_handle (NULL);
set_output_handle (NULL);
if (!cygheap->fdtab.in_vfork_cleanup () && --open_fhs <= 0
- && myself->ctty != FH_CONSOLE)
+ && myself->ctty != TTY_CONSOLE)
{
- syscall_printf ("open_fhs %d, freeing console",
- fhandler_console::open_fhs);
+ syscall_printf ("open_fhs %d, freeing console %p",
+ fhandler_console::open_fhs, myself->ctty);
FreeConsole ();
}
debug_printf ("decremented open_fhs, now %d", open_fhs);
diff --git a/winsup/cygwin/include/cygwin/version.h b/winsup/cygwin/include/cygwin/version.h
index df484fb6f..07622b327 100644
--- a/winsup/cygwin/include/cygwin/version.h
+++ b/winsup/cygwin/include/cygwin/version.h
@@ -190,13 +190,14 @@ details. */
aclsort32 acltomode32 acltopbits32 acltotext32 facl32
fgetpos64 fopen64 freopen64 fseeko64 fsetpos64 ftello64
_open64 _lseek64 _fstat64 _stat64 mknod32
-
+ 79: Use stat and fstat rather than _stat, and _fstat.
+ Export btowc and trunc
*/
/* Note that we forgot to bump the api for ualarm, strtoll, strtoull */
#define CYGWIN_VERSION_API_MAJOR 0
-#define CYGWIN_VERSION_API_MINOR 78
+#define CYGWIN_VERSION_API_MINOR 79
/* There is also a compatibity version number associated with the
shared memory regions. It is incremented when incompatible
diff --git a/winsup/cygwin/sigproc.cc b/winsup/cygwin/sigproc.cc
index 5261c64d8..51c91c323 100644
--- a/winsup/cygwin/sigproc.cc
+++ b/winsup/cygwin/sigproc.cc
@@ -608,7 +608,7 @@ sigproc_terminate (void)
hwait_sig = NULL;
if (!sig_loop_wait)
- sigproc_printf ("sigproc_terminate: sigproc handling not active");
+ sigproc_printf ("sigproc handling not active");
else
{
sigproc_printf ("entering");
diff --git a/winsup/cygwin/syscalls.cc b/winsup/cygwin/syscalls.cc
index 097dacbdb..c59a5fcf3 100644
--- a/winsup/cygwin/syscalls.cc
+++ b/winsup/cygwin/syscalls.cc
@@ -8,6 +8,8 @@ This software is a copyrighted work licensed under the terms of the
Cygwin license. Please consult the file "CYGWIN_LICENSE" for
details. */
+#define fstat __FOOfstat__
+#define stat __FOOstat__
#define _close __FOO_close__
#define _lseek __FOO_lseek__
#define _open __FOO_open__
@@ -29,9 +31,15 @@ details. */
#include <sys/uio.h>
#include <errno.h>
#include <limits.h>
+#include <unistd.h>
+#include <setjmp.h>
#include <winnls.h>
#include <wininet.h>
#include <lmcons.h> /* for UNLEN */
+
+#undef fstat
+#undef stat
+
#include <cygwin/version.h>
#include <sys/cygwin.h>
#include "cygerrno.h"
@@ -42,11 +50,9 @@ details. */
#include "dtable.h"
#include "sigproc.h"
#include "pinfo.h"
-#include <unistd.h>
#include "shared_info.h"
#include "cygheap.h"
#define NEED_VFORK
-#include <setjmp.h>
#include "perthread.h"
#include "pwdgrp.h"
@@ -153,7 +159,8 @@ unlink (const char *ourname)
BOOL res = CloseHandle (h);
syscall_printf ("%d = CloseHandle (%p)", res, h);
if (!win32_name.isremote ()
- || GetFileAttributes (win32_name) == INVALID_FILE_ATTRIBUTES)
+ || (GetFileAttributes (win32_name) == INVALID_FILE_ATTRIBUTES
+ || wincap.has_delete_on_close ()))
{
syscall_printf ("CreateFile (FILE_FLAG_DELETE_ON_CLOSE) succeeded");
goto ok;
@@ -1017,7 +1024,7 @@ extern "C" int _fstat64 (int fd, __off64_t pos, int dir)
__attribute__ ((alias ("fstat64")));
extern "C" int
-_fstat (int fd, struct __stat32 *buf)
+fstat (int fd, struct __stat32 *buf)
{
struct __stat64 buf64;
int ret = fstat64 (fd, &buf64);
@@ -1026,6 +1033,9 @@ _fstat (int fd, struct __stat32 *buf)
return ret;
}
+extern "C" int _fstat (int fd, __off64_t pos, int dir)
+ __attribute__ ((alias ("fstat")));
+
/* fsync: P96 6.6.1.1 */
extern "C" int
fsync (int fd)
@@ -1110,6 +1120,9 @@ stat_worker (const char *name, struct __stat64 *buf, int nofollow,
return res;
}
+extern "C" int _stat (int fd, __off64_t pos, int dir)
+ __attribute__ ((alias ("stat")));
+
extern "C" int
stat64 (const char *name, struct __stat64 *buf)
{
@@ -1119,7 +1132,7 @@ stat64 (const char *name, struct __stat64 *buf)
}
extern "C" int
-_stat (const char *name, struct __stat32 *buf)
+stat (const char *name, struct __stat32 *buf)
{
struct __stat64 buf64;
int ret = stat64 (name, &buf64);