[or-cvs] r17891: {tor} OpenBSD malloc.h believes that you should be able to detect (in tor/trunk/src: common or)

nickm at seul.org nickm at seul.org
Sun Jan 4 22:47:42 UTC 2009


Author: nickm
Date: 2009-01-04 17:47:42 -0500 (Sun, 04 Jan 2009)
New Revision: 17891

Modified:
   tor/trunk/src/common/util.c
   tor/trunk/src/or/directory.c
Log:
OpenBSD malloc.h believes that you should be able to detect headers with autoconf, or build without warnings, but not both.  So never include malloc.h on OpenBSD.  Backport candidate.

Modified: tor/trunk/src/common/util.c
===================================================================
--- tor/trunk/src/common/util.c	2009-01-04 19:59:35 UTC (rev 17890)
+++ tor/trunk/src/common/util.c	2009-01-04 22:47:42 UTC (rev 17891)
@@ -72,8 +72,13 @@
 #include <malloc/malloc.h>
 #endif
 #ifdef HAVE_MALLOC_H
+#ifndef OPENBSD
+/* OpenBSD has a malloc.h, but for our purposes, it only exists in order to
+ * scold us for being so stupid as to autodetect its presence.  To be fair,
+ * they've done this since 1996, when autoconf was only 5 years old. */
 #include <malloc.h>
 #endif
+#endif
 #ifdef HAVE_MALLOC_NP_H
 #include <malloc_np.h>
 #endif

Modified: tor/trunk/src/or/directory.c
===================================================================
--- tor/trunk/src/or/directory.c	2009-01-04 19:59:35 UTC (rev 17890)
+++ tor/trunk/src/or/directory.c	2009-01-04 22:47:42 UTC (rev 17891)
@@ -5,8 +5,10 @@
 
 #include "or.h"
 #if defined(EXPORTMALLINFO) && defined(HAVE_MALLOC_H) && defined(HAVE_MALLINFO)
+#ifndef OPENBSD
 #include <malloc.h>
 #endif
+#endif
 
 /**
  * \file directory.c



More information about the tor-commits mailing list