#if HAVE_STDINT_H
# include <stdint.h>
#endif
-#if HAVE_STDBOOL_H
-# include <stdbool.h>
-#else
-# ifndef HAVE__BOOL
-# ifdef __cplusplus
-typedef bool _Bool;
-# else
-# define _Bool signed char
-# endif
-# endif
-# define bool _Bool
-# define false 0
-# define true 1
-# define __bool_true_false_are_defined 1
-#endif
#if HAVE_UNISTD_H
# include <unistd.h>
#endif
static ignorelist_t *il_mountpoint = NULL;
static ignorelist_t *il_fstype = NULL;
-static _Bool by_device = false;
-static _Bool report_inodes = false;
+static _Bool by_device = 0;
+static _Bool report_inodes = 0;
static int df_init (void)
{
else if (strcasecmp (key, "ReportByDevice") == 0)
{
if (IS_TRUE (value))
- by_device = true;
+ by_device = 1;
return (0);
}
else if (strcasecmp (key, "ReportInodes") == 0)
{
if (IS_TRUE (value))
- report_inodes = true;
+ report_inodes = 1;
else
- report_inodes = false;
+ report_inodes = 0;
return (0);
}
#include "configfile.h"
+#if HAVE_STDBOOL_H
+# include <stdbool.h>
+#endif
+
#include <EXTERN.h>
#include <perl.h>
}
case NM_TYPE_BOOLEAN:
{
- meta->nm_value.nm_boolean = *((bool *) value);
+ meta->nm_value.nm_boolean = *((_Bool *) value);
break;
}
default:
int plugin_notification_meta_add_boolean (notification_t *n,
const char *name,
- bool value)
+ _Bool value)
{
return (plugin_notification_meta_add (n, name, NM_TYPE_BOOLEAN, &value));
}
int64_t nm_signed_int;
uint64_t nm_unsigned_int;
double nm_double;
- bool nm_boolean;
+ _Bool nm_boolean;
} nm_value;
struct notification_meta_s *next;
} notification_meta_t;
double value);
int plugin_notification_meta_add_boolean (notification_t *n,
const char *name,
- bool value);
+ _Bool value);
int plugin_notification_meta_copy (notification_t *dst,
const notification_t *src);
pthread_mutex_lock (&queue_lock);
/* Wait for values to arrive */
- while (true)
+ while (42)
{
struct timespec ts_wait;
&ts_wait);
if (status == ETIMEDOUT)
break;
- } /* while (true) */
+ } /* while (42) */
/* XXX: If you need to lock both, cache_lock and queue_lock, at
* the same time, ALWAYS lock `cache_lock' first! */