git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [PATCH] Makefile: enable DEVELOPER by default

From
Jonathan Nieder <jrnieder@gmail.com>
Date
Aug 5, 2018, 03:17 UTC
Message-ID
<20180805031709.GF258270@aiede.svl.corp.google.com>
In-Reply-To
<CAPig+cRA87UZsynme-by+s2ZmQW2Aus9KQscCU9mXmALCBKkKQ@mail.gmail.com>
Eric Sunshine wrote:
Show 7 quoted lines
> And, compilation warnings are not limited to old compilers. Even my
> fully up-to-date FreeBSD 11.2 installation is not warning-free[1].
>
> [1]: For instance:
> utf8.c:486:28: warning: passing 'iconv_ibp *' (aka 'const char **') to parameter
>       of type 'char **' discards qualifiers in nested pointer types
>       [-Wincompatible-pointer-types-discards-qualifiers]
Oh, good catch!  POSIX documents iconv has having signature
	size_t iconv(iconv_t cd, char **restrict inbuf,
	       size_t *restrict inbytesleft, char **restrict outbuf,
	       size_t *restrict outbytesleft);
The Makefile explains
	# Define OLD_ICONV if your library has an old iconv(), where the second
	# (input buffer pointer) parameter is declared with type (const char **).
which is implemented as
	#if defined(OLD_ICONV) || (defined(__sun__) && !defined(_XPG6))
		typedef const char * iconv_ibp;
	#else
		typedef char * iconv_ibp;
	#endif
config.mak.uname contains
	ifeq ($(uname_S),FreeBSD)
		NEEDS_LIBICONV = YesPlease
		OLD_ICONV = YesPlease

So it looks like FreeBSD has modernized and we need to make that conditional in config.mak.uname on $(uname_R). Do you know which version of FreeBSD changed the signature? Care to write a patch?

Thanks, Jonathan

Previous: Eric SunshineNext: Eric Sunshine
Message 18 of 26 in “Makefile: enable DEVELOPER by default”
  1. Makefile: enable DEVELOPER by defaultStefan Beller, Aug 4, 2018
  2. Makefile: enable DEVELOPER by defaultStefan Beller, Aug 4, 2018
  3. Jonathan NiederAug 4, 2018
  4. Duy NguyenAug 4, 2018
  5. Junio C HamanoAug 4, 2018
  6. Ævar Arnfjörð BjarmasonAug 6, 2018
  7. Jeff KingAug 6, 2018
  8. Randall S. BeckerAug 6, 2018
  9. Jonathan NiederAug 6, 2018
  10. Jeff KingAug 6, 2018
  11. Ævar Arnfjörð BjarmasonAug 6, 2018
  12. Stefan BellerAug 6, 2018
  13. Randall S. BeckerAug 6, 2018
  14. Ævar Arnfjörð BjarmasonAug 6, 2018
  15. Randall S. BeckerAug 6, 2018
  16. Kaartic SivaraamSep 1, 2018
  17. Eric SunshineAug 5, 2018
  18. Jonathan NiederAug 5, 2018
  19. Eric SunshineAug 5, 2018
  20. Eric SunshineAug 5, 2018
  21. Jonathan NiederAug 5, 2018
  22. config.mak.uname: resolve FreeBSD iconv-related compilation warningEric Sunshine, Aug 31, 2018
  23. Ævar Arnfjörð BjarmasonAug 31, 2018
  24. Eric SunshineAug 31, 2018
  25. Jonathan NiederAug 31, 2018
  26. Eric SunshineAug 31, 2018

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.