Skip to content
Snippets Groups Projects
Commit 93db2fd3 authored by Mark Grondona's avatar Mark Grondona
Browse files

o include and use stdbool.h if available, otherwise define a bool type.

   (macros.h)
 o Include macros.h in slurm_protocol_defs.h
parent 462cef3d
No related branches found
No related tags found
No related merge requests found
...@@ -13,12 +13,18 @@ ...@@ -13,12 +13,18 @@
# include <stddef.h> /* for NULL */ # include <stddef.h> /* for NULL */
#endif #endif
#if HAVE_STDBOOL_H
# include <stdbool.h>
#else
typedef enum {false, true} bool;
#endif /* !HAVE_STDBOOL_H */
#ifndef FALSE #ifndef FALSE
#define FALSE (0) #define FALSE false
#endif #endif
#ifndef TRUE #ifndef TRUE
#define TRUE (!FALSE) #define TRUE true
#endif #endif
/* /*
......
...@@ -14,11 +14,9 @@ ...@@ -14,11 +14,9 @@
# include <inttypes.h> # include <inttypes.h>
#endif /* HAVE_CONFIG_H */ #endif /* HAVE_CONFIG_H */
/* true, false */
#define true -1
#define false 0
#define NO_VAL 0x7f7f7f7f #define NO_VAL 0x7f7f7f7f
#include <src/common/macros.h>
#include <src/common/slurm_protocol_common.h> #include <src/common/slurm_protocol_common.h>
/* SLURM Message types */ /* SLURM Message types */
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment