Date: Wed, 29 Jan 2020 18:35:30 +0000 (UTC) From: Kyle Evans <kevans@FreeBSD.org> To: ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org Subject: svn commit: r524564 - head/devel/elfutils/files Message-ID: <202001291835.00TIZUCP089605@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: kevans (src committer) Date: Wed Jan 29 18:35:29 2020 New Revision: 524564 URL: https://svnweb.freebsd.org/changeset/ports/524564 Log: devel/elfutils: fix future build failure w.r.t. stdio _unlocked Include <stdio.h> early so that the stdio.h function declarations come first, then redefine fputs/fwrite/fread_unlocked to the locked versions. fputc_unlocked will be a macro similar to putc_unlocked, so just hide that one behind an #ifndef since it will be provided as a macro by <stdio.h>. The other three will be using the technically-incorrect locked variants until all supported releases provide the needed functions, at which point we can switch them all at once. No PORTREVISION bump as this is just a preemptive build fix that doesn't change the output at all. QA: * portlint not ran, no change outside of a single patch * testport (-CURRENT, amd64; 12.1-RELEASE, amd64; -CURRENT+patch, amd64) PR: 243546 Reviewed by: koobs (ports) Approved by: koobs (ports), cem (maintainer) MFH: 2020Q1 (implicit, build fix) Modified: head/devel/elfutils/files/patch-lib_eu-config.h Modified: head/devel/elfutils/files/patch-lib_eu-config.h ============================================================================== --- head/devel/elfutils/files/patch-lib_eu-config.h Wed Jan 29 18:17:42 2020 (r524563) +++ head/devel/elfutils/files/patch-lib_eu-config.h Wed Jan 29 18:35:29 2020 (r524564) @@ -1,6 +1,6 @@ --- lib/eu-config.h.orig 2015-06-11 11:38:55 UTC +++ lib/eu-config.h -@@ -187,4 +187,171 @@ asm (".section predict_data, \"aw\"; .pr +@@ -187,4 +187,180 @@ asm (".section predict_data, \"aw\"; .pr #endif @@ -10,6 +10,7 @@ +#include <limits.h> +#include <stdarg.h> +#include <stdint.h> ++#include <stdio.h> +#include <stdlib.h> +#include <string.h> +#include <wchar.h> @@ -130,7 +131,15 @@ +#define bswap_32 bswap32 +#define bswap_64 bswap64 + ++/* ++ * Future versions of FreeBSD will provide proper versions of these _unlocked ++ * variants. These can and should be used instead, but won't be available ++ * until FreeBSD 11.4 and 12.2, at which point we should limit the scope of ++ * these to DragonFlyBSD. ++ */ ++#ifndef fputc_unlocked +#define fputc_unlocked putc_unlocked ++#endif +#define fputs_unlocked fputs +#define fwrite_unlocked fwrite +#define fread_unlocked fread
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202001291835.00TIZUCP089605>