avro-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dcrea...@apache.org
Subject svn commit: r1551944 - in /avro/trunk: CHANGES.txt lang/c/src/codec.c
Date Wed, 18 Dec 2013 13:46:15 GMT
Author: dcreager
Date: Wed Dec 18 13:46:15 2013
New Revision: 1551944

URL: http://svn.apache.org/r1551944
Log:
AVRO-1369. C: Use correct byte-swapping macros on Mac OS X.

Contributed by thinker0.

Modified:
    avro/trunk/CHANGES.txt
    avro/trunk/lang/c/src/codec.c

Modified: avro/trunk/CHANGES.txt
URL: http://svn.apache.org/viewvc/avro/trunk/CHANGES.txt?rev=1551944&r1=1551943&r2=1551944&view=diff
==============================================================================
--- avro/trunk/CHANGES.txt (original)
+++ avro/trunk/CHANGES.txt Wed Dec 18 13:46:15 2013
@@ -82,6 +82,9 @@ Trunk (not yet released)
     AVRO-1237. C: Bounds-check union discriminant when reading a data file.
     (Michael Cooper via dcreager)
 
+    AVRO-1369. C: Use correct byte-swapping functions on Mac OS X.
+    (thinker0 via dcreager)
+
 Avro 1.7.5 (12 August 2013)
 
   NEW FEATURES

Modified: avro/trunk/lang/c/src/codec.c
URL: http://svn.apache.org/viewvc/avro/trunk/lang/c/src/codec.c?rev=1551944&r1=1551943&r2=1551944&view=diff
==============================================================================
--- avro/trunk/lang/c/src/codec.c (original)
+++ avro/trunk/lang/c/src/codec.c Wed Dec 18 13:46:15 2013
@@ -18,7 +18,12 @@
 #include <string.h>
 #ifdef SNAPPY_CODEC
 #include <snappy-c.h>
-#include <byteswap.h>
+#  if defined(__APPLE__)
+#    include <libkern/OSByteOrder.h>
+#    define __bswap_32 OSSwapInt32
+#  else
+#    include <byteswap.h>
+#  endif
 #endif
 #ifdef DEFLATE_CODEC
 #include <zlib.h>



Mime
View raw message