[Git][debian-gis-team/tinyows][master] Use stdbool.h instead of renaming custom definitions.
Bas Couwenberg (@sebastic)
gitlab at salsa.debian.org
Sat Jun 4 14:55:48 BST 2022
Bas Couwenberg pushed to branch master at Debian GIS Project / tinyows
Commits:
e43f0cda by Bas Couwenberg at 2022-06-04T15:55:33+02:00
Use stdbool.h instead of renaming custom definitions.
- - - - -
3 changed files:
- − debian/patches/bool.patch
- debian/patches/series
- + debian/patches/stdbool.patch
Changes:
=====================================
debian/patches/bool.patch deleted
=====================================
@@ -1,116 +0,0 @@
-Description: Fix collision with stdbool.h definitions.
-Author: Bas Couwenberg <sebastic at 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;
=====================================
debian/patches/series
=====================================
@@ -1,3 +1,3 @@
buffer_copy.patch
liborder.patch
-bool.patch
+stdbool.patch
=====================================
debian/patches/stdbool.patch
=====================================
@@ -0,0 +1,57 @@
+Description: Use stdbool.h instead of custom definitions.
+Author: Bas Couwenberg <sebastic at debian.org>
+Bug-Debian: https://bugs.debian.org/1012231
+Bug: https://github.com/MapServer/tinyows/issues/98
+Forwarded: https://github.com/MapServer/tinyows/pull/99
+Applied-Upstream: https://github.com/MapServer/tinyows/commit/c300090e3726597b0475e058cd94e65e81864a26
+
+--- a/src/ows_struct.h
++++ b/src/ows_struct.h
+@@ -24,18 +24,12 @@
+ #ifndef OWS_STRUCT_H
+ #define OWS_STRUCT_H
+
++#include <stdbool.h>
+ #include <stdio.h> /* FILE prototype */
+
+
+ /* ========= Structures ========= */
+
+-enum Bool {
+- false,
+- true
+-};
+-
+-typedef enum Bool bool;
+-
+ #define BUFFER_SIZE_INIT 256
+
+ typedef struct Buffer {
+--- a/src/fe/fe_logical_ops.c
++++ b/src/fe/fe_logical_ops.c
+@@ -21,6 +21,7 @@
+ */
+
+
++#include <stdbool.h>
+ #include <stdio.h>
+ #include <stdlib.h>
+ #include <string.h>
+@@ -101,7 +102,7 @@ static buffer *fe_unary_logical_op(ows *
+ assert(n);
+
+ buffer_add_str(fe->sql, "not(");
+- fe->in_not++;
++ fe->in_not = true;
+
+ n = n->children;
+ while (n->type != XML_ELEMENT_NODE) n = n->next;
+@@ -112,7 +113,7 @@ static buffer *fe_unary_logical_op(ows *
+ else if (fe_is_comparison_op((char *) n->name)) fe->sql = fe_comparison_op(o, typename, fe, n);
+
+ buffer_add_str(fe->sql, ")");
+- fe->in_not--;
++ fe->in_not = false;
+
+ return fe->sql;
+ }
View it on GitLab: https://salsa.debian.org/debian-gis-team/tinyows/-/commit/e43f0cdaa25e9bf5421ac30481a2a6f060d840df
--
View it on GitLab: https://salsa.debian.org/debian-gis-team/tinyows/-/commit/e43f0cdaa25e9bf5421ac30481a2a6f060d840df
You're receiving this email because of your account on salsa.debian.org.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://alioth-lists.debian.net/pipermail/pkg-grass-devel/attachments/20220604/f4475c9e/attachment-0001.htm>
More information about the Pkg-grass-devel
mailing list