Bug#998080: libglib2.0-doc: package is marked 'Arch: all' but has different contents if built on 32-bit or 64-bit host
Arnaud Ferraris
arnaud.ferraris at gmail.com
Fri Oct 29 21:53:29 BST 2021
Package: libglib2.0-doc
Version: 2.70.0-1
Severity: normal
X-Debbugs-Cc: arnaud.ferraris at gmail.com
Dear Maintainer,
While re-building glib2.0 I noticed that the generated libglib2.0-doc was
different depending on whether it was built on a 32-bit system or a 64-bit one.
This is due to the documentation quoting C code relying on different base types
('long' vs. 'int', or 'long long' vs. 'long') or macros ('GUINT64_TO_BE' vs.
'GUINT32_TO_BE') depending on the target arch's register width.
As a result, libglib2.0-doc contains erroneous information on 32-bit
architectures, and might benefit from being marked 'Arch: any'.
Attached is a diff showing the differences between a package generated on arm64
and one generated on armhf. I assume other differences would result from a
build performed on a big-endian machine but didn't had the opportunity to
verify this assumption so far.
Best regards,
Arnaud
-- System Information:
Debian Release: bookworm/sid
APT prefers testing
APT policy: (900, 'testing')
Architecture: amd64 (x86_64)
Foreign Architectures: i386
Kernel: Linux 5.14.0-2-amd64 (SMP w/64 CPU threads)
Locale: LANG=fr_FR.UTF-8, LC_CTYPE=fr_FR.UTF-8 (charmap=UTF-8), LANGUAGE not set
Shell: /bin/sh linked to /usr/bin/dash
Init: systemd (via /run/systemd/system)
LSM: AppArmor: enabled
libglib2.0-doc depends on no packages.
libglib2.0-doc recommends no packages.
Versions of packages libglib2.0-doc suggests:
ii devhelp 41.2-1
-- no debconf information
-------------- next part --------------
diff -ur arm64/usr/share/doc/libglib2.0-doc/glib/glib-Basic-Types.html armhf/usr/share/doc/libglib2.0-doc/glib/glib-Basic-Types.html
--- arm64/usr/share/doc/libglib2.0-doc/glib/glib-Basic-Types.html 2021-10-29 13:01:17.000000000 +0200
+++ armhf/usr/share/doc/libglib2.0-doc/glib/glib-Basic-Types.html 2021-10-29 13:01:17.000000000 +0200
@@ -405,7 +405,7 @@
<a name="glib-Basic-Types.functions_details"></a><h2>Functions</h2>
<div class="refsect2">
<a name="G-GINT64-CONSTANT:CAPS"></a><h3>G_GINT64_CONSTANT()</h3>
-<pre class="programlisting">#define G_GINT64_CONSTANT(val)?(val##L)
+<pre class="programlisting">#define G_GINT64_CONSTANT(val)?(G_GNUC_EXTENSION (val##LL))
</pre>
<p>This macro is used to insert 64-bit integer literals
into the source code.</p>
@@ -428,7 +428,7 @@
<hr>
<div class="refsect2">
<a name="G-GUINT64-CONSTANT:CAPS"></a><h3>G_GUINT64_CONSTANT()</h3>
-<pre class="programlisting">#define G_GUINT64_CONSTANT(val)?(val##UL)
+<pre class="programlisting">#define G_GUINT64_CONSTANT(val)?(G_GNUC_EXTENSION (val##ULL))
</pre>
<p>This macro is used to insert 64-bit unsigned integer
literals into the source code.</p>
@@ -860,7 +860,7 @@
<hr>
<div class="refsect2">
<a name="gint64"></a><h3>gint64</h3>
-<pre class="programlisting">typedef signed long gint64;
+<pre class="programlisting">G_GNUC_EXTENSION typedef signed long long gint64;
</pre>
<p>A signed integer guaranteed to be 64 bits on all platforms.
Values of this type can range from <a class="link" href="glib-Basic-Types.html#G-MININT64:CAPS" title="G_MININT64"><span class="type">G_MININT64</span></a>
@@ -886,7 +886,7 @@
<hr>
<div class="refsect2">
<a name="G-GINT64-MODIFIER:CAPS"></a><h3>G_GINT64_MODIFIER</h3>
-<pre class="programlisting">#define G_GINT64_MODIFIER "l"
+<pre class="programlisting">#define G_GINT64_MODIFIER "ll"
</pre>
<p>The platform dependent length modifier for conversion specifiers
for scanning and printing values of type <a class="link" href="glib-Basic-Types.html#gint64" title="gint64"><span class="type">gint64</span></a> or <a class="link" href="glib-Basic-Types.html#guint64" title="guint64"><span class="type">guint64</span></a>.
@@ -899,7 +899,7 @@
<hr>
<div class="refsect2">
<a name="G-GINT64-FORMAT:CAPS"></a><h3>G_GINT64_FORMAT</h3>
-<pre class="programlisting">#define G_GINT64_FORMAT "li"
+<pre class="programlisting">#define G_GINT64_FORMAT "lli"
</pre>
<p>This is the platform dependent conversion specifier for scanning
and printing values of type <a class="link" href="glib-Basic-Types.html#gint64" title="gint64"><span class="type">gint64</span></a>. See also <a class="link" href="glib-Basic-Types.html#G-GINT16-FORMAT:CAPS" title="G_GINT16_FORMAT"><span class="type">G_GINT16_FORMAT</span></a>.</p>
@@ -913,7 +913,7 @@
<hr>
<div class="refsect2">
<a name="guint64"></a><h3>guint64</h3>
-<pre class="programlisting">typedef unsigned long guint64;
+<pre class="programlisting">G_GNUC_EXTENSION typedef unsigned long long guint64;
</pre>
<p>An unsigned integer guaranteed to be 64-bits on all platforms.
Values of this type can range from 0 to <a class="link" href="glib-Basic-Types.html#G-MAXUINT64:CAPS" title="G_MAXUINT64"><span class="type">G_MAXUINT64</span></a>
@@ -931,7 +931,7 @@
<hr>
<div class="refsect2">
<a name="G-GUINT64-FORMAT:CAPS"></a><h3>G_GUINT64_FORMAT</h3>
-<pre class="programlisting">#define G_GUINT64_FORMAT "lu"
+<pre class="programlisting">#define G_GUINT64_FORMAT "llu"
</pre>
<p>This is the platform dependent conversion specifier for scanning
and printing values of type <a class="link" href="glib-Basic-Types.html#guint64" title="guint64"><span class="type">guint64</span></a>. See also <a class="link" href="glib-Basic-Types.html#G-GINT16-FORMAT:CAPS" title="G_GINT16_FORMAT"><span class="type">G_GINT16_FORMAT</span></a>.</p>
@@ -993,7 +993,7 @@
<hr>
<div class="refsect2">
<a name="gsize"></a><h3>gsize</h3>
-<pre class="programlisting">typedef unsigned long gsize;
+<pre class="programlisting">typedef unsigned int gsize;
</pre>
<p>An unsigned integer type of the result of the sizeof operator,
corresponding to the size_t type defined in C99.
@@ -1007,7 +1007,7 @@
<hr>
<div class="refsect2">
<a name="G-MAXSIZE:CAPS"></a><h3>G_MAXSIZE</h3>
-<pre class="programlisting">#define G_MAXSIZE?G_MAXULONG
+<pre class="programlisting">#define G_MAXSIZE?G_MAXUINT
</pre>
<p>The maximum value which can be held in a <a class="link" href="glib-Basic-Types.html#gsize" title="gsize"><span class="type">gsize</span></a>.</p>
<p class="since">Since: <a class="link" href="api-index-2-4.html#api-index-2.4">2.4</a></p>
@@ -1015,7 +1015,7 @@
<hr>
<div class="refsect2">
<a name="G-GSIZE-MODIFIER:CAPS"></a><h3>G_GSIZE_MODIFIER</h3>
-<pre class="programlisting">#define G_GSIZE_MODIFIER "l"
+<pre class="programlisting">#define G_GSIZE_MODIFIER ""
</pre>
<p>The platform dependent length modifier for conversion specifiers
for scanning and printing values of type <a class="link" href="glib-Basic-Types.html#gsize" title="gsize"><span class="type">gsize</span></a>. It
@@ -1025,7 +1025,7 @@
<hr>
<div class="refsect2">
<a name="G-GSIZE-FORMAT:CAPS"></a><h3>G_GSIZE_FORMAT</h3>
-<pre class="programlisting">#define G_GSIZE_FORMAT "lu"
+<pre class="programlisting">#define G_GSIZE_FORMAT "u"
</pre>
<p>This is the platform dependent conversion specifier for scanning
and printing values of type <a class="link" href="glib-Basic-Types.html#gsize" title="gsize"><span class="type">gsize</span></a>. See also <a class="link" href="glib-Basic-Types.html#G-GINT16-FORMAT:CAPS" title="G_GINT16_FORMAT"><span class="type">G_GINT16_FORMAT</span></a>.</p>
@@ -1034,7 +1034,7 @@
<hr>
<div class="refsect2">
<a name="gssize"></a><h3>gssize</h3>
-<pre class="programlisting">typedef signed long gssize;
+<pre class="programlisting">typedef signed int gssize;
</pre>
<p>A signed variant of <a class="link" href="glib-Basic-Types.html#gsize" title="gsize"><span class="type">gsize</span></a>, corresponding to the
ssize_t defined on most platforms.
@@ -1046,7 +1046,7 @@
<hr>
<div class="refsect2">
<a name="G-MINSSIZE:CAPS"></a><h3>G_MINSSIZE</h3>
-<pre class="programlisting">#define G_MINSSIZE?G_MINLONG
+<pre class="programlisting">#define G_MINSSIZE?G_MININT
</pre>
<p>The minimum value which can be held in a <a class="link" href="glib-Basic-Types.html#gssize" title="gssize"><span class="type">gssize</span></a>.</p>
<p class="since">Since: <a class="link" href="api-index-2-14.html#api-index-2.14">2.14</a></p>
@@ -1054,7 +1054,7 @@
<hr>
<div class="refsect2">
<a name="G-MAXSSIZE:CAPS"></a><h3>G_MAXSSIZE</h3>
-<pre class="programlisting">#define G_MAXSSIZE?G_MAXLONG
+<pre class="programlisting">#define G_MAXSSIZE?G_MAXINT
</pre>
<p>The maximum value which can be held in a <a class="link" href="glib-Basic-Types.html#gssize" title="gssize"><span class="type">gssize</span></a>.</p>
<p class="since">Since: <a class="link" href="api-index-2-14.html#api-index-2.14">2.14</a></p>
@@ -1062,7 +1062,7 @@
<hr>
<div class="refsect2">
<a name="G-GSSIZE-MODIFIER:CAPS"></a><h3>G_GSSIZE_MODIFIER</h3>
-<pre class="programlisting">#define G_GSSIZE_MODIFIER "l"
+<pre class="programlisting">#define G_GSSIZE_MODIFIER ""
</pre>
<p>The platform dependent length modifier for conversion specifiers
for scanning and printing values of type <a class="link" href="glib-Basic-Types.html#gssize" title="gssize"><span class="type">gssize</span></a>. It
@@ -1072,7 +1072,7 @@
<hr>
<div class="refsect2">
<a name="G-GSSIZE-FORMAT:CAPS"></a><h3>G_GSSIZE_FORMAT</h3>
-<pre class="programlisting">#define G_GSSIZE_FORMAT "li"
+<pre class="programlisting">#define G_GSSIZE_FORMAT "i"
</pre>
<p>This is the platform dependent conversion specifier for scanning
and printing values of type <a class="link" href="glib-Basic-Types.html#gssize" title="gssize"><span class="type">gssize</span></a>. See also <a class="link" href="glib-Basic-Types.html#G-GINT16-FORMAT:CAPS" title="G_GINT16_FORMAT"><span class="type">G_GINT16_FORMAT</span></a>.</p>
@@ -1129,7 +1129,7 @@
<hr>
<div class="refsect2">
<a name="gintptr"></a><h3>gintptr</h3>
-<pre class="programlisting">typedef signed long gintptr;
+<pre class="programlisting">typedef signed int gintptr;
</pre>
<p>Corresponds to the C99 type intptr_t,
a signed integer type that can hold any pointer.</p>
@@ -1140,7 +1140,7 @@
<hr>
<div class="refsect2">
<a name="G-GINTPTR-MODIFIER:CAPS"></a><h3>G_GINTPTR_MODIFIER</h3>
-<pre class="programlisting">#define G_GINTPTR_MODIFIER "l"
+<pre class="programlisting">#define G_GINTPTR_MODIFIER ""
</pre>
<p>The platform dependent length modifier for conversion specifiers
for scanning and printing values of type <a class="link" href="glib-Basic-Types.html#gintptr" title="gintptr"><span class="type">gintptr</span></a> or <a class="link" href="glib-Basic-Types.html#guintptr" title="guintptr"><span class="type">guintptr</span></a>.
@@ -1150,7 +1150,7 @@
<hr>
<div class="refsect2">
<a name="G-GINTPTR-FORMAT:CAPS"></a><h3>G_GINTPTR_FORMAT</h3>
-<pre class="programlisting">#define G_GINTPTR_FORMAT "li"
+<pre class="programlisting">#define G_GINTPTR_FORMAT "i"
</pre>
<p>This is the platform dependent conversion specifier for scanning
and printing values of type <a class="link" href="glib-Basic-Types.html#gintptr" title="gintptr"><span class="type">gintptr</span></a>.</p>
@@ -1159,7 +1159,7 @@
<hr>
<div class="refsect2">
<a name="guintptr"></a><h3>guintptr</h3>
-<pre class="programlisting">typedef unsigned long guintptr;
+<pre class="programlisting">typedef unsigned int guintptr;
</pre>
<p>Corresponds to the C99 type uintptr_t,
an unsigned integer type that can hold any pointer.</p>
@@ -1170,7 +1170,7 @@
<hr>
<div class="refsect2">
<a name="G-GUINTPTR-FORMAT:CAPS"></a><h3>G_GUINTPTR_FORMAT</h3>
-<pre class="programlisting">#define G_GUINTPTR_FORMAT "lu"
+<pre class="programlisting">#define G_GUINTPTR_FORMAT "u"
</pre>
<p>This is the platform dependent conversion specifier
for scanning and printing values of type <a class="link" href="glib-Basic-Types.html#guintptr" title="guintptr"><span class="type">guintptr</span></a>.</p>
diff -ur arm64/usr/share/doc/libglib2.0-doc/glib/glib-Byte-Order-Macros.html armhf/usr/share/doc/libglib2.0-doc/glib/glib-Byte-Order-Macros.html
--- arm64/usr/share/doc/libglib2.0-doc/glib/glib-Byte-Order-Macros.html 2021-10-29 13:01:17.000000000 +0200
+++ armhf/usr/share/doc/libglib2.0-doc/glib/glib-Byte-Order-Macros.html 2021-10-29 13:01:17.000000000 +0200
@@ -832,7 +832,7 @@
<hr>
<div class="refsect2">
<a name="GLONG-TO-BE:CAPS"></a><h3>GLONG_TO_BE()</h3>
-<pre class="programlisting">#define GLONG_TO_BE(val)?((glong) GINT64_TO_BE (val))
+<pre class="programlisting">#define GLONG_TO_BE(val)?((glong) GINT32_TO_BE (val))
</pre>
<p>Converts a <a class="link" href="glib-Basic-Types.html#glong" title="glong"><span class="type">glong</span></a> value from host byte order to big-endian.</p>
<div class="refsect3">
@@ -859,7 +859,7 @@
<hr>
<div class="refsect2">
<a name="GLONG-TO-LE:CAPS"></a><h3>GLONG_TO_LE()</h3>
-<pre class="programlisting">#define GLONG_TO_LE(val)?((glong) GINT64_TO_LE (val))
+<pre class="programlisting">#define GLONG_TO_LE(val)?((glong) GINT32_TO_LE (val))
</pre>
<p>Converts a <a class="link" href="glib-Basic-Types.html#glong" title="glong"><span class="type">glong</span></a> value from host byte order to little-endian.</p>
<div class="refsect3">
@@ -940,7 +940,7 @@
<hr>
<div class="refsect2">
<a name="GULONG-TO-BE:CAPS"></a><h3>GULONG_TO_BE()</h3>
-<pre class="programlisting">#define GULONG_TO_BE(val)?((gulong) GUINT64_TO_BE (val))
+<pre class="programlisting">#define GULONG_TO_BE(val)?((gulong) GUINT32_TO_BE (val))
</pre>
<p>Converts a <a class="link" href="glib-Basic-Types.html#gulong" title="gulong"><span class="type">gulong</span></a> value from host byte order to big-endian.</p>
<div class="refsect3">
@@ -967,7 +967,7 @@
<hr>
<div class="refsect2">
<a name="GULONG-TO-LE:CAPS"></a><h3>GULONG_TO_LE()</h3>
-<pre class="programlisting">#define GULONG_TO_LE(val)?((gulong) GUINT64_TO_LE (val))
+<pre class="programlisting">#define GULONG_TO_LE(val)?((gulong) GUINT32_TO_LE (val))
</pre>
<p>Converts a <a class="link" href="glib-Basic-Types.html#gulong" title="gulong"><span class="type">gulong</span></a> value from host byte order to little-endian.</p>
<div class="refsect3">
@@ -1048,7 +1048,7 @@
<hr>
<div class="refsect2">
<a name="GSIZE-TO-BE:CAPS"></a><h3>GSIZE_TO_BE()</h3>
-<pre class="programlisting">#define GSIZE_TO_BE(val)?((gsize) GUINT64_TO_BE (val))
+<pre class="programlisting">#define GSIZE_TO_BE(val)?((gsize) GUINT32_TO_BE (val))
</pre>
<p>Converts a <a class="link" href="glib-Basic-Types.html#gsize" title="gsize"><span class="type">gsize</span></a> value from host byte order to big-endian.</p>
<div class="refsect3">
@@ -1075,7 +1075,7 @@
<hr>
<div class="refsect2">
<a name="GSIZE-TO-LE:CAPS"></a><h3>GSIZE_TO_LE()</h3>
-<pre class="programlisting">#define GSIZE_TO_LE(val)?((gsize) GUINT64_TO_LE (val))
+<pre class="programlisting">#define GSIZE_TO_LE(val)?((gsize) GUINT32_TO_LE (val))
</pre>
<p>Converts a <a class="link" href="glib-Basic-Types.html#gsize" title="gsize"><span class="type">gsize</span></a> value from host byte order to little-endian.</p>
<div class="refsect3">
@@ -1156,7 +1156,7 @@
<hr>
<div class="refsect2">
<a name="GSSIZE-TO-BE:CAPS"></a><h3>GSSIZE_TO_BE()</h3>
-<pre class="programlisting">#define GSSIZE_TO_BE(val)?((gssize) GINT64_TO_BE (val))
+<pre class="programlisting">#define GSSIZE_TO_BE(val)?((gssize) GINT32_TO_BE (val))
</pre>
<p>Converts a <a class="link" href="glib-Basic-Types.html#gssize" title="gssize"><span class="type">gssize</span></a> value from host byte order to big-endian.</p>
<div class="refsect3">
@@ -1183,7 +1183,7 @@
<hr>
<div class="refsect2">
<a name="GSSIZE-TO-LE:CAPS"></a><h3>GSSIZE_TO_LE()</h3>
-<pre class="programlisting">#define GSSIZE_TO_LE(val)?((gssize) GINT64_TO_LE (val))
+<pre class="programlisting">#define GSSIZE_TO_LE(val)?((gssize) GINT32_TO_LE (val))
</pre>
<p>Converts a <a class="link" href="glib-Basic-Types.html#gssize" title="gssize"><span class="type">gssize</span></a> value from host byte order to little-endian.</p>
<div class="refsect3">
diff -ur arm64/usr/share/doc/libglib2.0-doc/glib/glib-Type-Conversion-Macros.html armhf/usr/share/doc/libglib2.0-doc/glib/glib-Type-Conversion-Macros.html
--- arm64/usr/share/doc/libglib2.0-doc/glib/glib-Type-Conversion-Macros.html 2021-10-29 13:01:17.000000000 +0200
+++ armhf/usr/share/doc/libglib2.0-doc/glib/glib-Type-Conversion-Macros.html 2021-10-29 13:01:17.000000000 +0200
@@ -157,7 +157,7 @@
<a name="glib-Type-Conversion-Macros.functions_details"></a><h2>Functions</h2>
<div class="refsect2">
<a name="GINT-TO-POINTER:CAPS"></a><h3>GINT_TO_POINTER()</h3>
-<pre class="programlisting">#define GINT_TO_POINTER(i)?((gpointer) (glong) (i))
+<pre class="programlisting">#define GINT_TO_POINTER(i)?((gpointer) (gint) (i))
</pre>
<p>Stuffs an integer into a pointer type.</p>
<p>Remember, you may not store pointers in integers. This is not portable
@@ -183,7 +183,7 @@
<hr>
<div class="refsect2">
<a name="GPOINTER-TO-INT:CAPS"></a><h3>GPOINTER_TO_INT()</h3>
-<pre class="programlisting">#define GPOINTER_TO_INT(p)?((gint) (glong) (p))
+<pre class="programlisting">#define GPOINTER_TO_INT(p)?((gint) (gint) (p))
</pre>
<p>Extracts an integer from a pointer. The integer must have
been stored in the pointer with <a class="link" href="glib-Type-Conversion-Macros.html#GINT-TO-POINTER:CAPS" title="GINT_TO_POINTER()"><code class="function">GINT_TO_POINTER()</code></a>.</p>
@@ -210,7 +210,7 @@
<hr>
<div class="refsect2">
<a name="GUINT-TO-POINTER:CAPS"></a><h3>GUINT_TO_POINTER()</h3>
-<pre class="programlisting">#define GUINT_TO_POINTER(u)?((gpointer) (gulong) (u))
+<pre class="programlisting">#define GUINT_TO_POINTER(u)?((gpointer) (guint) (u))
</pre>
<p>Stuffs an unsigned integer into a pointer type.</p>
<div class="refsect3">
@@ -232,7 +232,7 @@
<hr>
<div class="refsect2">
<a name="GPOINTER-TO-UINT:CAPS"></a><h3>GPOINTER_TO_UINT()</h3>
-<pre class="programlisting">#define GPOINTER_TO_UINT(p)?((guint) (gulong) (p))
+<pre class="programlisting">#define GPOINTER_TO_UINT(p)?((guint) (guint) (p))
</pre>
<p>Extracts an unsigned integer from a pointer. The integer must have
been stored in the pointer with <a class="link" href="glib-Type-Conversion-Macros.html#GUINT-TO-POINTER:CAPS" title="GUINT_TO_POINTER()"><code class="function">GUINT_TO_POINTER()</code></a>.</p>
More information about the pkg-gnome-maintainers
mailing list