svn commit: r360984 - head/include

Konstantin Belousov kib at FreeBSD.org
Tue May 12 18:17:58 UTC 2020


Author: kib
Date: Tue May 12 18:17:57 2020
New Revision: 360984
URL: https://svnweb.freebsd.org/changeset/base/360984

Log:
  Make include/malloc.h usable again.
  
  Lot of third-party Linux code uses #include <malloc.h>, expecting to
  find the malloc extensions there. Instead of trying to fight them,
  accept that attempt to deprecate the header causes more troubles than
  solves potential portability issues, and provide our jemalloc
  extensions.
  
  PR:	155429
  Reviewed by:	imp, jhibbits, dab, hselasky, philip, emaste, jilles
  Exp-run by:	antoine (PR 245366)
  Sponsored by:	The FreeBSD Foundation
  MFC after:	2 weeks
  Differential revision:	https://reviews.freebsd.org/D24297

Modified:
  head/include/malloc.h

Modified: head/include/malloc.h
==============================================================================
--- head/include/malloc.h	Tue May 12 18:12:20 2020	(r360983)
+++ head/include/malloc.h	Tue May 12 18:17:57 2020	(r360984)
@@ -1,6 +1,6 @@
-/* $FreeBSD$ */
-#if __STDC__
-#error "<malloc.h> has been replaced by <stdlib.h>"
-#else
+/*-
+ * This file is in the public domain.
+ * $FreeBSD$
+ */
 #include <stdlib.h>
-#endif
+#include <malloc_np.h>


More information about the svn-src-head mailing list