X-Git-Url: http://erislabs.net/gitweb/?a=blobdiff_plain;f=lib%2Fsignal.in.h;h=6d1be8fb89847a14f54aea2a7242c7c59fc58a2e;hb=bfb5ec49acc21828edb68ebfe93b94c43b044200;hp=5049b1da0d978e19801ca74a661475a0df97e686;hpb=34f19098068439da352e5dbac4e431220557f812;p=gnulib.git diff --git a/lib/signal.in.h b/lib/signal.in.h index 5049b1da0..6d1be8fb8 100644 --- a/lib/signal.in.h +++ b/lib/signal.in.h @@ -20,8 +20,17 @@ #endif @PRAGMA_COLUMNS@ -#if defined __need_sig_atomic_t || defined __need_sigset_t -/* Special invocation convention inside glibc header files. */ +#if defined __need_sig_atomic_t || defined __need_sigset_t || defined _GL_ALREADY_INCLUDING_SIGNAL_H || (defined _SIGNAL_H && !defined __SIZEOF_PTHREAD_MUTEX_T) +/* Special invocation convention: + - Inside glibc header files. + - On glibc systems we have a sequence of nested includes + -> -> . + In this situation, the functions are not yet declared, therefore we cannot + provide the C++ aliases. + - On glibc systems with GCC 4.3 we have a sequence of nested includes + -> -> -> . + In this situation, some of the functions are not yet declared, therefore + we cannot provide the C++ aliases. */ # @INCLUDE_NEXT@ @NEXT_SIGNAL_H@ @@ -30,6 +39,8 @@ #ifndef _@GUARD_PREFIX@_SIGNAL_H +#define _GL_ALREADY_INCLUDING_SIGNAL_H + /* Define pid_t, uid_t. Also, mingw defines sigset_t not in , but in . On Solaris 10, includes , which eventually includes @@ -39,6 +50,8 @@ /* The include_next requires a split double-inclusion guard. */ #@INCLUDE_NEXT@ @NEXT_SIGNAL_H@ +#undef _GL_ALREADY_INCLUDING_SIGNAL_H + #ifndef _@GUARD_PREFIX@_SIGNAL_H #define _@GUARD_PREFIX@_SIGNAL_H @@ -103,10 +116,13 @@ typedef void (*sighandler_t) (int); #if @GNULIB_PTHREAD_SIGMASK@ -# if @REPLACE_PTHREAD_SIGMASK@ +# if !@HAVE_PTHREAD_SIGMASK@ _GL_FUNCDECL_SYS (pthread_sigmask, int, (int how, const sigset_t *new_mask, sigset_t *old_mask)); # endif +_GL_CXXALIAS_SYS (pthread_sigmask, int, + (int how, const sigset_t *new_mask, sigset_t *old_mask)); +_GL_CXXALIASWARN (pthread_sigmask); #elif defined GNULIB_POSIXCHECK # undef pthread_sigmask # if HAVE_RAW_DECL_PTHREAD_SIGMASK