This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
malloc.c defining an assert macro
- From: Samuel Thibault <samuel dot thibault at gnu dot org>
- To: GNU C Library <libc-alpha at sourceware dot org>
- Date: Sat, 27 Jan 2018 22:28:03 +0100
- Subject: malloc.c defining an assert macro
- Authentication-results: sourceware.org; auth=none
Hello,
In hurd builds, we get
malloc.c:284:0: warning: "assert" redefined
# define assert(expr) \
In file included from ../include/assert.h:1:0,
from ../sysdeps/mach/hurd/i386/tls.h:79,
from ../sysdeps/i386/atomic-machine.h:20,
from ../include/atomic.h:50,
from malloc.c:216:
../assert/assert.h:107:0: note: this is the location of the previous definition
# define assert(expr) \
This is because <assert.h> happens to get pulled in by tls.h.
Should malloc.c perhaps #undef assert before redefining it?
Samuel