bug-gnulib
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: max_align_t from libgnu/stddef.h conflicts with gcc 5.3.1


From: Ángel González
Subject: Re: max_align_t from libgnu/stddef.h conflicts with gcc 5.3.1
Date: Fri, 01 Apr 2016 19:40:02 +0200
User-agent: Thunderbird

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




reply via email to

[Prev in Thread] Current Thread [Next in Thread]