From 3cca030b65e3c9504dca4c874c597fb783ca2006 Mon Sep 17 00:00:00 2001 From: Christopher Faylor Date: Thu, 7 Nov 2002 03:47:54 +0000 Subject: [PATCH] * include/cygwin/version.h: Bump API minor number for below export. * cygwin.din (pututline): New exported function. * syscalls.cc (login): Use pututiline(). (setutent): Open utmp as read/write. (endutent): Check if utmp file is open. (utmpname): call endutent() to close current utmp file. (getutid): Enable all cases, use strncmp() to compare ut_id fields. (pututline): New. * tty.cc (create_tty_master): Set ut_pid to current pid. * fhandler.h (fhandler_serial::vmin_): Declare as size_t. * fhandler_serial.cc (fhandler_serial::raw_read): Use correct type for minchars. (fhandler_serial::ioctl): Set errno if the ClearCommError fails. (fhandler_serial::tcsetattr): Use correct value for vmin_. (fhandler_serial::tcgetattr): Ditto. * fhandler_socket.cc (fhandler_socket::recvmsg): Call if from == NULL WSARecvFrom with fromlen = NULL. --- winsup/cygwin/fhandler_virtual.cc | 13 +++---------- 1 file changed, 3 insertions(+), 10 deletions(-) diff --git a/winsup/cygwin/fhandler_virtual.cc b/winsup/cygwin/fhandler_virtual.cc index 937caf352..05b9b0f6c 100644 --- a/winsup/cygwin/fhandler_virtual.cc +++ b/winsup/cygwin/fhandler_virtual.cc @@ -34,17 +34,10 @@ fhandler_virtual::fhandler_virtual (DWORD devtype): fhandler_virtual::~fhandler_virtual () { if (filebuf) - free (filebuf); + cfree (filebuf); filebuf = NULL; } -void -fhandler_virtual::fixup_after_exec (HANDLE) -{ - if (filebuf) - filebuf = NULL; -} - DIR * fhandler_virtual::opendir (path_conv& pc) { @@ -150,7 +143,7 @@ fhandler_virtual::dup (fhandler_base * child) if (!ret) { fhandler_virtual *fhproc_child = (fhandler_virtual *) child; - fhproc_child->filebuf = (char *) malloc (filesize); + fhproc_child->filebuf = (char *) cmalloc (HEAP_BUF, filesize); fhproc_child->bufalloc = fhproc_child->filesize = filesize; fhproc_child->position = position; memcpy (fhproc_child->filebuf, filebuf, filesize); @@ -163,7 +156,7 @@ int fhandler_virtual::close () { if (filebuf) - free (filebuf); + cfree (filebuf); filebuf = NULL; bufalloc = (size_t) -1; cygwin_shared->delqueue.process_queue ();