discuss@mandoc.bsd.lv
 help / color / mirror / Atom feed
* Cannot compile on Arch Linux due to conflicing int types
@ 2020-04-03  3:14 Stephen Gregoratto
  2020-04-03 10:39 ` Ingo Schwarze
  0 siblings, 1 reply; 2+ messages in thread
From: Stephen Gregoratto @ 2020-04-03  3:14 UTC (permalink / raw)
  To: discuss

The ohash functions included in tag.c use the stdint.h types, but tag.c
does not include them directly. This leads to compile errors like so:

In file included from mandoc_ohash.h:20,
                 from tag.c:31:
compat_ohash.h:56:20: error: unknown type name ‘uint32_t’; did you mean ‘u_int32_t’?
   56 |      const char *, uint32_t);
      |                    ^~~~~~~~
      |                    u_int32_t
compat_ohash.h:58:14: error: unknown type name ‘uint32_t’; did you mean ‘u_int32_t’?
   58 |      size_t, uint32_t);
      |              ^~~~~~~~
      |              u_int32_t
compat_ohash.h:67:1: error: unknown type name ‘uint32_t’; did you mean ‘u_int32_t’?
   67 | uint32_t ohash_interval(const char *, const char **);
      | ^~~~~~~~
      | u_int32_t
--
 To unsubscribe send an email to discuss+unsubscribe@mandoc.bsd.lv


^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: Cannot compile on Arch Linux due to conflicing int types
  2020-04-03  3:14 Cannot compile on Arch Linux due to conflicing int types Stephen Gregoratto
@ 2020-04-03 10:39 ` Ingo Schwarze
  0 siblings, 0 replies; 2+ messages in thread
From: Ingo Schwarze @ 2020-04-03 10:39 UTC (permalink / raw)
  To: Stephen Gregoratto; +Cc: discuss

Hi Stephen,

Stephen Gregoratto wrote on Fri, Apr 03, 2020 at 02:14:37PM +1100:

> The ohash functions included in tag.c use the stdint.h types, but tag.c
> does not include them directly. This leads to compile errors like so:

thank you very much for the very useful report.  It really helps
to find such glitches long before i call for release testing because
it reduces the strain on everyone having to re-test on all platforms
after last-minute fixes had to be rushed in for bugs found no earlier
than during release testing itself.  So every bug found *before*
the start of release testing really improves the situation.

Indeed, you are right, <stdint.h> is required before <ohash.h>,
both the ohash_init(3) manual page and mandoc_headers(3) say so.

Fixed with the commit appended below.

Yours,
  Ingo


Log Message:
-----------
#include <stdint.h> because that is needed before #include <ohash.h>;
fixing a build failure of mandoc-portable on Arch Linux
reported by Stephen Gregoratto <dev at sgregoratto dot me>.

Modified Files:
--------------
    mandoc:
        tag.c

Revision Data
-------------
Index: tag.c
===================================================================
RCS file: /home/cvs/mandoc/mandoc/tag.c,v
retrieving revision 1.31
retrieving revision 1.32
diff -Ltag.c -Ltag.c -u -p -r1.31 -r1.32
--- tag.c
+++ tag.c
@@ -24,6 +24,7 @@
 #include <assert.h>
 #include <limits.h>
 #include <stddef.h>
+#include <stdint.h>
 #include <stdlib.h>
 #include <string.h>
 
--
 To unsubscribe send an email to discuss+unsubscribe@mandoc.bsd.lv


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2020-04-03 10:39 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-04-03  3:14 Cannot compile on Arch Linux due to conflicing int types Stephen Gregoratto
2020-04-03 10:39 ` Ingo Schwarze

discuss@mandoc.bsd.lv

This inbox may be cloned and mirrored by anyone:

	git clone --mirror http://inbox.vuxu.org/mandoc-discuss

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V1 mandoc-discuss mandoc-discuss/ http://inbox.vuxu.org/mandoc-discuss \
		discuss@mandoc.bsd.lv
	public-inbox-index mandoc-discuss

Example config snippet for mirrors.
Newsgroup available over NNTP:
	nntp://inbox.vuxu.org/vuxu.archive.mandoc.discuss


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git