[前][次][番号順一覧][スレッド一覧]

ruby-changes:28542

From: akr <ko1@a...>
Date: Tue, 7 May 2013 12:09:29 +0900 (JST)
Subject: [ruby-changes:28542] akr:r40594 (trunk): * pack.c (swap32): Don't redefine it if it is already defined.

akr	2013-05-07 12:09:15 +0900 (Tue, 07 May 2013)

  New Revision: 40594

  http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=40594

  Log:
    * pack.c (swap32): Don't redefine it if it is already defined.
      Bionic defines it.
      (swap64): Ditto.

  Modified files:
    trunk/ChangeLog
    trunk/pack.c

Index: ChangeLog
===================================================================
--- ChangeLog	(revision 40593)
+++ ChangeLog	(revision 40594)
@@ -1,3 +1,9 @@ https://github.com/ruby/ruby/blob/trunk/ChangeLog#L1
+Tue May  7 12:07:35 2013  Tanaka Akira  <akr@f...>
+
+	* pack.c (swap32): Don't redefine it if it is already defined.
+	  Bionic defines it.
+	  (swap64): Ditto.
+
 Mon May  6 20:50:37 2013  Tanaka Akira  <akr@f...>
 
 	* ext/socket/socket.c (socket_s_ip_address_list): Fill sin6_scope_id
Index: pack.c
===================================================================
--- pack.c	(revision 40593)
+++ pack.c	(revision 40594)
@@ -100,9 +100,16 @@ TOKEN_PASTE(swap,x)(xtype z)		\ https://github.com/ruby/ruby/blob/trunk/pack.c#L100
     return r;				\
 }
 
-#if GCC_VERSION_SINCE(4,3,0)
-# define swap32(x) __builtin_bswap32(x)
-# define swap64(x) __builtin_bswap64(x)
+#ifndef swap32
+# if GCC_VERSION_SINCE(4,3,0)
+#  define swap32(x) __builtin_bswap32(x)
+# endif
+#endif
+
+#ifndef swap64
+# if GCC_VERSION_SINCE(4,3,0)
+#  define swap64(x) __builtin_bswap64(x)
+# endif
 #endif
 
 #ifndef swap16

--
ML: ruby-changes@q...
Info: http://www.atdot.net/~ko1/quickml/

[前][次][番号順一覧][スレッド一覧]