From 3aa10d2a87075a9818dc4189dc3c86e8aa2f960d Mon Sep 17 00:00:00 2001 From: "mark@chromium.org" Date: Mon, 6 Feb 2012 17:33:12 +0000 Subject: NXSwapBigIntToHost is deprecated, use CFSwapInt32BigToHost instead. Patch by Nico Weber git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@913 4c0a9323-5329-0410-9bdc-e9ce6186880e --- src/client/mac/handler/breakpad_nlist_64.cc | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) (limited to 'src/client') 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 #include #include #include @@ -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; -- cgit v1.2.1