diff options
author | Andreas Jaeger <aj@suse.de> | 2000-11-15 08:42:13 +0000 |
---|---|---|
committer | Andreas Jaeger <aj@suse.de> | 2000-11-15 08:42:13 +0000 |
commit | ad1a5cc746c507ddd9b31cae653aefe3fac7a249 (patch) | |
tree | 3ced9e9551406a6e107ad707e07d99eb2b90f68d /elf | |
parent | 7e32357ed178958f1fa21ceb916c0c3e9611f7dc (diff) | |
download | glibc-ad1a5cc746c507ddd9b31cae653aefe3fac7a249.tar glibc-ad1a5cc746c507ddd9b31cae653aefe3fac7a249.tar.gz glibc-ad1a5cc746c507ddd9b31cae653aefe3fac7a249.tar.bz2 glibc-ad1a5cc746c507ddd9b31cae653aefe3fac7a249.zip |
(struct cache_entry): Use uint64_t for hwcap. (print_entry): Likewise. (add_to_cache): Likewise.
Diffstat (limited to 'elf')
-rw-r--r-- | elf/cache.c | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/elf/cache.c b/elf/cache.c index 942b7900bf..821dda93e5 100644 --- a/elf/cache.c +++ b/elf/cache.c @@ -25,6 +25,7 @@ #include <stdlib.h> #include <string.h> #include <unistd.h> +#include <stdint.h> #include <sys/fcntl.h> #include <sys/mman.h> #include <sys/stat.h> @@ -38,7 +39,7 @@ struct cache_entry char *lib; /* Library name. */ char *path; /* Path to find library. */ int flags; /* Flags to indicate kind of library. */ - unsigned long int hwcap; /* Important hardware capabilities. */ + uint64_t hwcap; /* Important hardware capabilities. */ int bits_hwcap; /* Number of bits set in hwcap. */ struct cache_entry *next; /* Next entry in list. */ }; @@ -51,7 +52,7 @@ static const char *flag_descr[] = /* Print a single entry. */ static void -print_entry (const char *lib, int flag, unsigned long int hwcap, const char *key) +print_entry (const char *lib, int flag, uint64_t hwcap, const char *key) { printf ("\t%s (", lib); switch (flag & FLAG_TYPE_MASK) @@ -83,7 +84,7 @@ print_entry (const char *lib, int flag, unsigned long int hwcap, const char *key break; } if (hwcap != 0) - printf (", hwcap: 0x%lx", hwcap); + printf (", hwcap: 0x%Lx", hwcap); printf (") => %s\n", key); } @@ -411,7 +412,7 @@ save_cache (const char *cache_name) /* Add one library to the cache. */ void add_to_cache (const char *path, const char *lib, int flags, - unsigned long int hwcap) + uint64_t hwcap) { struct cache_entry *new_entry, *ptr, *prev; char *full_path; @@ -431,8 +432,8 @@ add_to_cache (const char *path, const char *lib, int flags, new_entry->bits_hwcap = 0; /* Count the number of bits set in the masked value. */ - for (i = 0; (~((1UL << i) - 1) & hwcap) != 0; ++i) - if ((hwcap & (1UL << i)) != 0) + for (i = 0; (~((1ULL << i) - 1) & hwcap) != 0; ++i) + if ((hwcap & (1ULL << i)) != 0) ++new_entry->bits_hwcap; |