diff options
author | Bruno Haible <bruno@clisp.org> | 2010-11-14 17:48:50 +0100 |
---|---|---|
committer | Bruno Haible <bruno@clisp.org> | 2011-02-07 01:32:05 +0100 |
commit | 438ac9a296467cfdbe8a9c60d6b64370d89e02f9 (patch) | |
tree | 6a2b66af8d1a1e5a76f682497e8559b20c3a8a18 /lib/signal.in.h | |
parent | 4013d14c4b1f18cb4b665a0a47ad80ce3224d25d (diff) | |
download | gnulib-438ac9a296467cfdbe8a9c60d6b64370d89e02f9.tar.gz |
Allow multiple gnulib generated replacements to coexist.
* lib/getopt.in.h (struct option): Avoid identical redefinition.
* lib/inttypes.in.h (imaxdiv_t): Likewise.
* lib/langinfo.in.h (nl_item): Likewise.
* lib/math.in.h (_NaN, NAN): Likewise.
* lib/netdb.in.h (struct addrinfo): Likewise.
* lib/poll.in.h (struct pollfd, nfds_t): Likewise.
* lib/pthread.in.h (pthread_t, pthread_attr_t, pthread_barrier_t,
pthread_barrierattr_t, pthread_cond_t, pthread_condattr_t,
pthread_key_t, pthread_mutex_t, pthread_mutexattr_t, pthread_once_t,
pthread_rwlock_t, pthread_rwlockattr_t, pthread_cond_destroy,
pthread_cond_init, pthread_cond_signal, pthread_cond_wait,
pthread_create, pthread_exit, pthread_join, pthread_mutexattr_destroy,
pthread_mutexattr_init, pthread_mutexattr_settype,
pthread_mutex_destroy, pthread_mutex_init, pthread_mutex_lock,
pthread_mutex_trylock, pthread_mutex_unlock, pthread_spinlock_t,
pthread_spin_init, pthread_spin_destroy, pthread_spin_lock,
pthread_spin_trylock, pthread_spin_unlock): Likewise.
* lib/sched.in.h (struct sched_param): Likewise.
* lib/se-selinux.in.h (security_class_t, security_context_t,
is_selinux_enabled, getcon, freecon, getfscreatecon, setfscreatecon,
matchpathcon, getfilecon, lgetfilecon, fgetfilecon, setfilecon,
lsetfilecon, fsetfilecon, security_check_context,
security_check_context_raw, setexeccon, matchpathcon_init_prefix):
Likewise.
* lib/search.in.h (VISIT, _gl_search_compar_fn, _gl_search_action_fn):
Likewise.
* lib/signal.in.h (sig_atomic_t, sigset_t, verify_NSIG_constraint,
_gl_function_taking_int_returning_void_t, union sigval,
struct siginfo_t, siginfo_t, struct sigaction): Likewise.
* lib/spawn.in.h (posix_spawnattr_t, posix_spawn_file_actions_t,
verify_POSIX_SPAWN_USEVFORK_no_overlap): Likewise.
* lib/stdint.in.h (gl_int8_t, gl_uint8_t, gl_int16_t, gl_uint16_t,
gl_int32_t, gl_uint32_t, gl_int64_t, gl_uint64_t, int_least8_t,
uint_least8_t, int_least16_t, uint_least16_t, int_least32_t,
uint_least32_t, int_least64_t, uint_least64_t, gl_int_fast8_t,
gl_uint_fast8_t, gl_int_fast16_t, gl_uint_fast16_t, gl_int_fast32_t,
gl_uint_fast32_t, int_fast64_t, uint_fast64_t, gl_intptr_t,
gl_uintptr_t, intmax_t, uintmax_t, _verify_intmax_size): Likewise.
* lib/stdio.in.h (rpl_fseek, rpl_ftell): Likewise.
* lib/sys_socket.in.h (sa_family_t, struct sockaddr_storage,
socklen_t, rpl_fd_isset): Likewise.
* lib/sys_stat.in.h (rpl_mkdir): Likewise.
* lib/sys_time.in.h (struct timeval): Likewise.
* lib/sys_times.in.h (struct tms): Likewise.
* lib/sys_utsname.in.h (struct utsname):
* lib/time.in.h (struct timespec, __time_t_must_be_integral): Likewise.
* lib/unistd.in.h (getpagesize): Likewise.
* lib/wchar.in.h (mbstate_t): Likewise.
* lib/wctype.in.h (iswalnum, iswalpha, iswblank, iswcntrl, iswdigit,
iswgraph, iswlower, iswprint, iswpunct, iswspace, iswupper, iswxdigit,
towlower, towupper): Likewise.
Reported by Sam Steingold <sds@gnu.org>.
Diffstat (limited to 'lib/signal.in.h')
-rw-r--r-- | lib/signal.in.h | 38 |
1 files changed, 31 insertions, 7 deletions
diff --git a/lib/signal.in.h b/lib/signal.in.h index 8e23e66a60..7a6d6ee856 100644 --- a/lib/signal.in.h +++ b/lib/signal.in.h @@ -50,14 +50,20 @@ 'volatile sig_atomic_t' ignore the extra modifier, but C89 did not. Hence, redefine this to a non-volatile type as needed. */ #if ! @HAVE_TYPE_VOLATILE_SIG_ATOMIC_T@ +# if !GNULIB_defined_sig_atomic_t typedef int rpl_sig_atomic_t; -# undef sig_atomic_t -# define sig_atomic_t rpl_sig_atomic_t +# undef sig_atomic_t +# define sig_atomic_t rpl_sig_atomic_t +# define GNULIB_defined_sig_atomic_t 1 +# endif #endif /* A set or mask of signals. */ #if !@HAVE_SIGSET_T@ +# if !GNULIB_defined_sigset_t typedef unsigned int sigset_t; +# define GNULIB_defined_sigset_t 1 +# endif #endif @@ -89,7 +95,10 @@ typedef unsigned int sigset_t; # endif /* This code supports only 32 signals. */ +# if !GNULIB_defined_verify_NSIG_constraint typedef int verify_NSIG_constraint[NSIG <= 32 ? 1 : -1]; +# define GNULIB_defined_verify_NSIG_constraint 1 +# endif # endif @@ -184,7 +193,10 @@ _GL_CXXALIASWARN (sigprocmask); # ifdef __cplusplus extern "C" { # endif +# if !GNULIB_defined_function_taking_int_returning_void_t typedef void (*_gl_function_taking_int_returning_void_t) (int); +# define GNULIB_defined_function_taking_int_returning_void_t 1 +# endif # ifdef __cplusplus } # endif @@ -258,6 +270,9 @@ _GL_WARN_ON_USE (sigprocmask, "sigprocmask is unportable - " # if !@HAVE_SIGACTION@ # if !@HAVE_SIGINFO_T@ + +# if !GNULIB_defined_siginfo_types + /* Present to allow compilation, but unsupported by gnulib. */ union sigval { @@ -279,11 +294,17 @@ struct siginfo_t union sigval si_value; }; typedef struct siginfo_t siginfo_t; + +# define GNULIB_defined_siginfo_types 1 +# endif + # endif /* !@HAVE_SIGINFO_T@ */ /* We assume that platforms which lack the sigaction() function also lack the 'struct sigaction' type, and vice versa. */ +# if !GNULIB_defined_struct_sigaction + struct sigaction { union @@ -299,12 +320,15 @@ struct sigaction /* Not all POSIX flags are supported. */ int sa_flags; }; -# define sa_handler _sa_func._sa_handler -# define sa_sigaction _sa_func._sa_sigaction +# define sa_handler _sa_func._sa_handler +# define sa_sigaction _sa_func._sa_sigaction /* Unsupported flags are not present. */ -# define SA_RESETHAND 1 -# define SA_NODEFER 2 -# define SA_RESTART 4 +# define SA_RESETHAND 1 +# define SA_NODEFER 2 +# define SA_RESTART 4 + +# define GNULIB_defined_struct_sigaction 1 +# endif _GL_FUNCDECL_SYS (sigaction, int, (int, const struct sigaction *restrict, struct sigaction *restrict)); |