diff options
author | Corinna Vinschen <corinna@vinschen.de> | 2005-01-29 13:34:34 +0000 |
---|---|---|
committer | Corinna Vinschen <corinna@vinschen.de> | 2005-01-29 13:34:34 +0000 |
commit | e86f8b7925d1da7b87d8235856cb757233546e36 (patch) | |
tree | 1ef6492de9a74b172984e0bd063bf0015b290f24 /winsup/cygwin | |
parent | faf07ace9256e17e846adcb514ee33d5ceccf1e7 (diff) | |
download | newlib-e86f8b7925d1da7b87d8235856cb757233546e36.zip newlib-e86f8b7925d1da7b87d8235856cb757233546e36.tar.gz newlib-e86f8b7925d1da7b87d8235856cb757233546e36.tar.bz2 |
* smallprint.c (rn): Change uval to unsigned long long to fix 64 bit
handling.
* fhandler_process.cc (format_process_maps): Print major, minor and
inode numbers correctly.
Diffstat (limited to 'winsup/cygwin')
-rw-r--r-- | winsup/cygwin/ChangeLog | 7 | ||||
-rw-r--r-- | winsup/cygwin/fhandler_process.cc | 14 | ||||
-rw-r--r-- | winsup/cygwin/smallprint.c | 2 |
3 files changed, 19 insertions, 4 deletions
diff --git a/winsup/cygwin/ChangeLog b/winsup/cygwin/ChangeLog index 40ef4d1..ff4b3bd 100644 --- a/winsup/cygwin/ChangeLog +++ b/winsup/cygwin/ChangeLog @@ -1,5 +1,12 @@ 2005-01-29 Corinna Vinschen <corinna@vinschen.de> + * smallprint.c (rn): Change uval to unsigned long long to fix 64 bit + handling. + * fhandler_process.cc (format_process_maps): Print major, minor and + inode numbers correctly. + +2005-01-29 Corinna Vinschen <corinna@vinschen.de> + * autoload.cc (GetModuleFileNameExA): Add. (GetModuleInformation): Add. (QueryWorkingSet): Add. diff --git a/winsup/cygwin/fhandler_process.cc b/winsup/cygwin/fhandler_process.cc index 4a14bca..0115a4e 100644 --- a/winsup/cygwin/fhandler_process.cc +++ b/winsup/cygwin/fhandler_process.cc @@ -468,7 +468,13 @@ format_process_maps (_pinfo *p, char *destbuf, size_t maxsize) { char access[5]; strcpy (access, "r--p"); + struct __stat64 st; cygwin_conv_to_full_posix_path (modname, posix_modname); + if (stat64 (posix_modname, &st)) + { + st.st_dev = 0; + st.st_ino = 0; + } if (len + strlen (posix_modname) + 50 > maxsize - 1) break; if (workingset) @@ -485,14 +491,16 @@ format_process_maps (_pinfo *p, char *destbuf, size_t maxsize) } } int written = __small_sprintf (destbuf + len, - "%08lx-%08lx %s %08lx 00:00 %lu ", + "%08lx-%08lx %s %08lx %04x:%04x %U ", info.lpBaseOfDll, (unsigned long)info.lpBaseOfDll + info.SizeOfImage, access, info.EntryPoint, - info.SizeOfImage); - while (written++ < 49) + st.st_dev >> 16, + st.st_dev & 0xffff, + st.st_ino); + while (written++ < 61) destbuf[len + written] = ' '; len += written; len += __small_sprintf (destbuf + len, "%s\n", posix_modname); diff --git a/winsup/cygwin/smallprint.c b/winsup/cygwin/smallprint.c index 740248e..6e7bf48d 100644 --- a/winsup/cygwin/smallprint.c +++ b/winsup/cygwin/smallprint.c @@ -22,7 +22,7 @@ static char * rn (char *dst, int base, int dosign, long long val, int len, int pad) { /* longest number is ULLONG_MAX, 18446744073709551615, 20 digits */ - unsigned uval; + unsigned long long uval; char res[20]; static const char str[16] = "0123456789ABCDEF"; int l = 0; |