* Merge in cygwin-64bit-branch.
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
/* dtable.cc: file descriptor support.
|
||||
|
||||
Copyright 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
|
||||
2007, 2008, 2009, 2010, 2011, 2012 Red Hat, Inc.
|
||||
2007, 2008, 2009, 2010, 2011, 2012, 2013 Red Hat, Inc.
|
||||
|
||||
This file is part of Cygwin.
|
||||
|
||||
@@ -31,8 +31,8 @@ details. */
|
||||
#include "ntdll.h"
|
||||
#include "shared_info.h"
|
||||
|
||||
static const NO_COPY DWORD std_consts[] = {STD_INPUT_HANDLE, STD_OUTPUT_HANDLE,
|
||||
STD_ERROR_HANDLE};
|
||||
static const DWORD std_consts[] = {STD_INPUT_HANDLE, STD_OUTPUT_HANDLE,
|
||||
STD_ERROR_HANDLE};
|
||||
|
||||
static bool handle_to_fn (HANDLE, char *);
|
||||
|
||||
@@ -103,7 +103,7 @@ dtable::extend (int howmuch)
|
||||
|
||||
size = new_size;
|
||||
fds = newfds;
|
||||
debug_printf ("size %d, fds %p", size, fds);
|
||||
debug_printf ("size %ld, fds %p", size, fds);
|
||||
return 1;
|
||||
}
|
||||
|
||||
@@ -115,8 +115,8 @@ dtable::get_debugger_info ()
|
||||
{
|
||||
char std[3][sizeof ("/dev/ptyNNNN")];
|
||||
std[0][0] = std[1][0] = std [2][0] = '\0';
|
||||
char buf[sizeof ("cYgstd %x") + 32];
|
||||
sprintf (buf, "cYgstd %x %x %x", (unsigned) &std, sizeof (std[0]), 3);
|
||||
char buf[sizeof ("cYgstd %x") + 64];
|
||||
sprintf (buf, "cYgstd %p %zx %x", &std, sizeof (std[0]), 3);
|
||||
OutputDebugString (buf);
|
||||
for (int i = 0; i < 3; i++)
|
||||
if (std[i][0])
|
||||
@@ -194,7 +194,7 @@ fhandler_base *
|
||||
dtable::find_archetype (device& dev)
|
||||
{
|
||||
for (unsigned i = 0; i < farchetype; i++)
|
||||
if (archetypes[i]->get_device () == (DWORD) dev)
|
||||
if (archetypes[i]->get_device () == (dev_t) dev)
|
||||
return archetypes[i];
|
||||
return NULL;
|
||||
}
|
||||
@@ -482,7 +482,7 @@ fh_alloc (path_conv& pc)
|
||||
fh = cnew (fhandler_console, pc.dev);
|
||||
break;
|
||||
default:
|
||||
switch ((DWORD) pc.dev)
|
||||
switch ((dev_t) pc.dev)
|
||||
{
|
||||
case FH_CONSOLE:
|
||||
case FH_CONIN:
|
||||
@@ -661,7 +661,7 @@ build_fh_pc (path_conv& pc)
|
||||
last_tty_dev = fh->dev ();
|
||||
|
||||
out:
|
||||
debug_printf ("fh %p, dev %p", fh, fh ? (DWORD) fh->dev () : 0);
|
||||
debug_printf ("fh %p, dev %08x", fh, fh ? (dev_t) fh->dev () : 0);
|
||||
return fh;
|
||||
}
|
||||
|
||||
@@ -710,7 +710,7 @@ dtable::dup3 (int oldfd, int newfd, int flags)
|
||||
fhandler_base *newfh = NULL; // = NULL to avoid an incorrect warning
|
||||
|
||||
MALLOC_CHECK;
|
||||
debug_printf ("dup3 (%d, %d, %p)", oldfd, newfd, flags);
|
||||
debug_printf ("dup3 (%d, %d, %y)", oldfd, newfd, flags);
|
||||
lock ();
|
||||
bool do_unlock = true;
|
||||
bool unlock_on_return;
|
||||
@@ -736,7 +736,7 @@ dtable::dup3 (int oldfd, int newfd, int flags)
|
||||
}
|
||||
if ((flags & ~O_CLOEXEC) != 0)
|
||||
{
|
||||
syscall_printf ("invalid flags value %x", flags);
|
||||
syscall_printf ("invalid flags value %y", flags);
|
||||
set_errno (EINVAL);
|
||||
return -1;
|
||||
}
|
||||
@@ -778,7 +778,7 @@ done:
|
||||
MALLOC_CHECK;
|
||||
if (do_unlock)
|
||||
unlock ();
|
||||
syscall_printf ("%R = dup3(%d, %d, %p)", res, oldfd, newfd, flags);
|
||||
syscall_printf ("%R = dup3(%d, %d, %y)", res, oldfd, newfd, flags);
|
||||
|
||||
return res;
|
||||
}
|
||||
@@ -939,7 +939,7 @@ handle_to_fn (HANDLE h, char *posix_fn)
|
||||
|
||||
NTSTATUS status = NtQueryObject (h, ObjectNameInformation, ntfn, 65536, &len);
|
||||
if (!NT_SUCCESS (status))
|
||||
debug_printf ("NtQueryObject failed, %p", status);
|
||||
debug_printf ("NtQueryObject failed, %y", status);
|
||||
// NT seems to do this on an unopened file
|
||||
else if (!ntfn->Name.Buffer)
|
||||
debug_printf ("nt->Name.Buffer == NULL");
|
||||
|
Reference in New Issue
Block a user