Skip Menu |

This queue is for tickets about the Tickit CPAN distribution.

Report information
The Basics
Id: 114309
Status: resolved
Priority: 0/
Queue: Tickit

People
Owner: Nobody in particular
Requestors: SREZIC [...] cpan.org
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in:
  • 0.56
  • 0.59
Fixed in: (no value)



Subject: Compilation failure on freebsd (SIGWINCH) (0.56)
On a FreeBSD 9.2 system compilation fails: src/term.c: In function 'tickit_term_observe_sigwinch': src/term.c:309: error: 'SIGWINCH' undeclared (first use in this function) src/term.c:309: error: (Each undeclared identifier is reported only once src/term.c:309: error: for each function it appears in.) error building src/term.o from 'src/term.c' at /usr/perl5.14.4/lib/site_perl/5.14.4/ExtUtils/CBuilder/Base.pm line 173. It's possible to use the hack below for a successful compile: diff --git a/src/term.c b/src/term.c index 6131c2d..7a42b88 100644 --- a/src/term.c +++ b/src/term.c @@ -6,6 +6,7 @@ /* We need SIGWINCH */ #define _BSD_SOURCE +#define __BSD_VISIBLE 1 #include "tickit.h"
On 2016-05-10 13:35:41, SREZIC wrote: Show quoted text
> On a FreeBSD 9.2 system compilation fails: > > src/term.c: In function 'tickit_term_observe_sigwinch': > src/term.c:309: error: 'SIGWINCH' undeclared (first use in this > function) > src/term.c:309: error: (Each undeclared identifier is reported only > once > src/term.c:309: error: for each function it appears in.) > error building src/term.o from 'src/term.c' at > /usr/perl5.14.4/lib/site_perl/5.14.4/ExtUtils/CBuilder/Base.pm line > 173. > > It's possible to use the hack below for a successful compile: > > diff --git a/src/term.c b/src/term.c > index 6131c2d..7a42b88 100644 > --- a/src/term.c > +++ b/src/term.c > @@ -6,6 +6,7 @@ > > /* We need SIGWINCH */ > #define _BSD_SOURCE > +#define __BSD_VISIBLE 1 > > #include "tickit.h" >
A patch is still needed for 0.60.
Yeah; I'm not sure if that's best though. More underscore-prefixed things seem worrying. What's the actual proper way to get SIGWINCH? I get warnings out of gcc by asking for _BSD_SOURCE anyway, even on Linux -- Paul Evans
On 2016-11-05 11:24:52, PEVANS wrote: Show quoted text
> Yeah; I'm not sure if that's best though. More underscore-prefixed > things seem worrying. > > What's the actual proper way to get SIGWINCH? I get warnings out of > gcc by asking for _BSD_SOURCE anyway, even on Linux
To get SIGWINCH, one does not have to do anything normally, at least of FreeBSD systems. The following C program shows that SIGWINCH is simply there if signal.h is included: ------------------------ #include <signal.h> #include <stdio.h> int main() { #ifdef SIGWINCH printf("I have SIGWINCH!\n"); #endif return 0; } ------------------------ However, by defining _XOPEN_SOURCE=600 the SIGWINCH definition does not happen anymore. This can be shown by compiling the above program with "cc -D_XOPEN_SOURCE=600 winch.c". So an alternative solution would be to drop (or #ifdef) the #define _XOPEN_SOURCE 600" line on FreeBSD systems, maybe also other *BSD systems. I just checked: src/term.c compiles fine without this define.
Show quoted text
> So an alternative solution would be to drop (or #ifdef) the #define > _XOPEN_SOURCE 600" line on FreeBSD systems, maybe also other *BSD > systems. I just checked: src/term.c compiles fine without this define.
Any suggestion? What can I rely on #ifdef'ing that with? -- Paul Evans
On 2016-12-04 18:00:17, PEVANS wrote: Show quoted text
> > So an alternative solution would be to drop (or #ifdef) the #define > > _XOPEN_SOURCE 600" line on FreeBSD systems, maybe also other *BSD > > systems. I just checked: src/term.c compiles fine without this define.
> > Any suggestion? What can I rely on #ifdef'ing that with?
It seems that this particular problem does not happen anymore in 0.63, that is, src/term.c compiles on all of my freebsd systems (9 .. 12). There are other problems on freebsd, but these should go into other tickets. I think this issue may be closed.