<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
</head>
<body>
<p>Javier,</p>
<p>could you rename GDAL_HAVE_XLOCALE_H to HAVE_XLOCALE_H, at the
minimum in the places where it is used in
<a class="moz-txt-link-freetext" href="https://github.com/OSGeo/gdal/commit/d83a9f58acb">https://github.com/OSGeo/gdal/commit/d83a9f58acb</a> and
<a class="moz-txt-link-freetext" href="https://github.com/OSGeo/gdal/commit/ab9386760f60e6a312d8418737b5fd94dd7adccb">https://github.com/OSGeo/gdal/commit/ab9386760f60e6a312d8418737b5fd94dd7adccb</a>.
(I don't think it must be used elsewhere)</p>
<p>As far as I remember the reason for the GDAL_ prefix was to avoid
"contamination" for other software that use cpl_config.h, but
since then I've restructured that file so that most of it is only
defined when building GDAL, and not when including GDAL, so that
GDAL_ prefix is no longer useful</p>
<p>Even<br>
</p>
<div class="moz-cite-prefix">Le 06/04/2022 à 18:38, Javier Jimenez
Shaw a écrit :<br>
</div>
<blockquote type="cite"
cite="mid:CADRrdKtJE_a2JOFgzPHGMb9Mho7KuOLfCFpjtdj66LmUXui-uA@mail.gmail.com">
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
<div dir="ltr">
<div>Hi</div>
<div><br>
</div>
<div>I have seen these two macros defined in the code, and maybe
there is a conflict.</div>
<div><br>
</div>
<div>in "cmake/template/<a href="http://cpl_config.h.in"
moz-do-not-send="true">cpl_config.h.in</a>" it says<br>
</div>
<div><span style="font-family:monospace">/* Define to 1 if you
have the <xlocale.h> header file. */<br>
#cmakedefine GDAL_HAVE_XLOCALE_H 1</span></div>
<div><br>
</div>
<div>and "cmake/helpers/configure.cmake"</div>
<span style="font-family:monospace">check_include_file("xlocale.h"
GDAL_HAVE_XLOCALE_H)</span>
<div><br>
</div>
<div>but in "ogr/ogrsf_frmts/geojson/libjson/json_tokener.c"
says</div>
<div><span style="font-family:monospace">#ifdef HAVE_XLOCALE_H<br>
#include <xlocale.h><br>
#endif</span></div>
<div><br>
</div>
<div>(that is failing in my M1 compilation)</div>
<div><br>
</div>
<div>Should it be <br>
</div>
<div><span style="font-family:monospace">#if
defined(HAVE_XLOCALE_H) || defined(GDAL_HAVE_XLOCALE_H)</span></div>
<div>or directly</div>
<div><span style="font-family:monospace">#ifdef
GDAL_HAVE_XLOCALE_H</span></div>
<div><span style="font-family:monospace"></span></div>
<div>or something else?</div>
<div><br>
</div>
<div>I can do such a PR.</div>
<div><br>
</div>
<div>BTW, there are multiple "<span
style="font-family:monospace">HAVE_*</span>" macros, why is
this one "<span style="font-family:monospace">GDAL_HAVE_*</span>"?<br>
</div>
<div><br>
</div>
<div>Thanks.<br>
</div>
<div>
<div>
<div dir="ltr" class="gmail_signature"
data-smartmail="gmail_signature">.___ ._ ..._ .. . ._.
.___ .. __ . _. . __.. ... .... ._ .__<br>
Entre dos pensamientos racionales <br>
hay infinitos pensamientos irracionales.<br>
<br>
</div>
</div>
</div>
</div>
<br>
<fieldset class="moz-mime-attachment-header"></fieldset>
<pre class="moz-quote-pre" wrap="">_______________________________________________
gdal-dev mailing list
<a class="moz-txt-link-abbreviated" href="mailto:gdal-dev@lists.osgeo.org">gdal-dev@lists.osgeo.org</a>
<a class="moz-txt-link-freetext" href="https://lists.osgeo.org/mailman/listinfo/gdal-dev">https://lists.osgeo.org/mailman/listinfo/gdal-dev</a>
</pre>
</blockquote>
<pre class="moz-signature" cols="72">--
<a class="moz-txt-link-freetext" href="http://www.spatialys.com">http://www.spatialys.com</a>
My software is free, but my time generally not.</pre>
</body>
</html>