fredag den 17 juni 2011 klockan 07:51 skrev Simon Josefsson detta: > Mats Erik Andersson <[email protected]> writes: > > > torsdag den 16 juni 2011 klockan 13:14 skrev Simon Josefsson detta: > >> Mats Erik Andersson <[email protected]> writes: > >> > >> > Dear all, > >> > > >> > we have clearly no support for OpenSolaris in our project. > >> > Since two weeks back I have a system running NexentaCore, > >> > providing me with some services, and more importantly, > >> > a test bed for portability! > >> > > >> > Already compiling 'libinetutils' leads to a failure. > >> > The problem is that 'libinetutils/setsig.c' tacitly > >> > assumes the presence of > >> > > >> > typedef sig_t; > >> > > >> > This does not apply to OpenSolaris: > >> > > >> > /* config.h */ > >> > > >> > /* #undef HAVE_SIG_T */ > >> > >> Glibc uses 'sighandler_t' for this, and gnulib should make sure it is > >> available. I've checked in a fix for this, please test! > > > > You must revert this, since you just broke the compilation in OpenBSD: > > > > CC setsig.o > > setsig.c:31: error: syntax error before "setsig" > > setsig.c:31: error: syntax error before "sighandler_t" > > setsig.c:32: warning: return type defaults to 'int' > > setsig.c:39: error: 'handler' undeclared (first use in this function) > > setsig.c:40: error: 'sig' undeclared (first use in this function) > > setsig.c:41: warning: return makes integer from pointer without a cast > > Doesn't gnulib's signal.h provide the sighandler_t type? It should. > > Can you try to track down why it doesn't work? What is > HAVE_SIGHANDLER_T in config.h for you? > > signal.in.h contains: > > /* Define sighandler_t, the type of signal handlers. A GNU extension. */ > #if !@HAVE_SIGHANDLER_T@ > # ifdef __cplusplus > extern "C" { > # endif > # if !GNULIB_defined_sighandler_t > typedef void (*sighandler_t) (int); > # define GNULIB_defined_sighandler_t 1 > # endif > # ifdef __cplusplus > } > # endif > #endif > > The gnulib manual says this should work for OpenBSD: > > Gnulib module: signal > > Portability problems fixed by Gnulib: > ... > The type @code{sighandler_t} (a GNU extension) is not defined on most > non-glibc > platforms: > MacOS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, AIX 5.1, HP-UX 11, > IRIX 6.5, OSF/1 5.1, Solaris 11 2010-11, Cygwin, mingw, Interix 3.5, BeOS.
Yes, but no test of 'sighandler_t' is ever implemented in IU Inetutils. No traces in 'configure.ac' or 'config.hin'. You have forgotten to implement the relevant test. Or am I missing something? Up until two days ago, 'sig_t' and 'sa_sigaction' were detected, but not 'sighandler_t'. Now only 'sa_sigaction' remains. Regards, Mats
