summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorPavel <pavel@eazel.com>2000-06-18 11:00:34 +0000
committerPavel Cisler <pce@src.gnome.org>2000-06-18 11:00:34 +0000
commit2f786e15116d5d0aa47add69e3106a7e2a682757 (patch)
tree94c3ed140a31021f3d91a0de9a1371fe2960de3d /test
parent30675e99d6a6ffadd366bfe128863c005f5e1d13 (diff)
downloadnautilus-2f786e15116d5d0aa47add69e3106a7e2a682757.tar.gz
Do a better 64-bit clean fix avoiding messy ifdefs.
2000-06-18 Pavel <pavel@eazel.com> * test/nautilus-leak-symbol-lookup.c: (nautilus_leak_symbol_map_get_offsets): Do a better 64-bit clean fix avoiding messy ifdefs.
Diffstat (limited to 'test')
-rw-r--r--test/nautilus-leak-symbol-lookup.c16
1 files changed, 5 insertions, 11 deletions
diff --git a/test/nautilus-leak-symbol-lookup.c b/test/nautilus-leak-symbol-lookup.c
index 105b8d014..7a9c051be 100644
--- a/test/nautilus-leak-symbol-lookup.c
+++ b/test/nautilus-leak-symbol-lookup.c
@@ -83,9 +83,9 @@ nautilus_leak_symbol_map_get_offsets (NautilusLeakSymbolLookupMap *map)
FILE *in;
gchar perms[26];
gchar file[256];
- guint64 start, end;
+ unsigned long start, end;
guint major, minor;
- guint64 inode;
+ ino_t inode;
struct stat library_stat;
struct stat entry_stat;
int count;
@@ -103,15 +103,9 @@ nautilus_leak_symbol_map_get_offsets (NautilusLeakSymbolLookupMap *map)
while (fgets(buffer, 1023, in)) {
-/* if long is in fact the int64 type */
-#if G_MAXLONG == 9223372036854775807
count = sscanf (buffer, "%lx-%lx %15s %*x %u:%u %lu %255s",
&start, &end, perms, &major, &minor, &inode, file);
-#else
- count = sscanf (buffer, "%Lx-%Lx %15s %*x %u:%u %Lu %255s",
- &start, &end, perms, &major, &minor, &inode, file);
-#endif
-
+
if (count >= 6 && strcmp (perms, "r-xp") == 0) {
if (stat (file, &entry_stat) != 0) {
break;
@@ -119,8 +113,8 @@ nautilus_leak_symbol_map_get_offsets (NautilusLeakSymbolLookupMap *map)
/* check if this is the library we are loading */
if (library_stat.st_ino == entry_stat.st_ino
&& library_stat.st_dev == entry_stat.st_dev) {
- map->start = (unsigned long)start;
- map->end = (unsigned long)end;
+ map->start = start;
+ map->end = end;
break;
}