You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tcl.apache.org by mx...@apache.org on 2019/01/16 17:40:56 UTC
[tcl-rivet] 02/03: add bool datatype definition
This is an automated email from the ASF dual-hosted git repository.
mxmanghi pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/tcl-rivet.git
commit cc6e3cdab648458080a73fbacb2cc5241ac06b43
Author: Massimo Manghi <mx...@apache.org>
AuthorDate: Wed Jan 16 18:39:58 2019 +0100
add bool datatype definition
---
src/mod_rivet_ng/rivet_types.h | 27 +++++++++++++++++++++++++--
1 file changed, 25 insertions(+), 2 deletions(-)
diff --git a/src/mod_rivet_ng/rivet_types.h b/src/mod_rivet_ng/rivet_types.h
index b8cda08..787a15f 100644
--- a/src/mod_rivet_ng/rivet_types.h
+++ b/src/mod_rivet_ng/rivet_types.h
@@ -23,12 +23,35 @@
/* $Id$ */
-#ifndef _RIVET_TYPES_H_
-#define _RIVET_TYPES_H_
+#ifndef __RIVET_TYPES_H__
+#define __RIVET_TYPES_H__
#include <httpd.h>
#include <tcl.h>
+/* Definition suggested in
+ *
+ * https://www.gnu.org/software/autoconf/manual/autoconf-2.67/html_node/Particular-Headers.html
+ *
+ * in order to have a portable definition of the 'bool' data type
+ */
+
+#ifdef 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
+
typedef struct _ApacheRequest ApacheRequest;
typedef struct _ApacheUpload ApacheUpload;
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@tcl.apache.org
For additional commands, e-mail: commits-help@tcl.apache.org