X-Git-Url: https://git.tokkee.org/?a=blobdiff_plain;f=plugins%2Fcommon.h;h=e3f150f9116047e3dd61f9dc38ce0dc1009e1ff2;hb=edf60f6dceba48555f2534d9a217a8c5913ce029;hp=4877eee78b79d4b0c4c1c9cfeb329fb759b6e004;hpb=97ecfa6226bea7c09f78b2b92d807e73467ffc08;p=nagiosplug.git diff --git a/plugins/common.h b/plugins/common.h index 4877eee..e3f150f 100644 --- a/plugins/common.h +++ b/plugins/common.h @@ -28,6 +28,8 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. * + * $Id$ + * *****************************************************************************/ #include "config.h" @@ -40,6 +42,10 @@ #include #include +#ifdef HUGE_VAL_NEEDS_MATH_H +#include +#endif + #ifdef HAVE_STRINGS_H #include #endif @@ -80,7 +86,7 @@ #include -#if HAVE_LWRES_NETDB_H +#ifdef HAVE_LWRES_NETDB_H #include #else # if !HAVE_GETADDRINFO @@ -90,6 +96,26 @@ # endif #endif +#ifdef HAVE_LOCALE_H +#include +#endif + +#ifdef HAVE_DECL_SWAPCTL +# ifdef HAVE_SYS_SWAP_H +# include +# endif +# ifdef HAVE_SYS_STAT_H +# include +# endif +# ifdef HAVE_SYS_PARAM_H +# include +# endif +#endif + +#ifndef SWAP_CONVERSION +# define SWAP_CONVERSION 1 +#endif + /* * * Missing Functions @@ -131,10 +157,13 @@ enum { ERROR = -1 }; +/* AIX seems to have this defined somewhere else */ +#ifndef FALSE enum { FALSE, TRUE }; +#endif enum { STATE_OK, @@ -149,3 +178,28 @@ enum { MAX_INPUT_BUFFER = 1024, /* max size of most buffers we use */ MAX_HOST_ADDRESS_LENGTH = 256 /* max size of a host address */ }; + +/* + * + * Internationalization + * + */ + +#ifdef ENABLE_NLS +# include "gettext.h" +# define _(String) gettext (String) +# define S_(String) gettext (String) +# define gettext_noop(String) String +# define N_(String) gettext_noop String +#else +# define _(String) (String) +# define S_(String) (String) +# define N_(String) String +# define textdomain(Domain) +# define bindtextdomain(Package, Directory) +#endif + +/* For non-GNU compilers to ignore __attribute__ */ +#ifndef __GNUC__ +# define __attribute__(x) /* do nothing */ +#endif