* 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.
This commit is contained in:
parent
4538fa704b
commit
3cca030b65
|
@ -34,14 +34,7 @@ fhandler_virtual::fhandler_virtual (DWORD devtype):
|
||||||
fhandler_virtual::~fhandler_virtual ()
|
fhandler_virtual::~fhandler_virtual ()
|
||||||
{
|
{
|
||||||
if (filebuf)
|
if (filebuf)
|
||||||
free (filebuf);
|
cfree (filebuf);
|
||||||
filebuf = NULL;
|
|
||||||
}
|
|
||||||
|
|
||||||
void
|
|
||||||
fhandler_virtual::fixup_after_exec (HANDLE)
|
|
||||||
{
|
|
||||||
if (filebuf)
|
|
||||||
filebuf = NULL;
|
filebuf = NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -150,7 +143,7 @@ fhandler_virtual::dup (fhandler_base * child)
|
||||||
if (!ret)
|
if (!ret)
|
||||||
{
|
{
|
||||||
fhandler_virtual *fhproc_child = (fhandler_virtual *) child;
|
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->bufalloc = fhproc_child->filesize = filesize;
|
||||||
fhproc_child->position = position;
|
fhproc_child->position = position;
|
||||||
memcpy (fhproc_child->filebuf, filebuf, filesize);
|
memcpy (fhproc_child->filebuf, filebuf, filesize);
|
||||||
|
@ -163,7 +156,7 @@ int
|
||||||
fhandler_virtual::close ()
|
fhandler_virtual::close ()
|
||||||
{
|
{
|
||||||
if (filebuf)
|
if (filebuf)
|
||||||
free (filebuf);
|
cfree (filebuf);
|
||||||
filebuf = NULL;
|
filebuf = NULL;
|
||||||
bufalloc = (size_t) -1;
|
bufalloc = (size_t) -1;
|
||||||
cygwin_shared->delqueue.process_queue ();
|
cygwin_shared->delqueue.process_queue ();
|
||||||
|
|
Loading…
Reference in New Issue