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

ruby-changes:31690

From: naruse <ko1@a...>
Date: Fri, 22 Nov 2013 09:05:39 +0900 (JST)
Subject: [ruby-changes:31690] naruse:r43769 (trunk): * gc.c: fix build failure on FreeBSD introduced by r43763.

naruse	2013-11-22 09:05:34 +0900 (Fri, 22 Nov 2013)

  New Revision: 43769

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

  Log:
    * gc.c: fix build failure on FreeBSD introduced by r43763.
      malloc_usable_size() is defined by malloc_np.h on FreeBSD.
    
    * configure.in: check malloc.h and malloc_np.h.

  Modified files:
    trunk/ChangeLog
    trunk/configure.in
    trunk/gc.c
Index: configure.in
===================================================================
--- configure.in	(revision 43768)
+++ configure.in	(revision 43769)
@@ -1091,6 +1091,8 @@ AC_CHECK_HEADERS( \ https://github.com/ruby/ruby/blob/trunk/configure.in#L1091
   process.h \
   sys/prctl.h \
   atomic.h \
+  malloc.h \
+  malloc_np.h \
   setjmpex.h
 )
 
Index: ChangeLog
===================================================================
--- ChangeLog	(revision 43768)
+++ ChangeLog	(revision 43769)
@@ -1,3 +1,10 @@ https://github.com/ruby/ruby/blob/trunk/ChangeLog#L1
+Fri Nov 22 09:03:16 2013  NARUSE, Yui  <naruse@r...>
+
+	* gc.c: fix build failure on FreeBSD introduced by r43763.
+	  malloc_usable_size() is defined by malloc_np.h on FreeBSD.
+
+	* configure.in: check malloc.h and malloc_np.h.
+
 Fri Nov 22 08:27:13 2013  Eric Hodel  <drbrain@s...>
 
 	* lib/rubygems:  Update to RubyGems master 50a8210.  Important changes
Index: gc.c
===================================================================
--- gc.c	(revision 43768)
+++ gc.c	(revision 43769)
@@ -40,7 +40,11 @@ https://github.com/ruby/ruby/blob/trunk/gc.c#L40
 #   define malloc_usable_size(a) _msize(a)
 # endif
 #else
-# include <malloc.h>
+# ifdef HAVE_MALLOC_H
+#  include <malloc.h>
+# elif defined(HAVE_MALLOC_NP_H)
+#  include <malloc_np.h>
+# endif
 #endif
 
 #if /* is ASAN enabled? */ \

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

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