diff options
author | mark@chromium.org <mark@chromium.org@4c0a9323-5329-0410-9bdc-e9ce6186880e> | 2012-02-06 17:33:12 +0000 |
---|---|---|
committer | mark@chromium.org <mark@chromium.org@4c0a9323-5329-0410-9bdc-e9ce6186880e> | 2012-02-06 17:33:12 +0000 |
commit | 3aa10d2a87075a9818dc4189dc3c86e8aa2f960d (patch) | |
tree | 5a03bab00baeff5dd27936f70903767120c19815 /src/client/mac/handler | |
parent | Breakpad DWARF: Add support for DWARF 4 attribute forms. (diff) | |
download | breakpad-3aa10d2a87075a9818dc4189dc3c86e8aa2f960d.tar.xz |
NXSwapBigIntToHost is deprecated, use CFSwapInt32BigToHost instead.
Patch by Nico Weber <thakis@chromium.org>
git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@913 4c0a9323-5329-0410-9bdc-e9ce6186880e
Diffstat (limited to 'src/client/mac/handler')
-rw-r--r-- | src/client/mac/handler/breakpad_nlist_64.cc | 17 |
1 files changed, 9 insertions, 8 deletions
diff --git a/src/client/mac/handler/breakpad_nlist_64.cc b/src/client/mac/handler/breakpad_nlist_64.cc index f00be081..b50aa03a 100644 --- a/src/client/mac/handler/breakpad_nlist_64.cc +++ b/src/client/mac/handler/breakpad_nlist_64.cc @@ -67,6 +67,7 @@ #include "breakpad_nlist_64.h" +#include <CoreFoundation/CoreFoundation.h> #include <fcntl.h> #include <mach-o/nlist.h> #include <mach-o/loader.h> @@ -190,7 +191,7 @@ int __breakpad_fdnlist(int fd, nlist_type *list, const char **symbolNames, struct exec buf; if (read(fd, (char *)&buf, sizeof(buf)) != sizeof(buf) || (N_BADMAG(buf) && *((uint32_t *)&buf) != magic && - NXSwapBigLongToHost(*((long *)&buf)) != FAT_MAGIC && + CFSwapInt32BigToHost(*((uint32_t *)&buf)) != FAT_MAGIC && /* The following is the big-endian ppc64 check */ (*((uint32_t*)&buf)) != FAT_MAGIC)) { return -1; @@ -198,7 +199,7 @@ int __breakpad_fdnlist(int fd, nlist_type *list, const char **symbolNames, /* Deal with fat file if necessary */ unsigned arch_offset = 0; - if (NXSwapBigLongToHost(*((long *)&buf)) == FAT_MAGIC || + if (CFSwapInt32BigToHost(*((uint32_t *)&buf)) == FAT_MAGIC || /* The following is the big-endian ppc64 check */ *((unsigned int *)&buf) == FAT_MAGIC) { /* Get host info */ @@ -222,7 +223,7 @@ int __breakpad_fdnlist(int fd, nlist_type *list, const char **symbolNames, } /* Convert fat_narchs to host byte order */ - fh.nfat_arch = NXSwapBigIntToHost(fh.nfat_arch); + fh.nfat_arch = CFSwapInt32BigToHost(fh.nfat_arch); /* Read in the fat archs */ struct fat_arch *fat_archs = @@ -243,15 +244,15 @@ int __breakpad_fdnlist(int fd, nlist_type *list, const char **symbolNames, */ for (unsigned i = 0; i < fh.nfat_arch; i++) { fat_archs[i].cputype = - NXSwapBigIntToHost(fat_archs[i].cputype); + CFSwapInt32BigToHost(fat_archs[i].cputype); fat_archs[i].cpusubtype = - NXSwapBigIntToHost(fat_archs[i].cpusubtype); + CFSwapInt32BigToHost(fat_archs[i].cpusubtype); fat_archs[i].offset = - NXSwapBigIntToHost(fat_archs[i].offset); + CFSwapInt32BigToHost(fat_archs[i].offset); fat_archs[i].size = - NXSwapBigIntToHost(fat_archs[i].size); + CFSwapInt32BigToHost(fat_archs[i].size); fat_archs[i].align = - NXSwapBigIntToHost(fat_archs[i].align); + CFSwapInt32BigToHost(fat_archs[i].align); } struct fat_arch *fap = NULL; |