Opened 13 years ago
Closed 13 years ago
#166 closed defect (fixed)
warning: implicit declaration of function ‘pselect’
Reported by: | andersk@mit.edu | Owned by: | |
---|---|---|---|
Priority: | minor | Milestone: | |
Component: | internals | Keywords: | |
Cc: |
Description
If PERL_CFLAGS does not contain -D_GNU_SOURCE, then BarnOwl compiles with this warning:
select.c: In function ‘owl_select’: select.c:416:3: warning: implicit declaration of function ‘pselect’
because pselect requires _POSIX_C_SOURCE >= 200112L || _XOPEN_SOURCE >= 600, either of which would require C99 mode on Solaris.
This was discovered on Gentoo, but can be tested on Ubuntu with a stupid change to configure.ac:
-PERL_CFLAGS=`perl -MExtUtils::Embed -e ccopts` +PERL_CFLAGS=`perl -MExtUtils::Embed -e ccopts | sed 's/-D_GNU_SOURCE/-D_LARGEFILE64_SOURCE/'`
Change History (2)
comment:1 Changed 13 years ago by andersk@mit.edu
comment:2 Changed 13 years ago by jgross@mit.edu
- Resolution set to fixed
- Status changed from new to closed
Fixed by the g_main_loop branch (specifically commit 2c79eae5e102073224cebae432e5c3ca7122da9f). If we don't pselect anymore, we can't be warned about its implicit declaration.
Note: See
TracTickets for help on using
tickets.
So, yeah. We could turn on C99 mode (via AC_PROG_CC_STDC or AC_PROG_CC_C99), or turn on _GNU_SOURCE (via AC_USE_SYSTEM_EXTENSIONS), and resign ourselves to allowing the code to start requiring one or the other. Or maybe we could conditionally enable _XOPEN_SOURCE=600 somehow, which sounds like an even worse idea.