X-Git-Url: https://git.tokkee.org/?a=blobdiff_plain;ds=sidebyside;f=plugins%2Fcommon.h;h=e10586bc8f4c7f077ed4de0fa6fd80537e50228b;hb=20d0154211fa46028383ed3a88b558731313c389;hp=e55b0bbdbd6dec63eee25c128ab37ff45d6b9851;hpb=4784cac1f017a67978c2f3f2af75b161d1ef33c0;p=nagiosplug.git diff --git a/plugins/common.h b/plugins/common.h index e55b0bb..e10586b 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 @@ -94,6 +100,22 @@ #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 @@ -135,10 +157,13 @@ enum { ERROR = -1 }; +/* AIX seems to have this defined somewhere else */ +#ifndef FALSE enum { FALSE, TRUE }; +#endif enum { STATE_OK, @@ -159,17 +184,10 @@ enum { * Internationalization * */ +#include "gettext.h" +#define _(String) gettext (String) -#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) +/* For non-GNU compilers to ignore __attribute__ */ +#ifndef __GNUC__ +# define __attribute__(x) /* do nothing */ #endif