On 01/04/16 11:30, Peter Simons wrote:
Apparently, the second (failing) build decides that max_align_t is not
available, but the gnulib-generate test build thinks it is. Not sure how
to explain that.
For what it's worth, the full source code of my project is available at
http://git.savannah.gnu.org/cgit/mini-httpd.git.
Best regards,
Peter
The problem is «gcc vs g++»
gnulib is running the test against g++, and it doesn't define max_align_t,
so it is right in that a replacement is needed there.
The compilation error is on libgnu/unistd.c, a C program compiled by gcc.
gcc doesn't need the replacement header (provides max_align_t itself), and
thus the double-definition appears.
I'm not sure _how_ is this supposed to be configured. mini-httpd is a
C++ project, it's
gnulib the one introducing a dummy unistd.c file. Maybe using .cpp
extensions on the
libraries would be appropiate.
For this specific issue, another solution would be to add a #ifndef
_GCC_MAX_ALIGN_T
guard to the replacement unistd.h.
Although the latter doesn't fix the underlying problem.
Best regards