X-Git-Url: http://erislabs.net/gitweb/?a=blobdiff_plain;f=lib%2Fsig-handler.h;h=f4fe7eca87420fc8ea7360cfa0eca34a1af582b8;hb=1276a2c5f24c0c932426aca9c899fa524d2443f2;hp=fdca95d3b04e4c70509bb3f578eda2d2191603d5;hpb=3030c5b5e0a5199e16b05927da72c43c42f211c3;p=gnulib.git diff --git a/lib/sig-handler.h b/lib/sig-handler.h index fdca95d3b..f4fe7eca8 100644 --- a/lib/sig-handler.h +++ b/lib/sig-handler.h @@ -1,6 +1,6 @@ /* Convenience declarations when working with . - Copyright (C) 2008, 2009 Free Software Foundation, Inc. + Copyright (C) 2008-2014 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -20,13 +20,21 @@ #include +#ifndef _GL_INLINE_HEADER_BEGIN + #error "Please include config.h first." +#endif +_GL_INLINE_HEADER_BEGIN +#ifndef SIG_HANDLER_INLINE +# define SIG_HANDLER_INLINE _GL_INLINE +#endif + /* Convenience type when working with signal handlers. */ typedef void (*sa_handler_t) (int); /* Return the handler of a signal, as a sa_handler_t value regardless of its true type. The resulting function can be compared to special values like SIG_IGN but it is not portable to call it. */ -static inline sa_handler_t +SIG_HANDLER_INLINE sa_handler_t get_handler (struct sigaction const *a) { #ifdef SA_SIGINFO @@ -41,4 +49,6 @@ get_handler (struct sigaction const *a) return a->sa_handler; } +_GL_INLINE_HEADER_END + #endif /* _GL_SIG_HANDLER_H */