Bug 526457. Fix AIX compilation. r=bsmedberg
authorUli Link <ul.mcamafia@linkitup.de>
Mon, 15 Mar 2010 14:43:16 +1300
changeset 39435 9b7c5d7fcbdab1c9572e3cd10e443f28d8edb5bc
parent 39434 723cdd01c7d6c41941928bc5fa9571a457884c16
child 39436 76465a50eb9cc4e7e21ac57ee0bfe8feb7f8c69c
push id1
push userroot
push dateTue, 26 Apr 2011 22:38:44 +0000
treeherdermozilla-beta@bfdb6e623a36 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersbsmedberg
bugs526457
milestone1.9.3a3pre
Bug 526457. Fix AIX compilation. r=bsmedberg
other-licenses/bsdiff/bsdiff.c
xpcom/io/nsLocalFileUnix.h
--- a/other-licenses/bsdiff/bsdiff.c
+++ b/other-licenses/bsdiff/bsdiff.c
@@ -30,36 +30,37 @@
 #include <unistd.h>
 #include <arpa/inet.h>
 #define _O_BINARY 0
 #endif
 
 #undef MIN
 #define MIN(x,y) (((x)<(y)) ? (x) : (y))
 
-//-----------------------------------------------------------------------------
+/*---------------------------------------------------------------------------*/
 
-// This variable lives in libbz2.  It's declared in bzlib_private.h, so we just
-// declare it here to avoid including that entire header file.
+/* This variable lives in libbz2.  It's declared in bzlib_private.h, so we just
+ * declare it here to avoid including that entire header file.
+ */
 extern unsigned int BZ2_crc32Table[256];
 
 static unsigned int
 crc32(const unsigned char *buf, unsigned int len)
 {
 	unsigned int crc = 0xffffffffL;
 
 	const unsigned char *end = buf + len;
 	for (; buf != end; ++buf)
 		crc = (crc << 8) ^ BZ2_crc32Table[(crc >> 24) ^ *buf];
 
 	crc = ~crc;
 	return crc;
 }
 
-//-----------------------------------------------------------------------------
+/*---------------------------------------------------------------------------*/
 
 static void
 reporterr(int e, const char *fmt, ...)
 {
 	if (fmt) {
 		va_list args;
 		va_start(args, fmt);
 		vfprintf(stderr, fmt, args);
@@ -395,8 +396,9 @@ int main(int argc,char *argv[])
 	free(db);
 	free(eb);
 	free(I);
 	free(old);
 	free(newbuf);
 
 	return 0;
 }
+
--- a/xpcom/io/nsLocalFileUnix.h
+++ b/xpcom/io/nsLocalFileUnix.h
@@ -82,16 +82,21 @@
 #if defined(__FreeBSD__)
     #define HAVE_SYS_STATFS_H
     #define STATFS statfs
     #include <sys/param.h>
     #include <sys/mount.h>
 #endif
 
 #if defined(HAVE_STAT64) && defined(HAVE_LSTAT64)
+    #if defined (AIX)
+        #if defined STAT
+            #undef STAT
+        #endif
+    #endif
     #define STAT stat64
     #define LSTAT lstat64
     #define HAVE_STATS64 1
 #else
     #define STAT stat
     #define LSTAT lstat
 #endif