From ebd645e7e65aa46fc5e95fda0b47590f4331fc17 Mon Sep 17 00:00:00 2001 From: Christopher Faylor Date: Wed, 3 Oct 2001 03:49:26 +0000 Subject: * cygheap.cc (cfree): Remove malloc debugging probe. * dlmalloc.c (errprint): Remove abort() call which causes interesting error message printing to abort prematurely. * environ.cc: Sprinkle MALLOC_CHECKs liberally throughout. (_addenv): Allocate two empty elements at end of environ to (apparently) work around problems with some buggy applications. (winenv): Avoid calling alloca if no forced environment variable is present. * exceptions.cc (open_stackdumpfile): Don't print "Dumping stack trace to..." when running in a cygwin environment (i.e., the parent is a cygwin process). * dtable.cc (dtable::init_std_file_from_handle): Move device type detection code from build_fhandler here since it is only used by this function. (dtable::build_fhandler_from_name): New method. Renamed from dtable::build_fhandler. (dtable::build_fhandler): Use build_fhandler_from_name. (cygwin_attach_handle_to_fd): Ditto. * syscalls.cc (_open): Ditto. (stat_worker): Ditto. * dtable.h (dtable::build_fhandler_from_name): Rename declaration from dtable::build_fhandler. --- winsup/cygwin/syscalls.cc | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) (limited to 'winsup/cygwin/syscalls.cc') diff --git a/winsup/cygwin/syscalls.cc b/winsup/cygwin/syscalls.cc index f4e53db50..2459f108a 100644 --- a/winsup/cygwin/syscalls.cc +++ b/winsup/cygwin/syscalls.cc @@ -377,7 +377,6 @@ done: else syscall_printf ("%d = write (%d, %p, %d)", res, fd, ptr, len); - MALLOC_CHECK; return (ssize_t)res; } @@ -499,7 +498,8 @@ _open (const char *unix_path, int flags, ...) else { path_conv pc; - if (!(fh = cygheap->fdtab.build_fhandler (fd, unix_path, NULL, pc))) + if (!(fh = cygheap->fdtab.build_fhandler_from_name (fd, unix_path, + NULL, pc))) res = -1; // errno already set else if (!fh->open (pc, flags, (mode & 07777) & ~cygheap->umask)) { @@ -1087,10 +1087,11 @@ stat_worker (const char *caller, const char *name, struct stat *buf, if (check_null_invalid_struct_errno (buf)) goto done; - fh = cygheap->fdtab.build_fhandler (-1, name, NULL, real_path, - (nofollow ? PC_SYM_NOFOLLOW : PC_SYM_FOLLOW) - | PC_FULL, stat_suffixes); - + fh = cygheap->fdtab.build_fhandler_from_name (-1, name, NULL, real_path, + (nofollow ? + PC_SYM_NOFOLLOW + : PC_SYM_FOLLOW) + | PC_FULL, stat_suffixes); if (real_path.error) { set_errno (real_path.error); -- cgit v1.2.3