Better we can also fix others, like sbrk. Under freebdsd, use CMAKE will undef sbrk while freebsd do have it.<div><br></div><div><br><div class="gmail_quote">On Fri, Jun 5, 2009 at 1:22 AM, Douglas Gregor <span dir="ltr"><<a href="mailto:dgregor@apple.com">dgregor@apple.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">Author: dgregor<br>
Date: Thu Jun  4 12:22:52 2009<br>
New Revision: 72873<br>
<br>
URL: <a href="http://llvm.org/viewvc/llvm-project?rev=72873&view=rev" target="_blank">http://llvm.org/viewvc/llvm-project?rev=72873&view=rev</a><br>
Log:<br>
Properly detect malloc_zone_statistics in CMake build system<br>
<br>
Modified:<br>
    llvm/trunk/cmake/config-ix.cmake<br>
    llvm/trunk/include/llvm/Config/config.h.cmake<br>
<br>
Modified: llvm/trunk/cmake/config-ix.cmake<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/llvm/trunk/cmake/config-ix.cmake?rev=72873&r1=72872&r2=72873&view=diff" target="_blank">http://llvm.org/viewvc/llvm-project/llvm/trunk/cmake/config-ix.cmake?rev=72873&r1=72872&r2=72873&view=diff</a><br>

<br>
==============================================================================<br>
--- llvm/trunk/cmake/config-ix.cmake (original)<br>
+++ llvm/trunk/cmake/config-ix.cmake Thu Jun  4 12:22:52 2009<br>
@@ -58,6 +58,8 @@<br>
 check_symbol_exists(ceilf math.h HAVE_CEILF)<br>
 check_symbol_exists(floorf math.h HAVE_FLOORF)<br>
 check_symbol_exists(mallinfo malloc.h HAVE_MALLINFO)<br>
+check_symbol_exists(malloc_zone_statistics malloc/malloc.h<br>
+                    HAVE_MALLOC_ZONE_STATISTICS)<br>
 check_symbol_exists(pthread_mutex_lock pthread.h HAVE_PTHREAD_MUTEX_LOCK)<br>
 check_symbol_exists(strtoll stdlib.h HAVE_STRTOLL)<br>
<br>
<br>
Modified: llvm/trunk/include/llvm/Config/config.h.cmake<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/Config/config.h.cmake?rev=72873&r1=72872&r2=72873&view=diff" target="_blank">http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/Config/config.h.cmake?rev=72873&r1=72872&r2=72873&view=diff</a><br>

<br>
==============================================================================<br>
--- llvm/trunk/include/llvm/Config/config.h.cmake (original)<br>
+++ llvm/trunk/include/llvm/Config/config.h.cmake Thu Jun  4 12:22:52 2009<br>
@@ -228,7 +228,7 @@<br>
 #cmakedefine HAVE_MALLOC_MALLOC_H ${HAVE_MALLOC_MALLOC_H}<br>
<br>
 /* Define to 1 if you have the `malloc_zone_statistics' function. */<br>
-#undef HAVE_MALLOC_ZONE_STATISTICS<br>
+#cmakedefine HAVE_MALLOC_ZONE_STATISTICS ${HAVE_MALLOC_ZONE_STATISTICS}<br>
<br>
 /* Define to 1 if you have the `memcpy' function. */<br>
 #undef HAVE_MEMCPY<br>
<br>
<br>
_______________________________________________<br>
llvm-commits mailing list<br>
<a href="mailto:llvm-commits@cs.uiuc.edu">llvm-commits@cs.uiuc.edu</a><br>
<a href="http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits" target="_blank">http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits</a><br>
</blockquote></div><br><br clear="all"><br>-- <br>-Howard<br>
</div>