Hallo Jamal, > > clang with c11 enforcement (clang -Wall -g -O -std=c11) pukes on: > > ./ev.c:3814:26: error: use of undeclared identifier 'SIG_UNBLOCK' > sigprocmask (SIG_UNBLOCK, &sa.sa_mask, 0); > ^ > (slightly dated ev.c - but inspecting the latest tree, same issue there) > > looking at the man pages for sigprocmask on linux: > sigprocmask() requires one of: > _POSIX_C_SOURCE >= 1 || _XOPEN_SOURCE || _POSIX_SOURCE
This is not mentioned in the man pages of BSD or POSIX; it appears to be specific to the glibc environment, see the reference to feature_test_macros(7) The glibc choice of hiding identifiers when these symbols aren't defined prior to including the file should be addressed locally. The options you have are to set up Linux / glibc treatment in autoconf and/or to use clang's -D option. You won't need to detect Linux or glibc in autoconf; instead, you can just test if the function exists, and if not try if that changes when you #define a symbol. > > It is trivial to pick one of the above and #define in ev.c but i dont > want to diverge on a private tree. And it'd be ill-advised for wanting to patch Linux/glibc-specific behaviour. > > Is there some compile option perhaps i should be passing to make this go > away? Did you try -D_POSIX_SOURCE already? Cheers, -Rick > Jamal Hadi Salim <mailto:[email protected]> > 20 March 2015 19:28 > clang with c11 enforcement (clang -Wall -g -O -std=c11) pukes on: > > ./ev.c:3814:26: error: use of undeclared identifier 'SIG_UNBLOCK' > sigprocmask (SIG_UNBLOCK, &sa.sa_mask, 0); > ^ > (slightly dated ev.c - but inspecting the latest tree, same issue there) > > looking at the man pages for sigprocmask on linux: > sigprocmask() requires one of: > _POSIX_C_SOURCE >= 1 || _XOPEN_SOURCE || _POSIX_SOURCE > > > It is trivial to pick one of the above and #define in ev.c but i dont > want to diverge on a private tree. > Is there some compile option perhaps i should be passing to make this go > away? > > cheers, > jamal > > > _______________________________________________ > libev mailing list > [email protected] > http://lists.schmorp.de/cgi-bin/mailman/listinfo/libev _______________________________________________ libev mailing list [email protected] http://lists.schmorp.de/cgi-bin/mailman/listinfo/libev
