1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116
|
Description: Fix collision with stdbool.h definitions.
Author: Bas Couwenberg <sebastic@debian.org>
Bug: https://github.com/MapServer/tinyows/issues/98
Forwarded: https://github.com/MapServer/tinyows/issues/98#issuecomment-1144452700
--- a/src/ows_struct.h
+++ b/src/ows_struct.h
@@ -29,12 +29,12 @@
/* ========= Structures ========= */
-enum Bool {
- false,
- true
+enum Bool_ {
+ FALSE = 0,
+ TRUE = 1
};
-typedef enum Bool bool;
+typedef enum Bool_ bool_;
#define BUFFER_SIZE_INIT 256
@@ -107,7 +107,7 @@ typedef struct Ows_layer_storage {
buffer * pkey;
buffer * pkey_sequence;
buffer * pkey_default;
- bool is_geographic; /* true for a geographic CRS (or a compound CRS
+ bool_ is_geographic; /* true for a geographic CRS (or a compound CRS
whose base is geographic), false for a projected
CRS (or a compound CRS whose base is projected) */
array * attributes;
@@ -117,11 +117,11 @@ typedef struct Ows_srs {
int srid;
buffer * auth_name;
int auth_srid;
- bool is_geographic; /* true for a geographic CRS (or a compound
+ bool_ is_geographic; /* true for a geographic CRS (or a compound
CRS whose base is geographic), false for
a projected CRS (or a compound CRS whose
base is projected) */
- bool is_axis_order_gis_friendly; /* true for a CRS whose axis order is
+ bool_ is_axis_order_gis_friendly; /* true for a CRS whose axis order is
typically easting, northing (e.g most
projected CRS, such as EPSG:32631)
false for example for EPSG:4326 (WGS 84),
@@ -129,10 +129,10 @@ typedef struct Ows_srs {
/* The two below fields are not properties of the SRS, but of its context
* of use. */
- bool honours_authority_axis_order; /* true for a context where the axis order
- as defined by the authority should be
- respected */
- bool is_long; /* true for a context where the srsname must
+ bool_ honours_authority_axis_order; /* true for a context where the axis order
+ as defined by the authority should be
+ respected */
+ bool_ is_long; /* true for a context where the srsname must
be exported as a long URN */
} ows_srs;
@@ -184,8 +184,8 @@ typedef struct Ows_layer {
buffer * name_prefix; /* Nominally concatenation of ns_prefix:name_no_uri, e.g. "tows:world" , or name_no_uri if no ns_prefix */
buffer * name_no_uri; /* the name as in the "name" attribute in the config, e.g "world" */
buffer * title;
- bool retrievable;
- bool writable;
+ bool_ retrievable;
+ bool_ writable;
list * srid;
ows_geobbox * geobbox;
buffer * abstract;
@@ -346,8 +346,8 @@ enum fe_error_code {
};
typedef struct Filter_encoding {
- bool in_not;
- bool is_numeric;
+ bool_ in_not;
+ bool_ is_numeric;
buffer * sql;
enum fe_error_code error_code;
} filter_encoding;
@@ -370,10 +370,10 @@ typedef struct Ows_request {
#define OWS_MAX_DOUBLE 1e15 /* %f vs %g */
typedef struct Ows {
- bool init;
- bool exit;
+ bool_ init;
+ bool_ exit;
PGconn * pg;
- bool mapfile;
+ bool_ mapfile;
buffer * config_file;
buffer * schema_dir;
buffer * online_resource;
@@ -396,12 +396,12 @@ typedef struct Ows {
int max_features;
ows_geobbox * max_geobbox;
- bool display_bbox;
- bool expose_pk;
- bool estimated_extent;
+ bool_ display_bbox;
+ bool_ expose_pk;
+ bool_ estimated_extent;
- bool check_schema;
- bool check_valid_geom;
+ bool_ check_schema;
+ bool_ check_valid_geom;
array * cgi;
list * psql_requests;
|