Date: Sun, 12 Jan 2020 06:01:46 +0000 From: bugzilla-noreply@freebsd.org To: bugs@FreeBSD.org Subject: [Bug 155429] [headers] including malloc.h should not abort compile. Message-ID: <bug-155429-227-s519mr89GC@https.bugs.freebsd.org/bugzilla/> In-Reply-To: <bug-155429-227@https.bugs.freebsd.org/bugzilla/> References: <bug-155429-227@https.bugs.freebsd.org/bugzilla/>
next in thread | previous in thread | raw e-mail | index | archive | help
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D155429 Jan Beich <jbeich@FreeBSD.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Component|kern |standards Assignee|bugs@FreeBSD.org |standards@FreeBSD.org --- Comment #2 from Jan Beich <jbeich@FreeBSD.org> --- On Linux/glibc <malloc.h> defines extensions (e.g., memalign, malloc_usable_size, mallinfo) that FreeBSD provides via <malloc_np.h> (e.g., *allocx, malloc_usable_size, mallctl) while similar to upstream jemalloc. If FreeBSD doesn't want to implement glibc extensions like Solaris maybe time = to remove <malloc.h> instead e.g., https://github.com/DragonFlyBSD/DragonFlyBSD/commit/02b66c54cac986a0bf93435= b8d5ae1b17521515b https://github.com/openbsd/src/commit/d88f57029e5acaaaf028633c7fa15c5d7325c= 5cc $ cat a.c #if __has_include(<malloc.h>) #include <malloc.h> #endif $ cc -c a.c In file included from a.c:2: /usr/include/malloc.h:3:2: error: "<malloc.h> has been replaced by <stdlib.= h>" #error "<malloc.h> has been replaced by <stdlib.h>" ^ 1 error generated. $ rm /usr/include/malloc.h $ cc -c a.c --=20 You are receiving this mail because: You are the assignee for the bug.=
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?bug-155429-227-s519mr89GC>