Hi Marcel,
Sorry about the duplicate e-mail. I neglected to reply to all earlier.
On Thu, Nov 1, 2018 at 2:31 AM Marcel Holtmann <marcel(a)holtmann.org> wrote:
> On Nov 1, 2018, at 10:27, maxice8
<thinkabit.ukim(a)gmail.com> wrote:
> Error message:
>
> CC ell/main.lo
> In file included from ell/main.c:35:
> ell/signal.h:39:40: error: unknown type name '__sigset_t'
> struct l_signal *l_signal_create(const __sigset_t *mask,
> ^~~~~~~~~~
I tried to make this work with -std=c99 and I am kinda lost on what the right approach
here is. Define _USE_POSIX or what is the recommendation?
Ideally ELL's public API should not depend on the definition of a
feature test macro, but if one is going to be defined I'd avoid
__USE_POSIX since it's a glibc implementation detail. I'd go with
_DEFAULT_SOURCE, which I think is specific to glibc, or one of the
standard _POSIX_SOURCE, _POSIX_C_SOURCE (>= 1), or _XOPEN_SOURCE.
Relevant feature test macro documentation:
http://man7.org/linux/man-pages/man7/feature_test_macros.7.html
http://pubs.opengroup.org/onlinepubs/007904975/functions/xsh_chap02_02.html
https://www.gnu.org/software/libc/manual/html_node/Feature-Test-Macros.html
BTW, this problem isn't specific to -std=c99 builds. It occurs with
-std=c11 and -ansi, too.
HTH,
-Ossama