From a769947e6625caa96d19d27c2d0f5d946e2868d5 Mon Sep 17 00:00:00 2001
From: Moe Jette <jette1@llnl.gov>
Date: Tue, 23 Jan 2007 19:26:57 +0000
Subject: [PATCH] Remove bad comma, add optional definition for bool (needed
 for XLC).

---
 slurm/slurm.h.in | 25 ++++++++++++++++++++++++-
 1 file changed, 24 insertions(+), 1 deletion(-)

diff --git a/slurm/slurm.h.in b/slurm/slurm.h.in
index 9c8d2057324..c3026b5c28d 100644
--- a/slurm/slurm.h.in
+++ b/slurm/slurm.h.in
@@ -87,6 +87,29 @@ BEGIN_C_DECLS
 #include <time.h>		/* for time_t definitions */
 #include <stdbool.h>
 
+#ifdef CRAPPY_COMPILER
+  /*
+   * 'bool' can be implemented in a variety of ways.
+   * C++ may define it one way.
+   * <stdbool.h> may declare 'bool' to be a different type, such as 
+   * an enum which is not necessarily compatible with C++.
+   *
+   * If your compiler can't resolve 'bool', just add 
+   * "#define CRAPPY_COMPILER" before "#include <slurm/slurm.h> 
+   * in order for Slurm to define it's own version of bool.
+   */
+
+   #undef  TRUE
+   #define TRUE   1
+
+   #undef  FALSE
+   #define FALSE  0
+
+   typedef unsigned char SLURM_BOOL;
+   #undef  bool
+   #define bool SLURM_BOOL
+#endif
+
 /* Define slurm_addr below to avoid including extraneous slurm headers */
 #ifdef	HAVE_SYS_SOCKET_H
 #  ifndef __slurm_addr_defined
@@ -390,7 +413,7 @@ typedef enum select_type_plugin_info {
 		    * be co-allocated within cores */
 	CR_SOCKET_MEMORY, /* Socket and Memory are CRs */
 	CR_CORE_MEMORY,   /* Core and Memory are CRs */
-	CR_CPU_MEMORY,    /* CPU and Memory are CRs */
+	CR_CPU_MEMORY     /* CPU and Memory are CRs */
 } select_type_plugin_info_t ;
 
 /* Values for slurm_ctl_conf.task_plugin_param */
-- 
GitLab