# include <netinet/in.h>
#endif
+#ifndef APCMAIN
+# define APCMAIN 0
+#endif
+
#define NISPORT 3551
#define MAXSTRING 256
#define MODULE_NAME "apcups"
/*
* The following are only if not compiled to test the module with its own main.
*/
-/* FIXME: Rename DSes to be more generic and follow established conventions. */
-#ifndef APCMAIN
+#if APCMAIN
static char *bvolt_file_template = "apcups/voltage-%s.rrd";
static char *bvolt_ds_def[] =
{
};
static int config_keys_num = 2;
-#endif /* ifndef APCMAIN */
+#endif /* if APCMAIN */
struct apc_detail_s
{
return (0);
}
-#ifdef APCMAIN
+#if APCMAIN
/*
* This is used for testing apcups in a standalone mode.
* Usefull for debugging.
cf_register (MODULE_NAME, apcups_config, config_keys, config_keys_num);
}
-#endif /* ifdef APCMAIN */
+#endif /* if APCMAIN */
#undef MODULE_NAME