Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 30 Jan 2020 04:07:45 +0000 (UTC)
From:      Kyle Evans <kevans@FreeBSD.org>
To:        ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-branches@freebsd.org
Subject:   svn commit: r524625 - branches/2020Q1/devel/elfutils/files
Message-ID:  <202001300407.00U47jqC037177@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: kevans (src committer)
Date: Thu Jan 30 04:07:45 2020
New Revision: 524625
URL: https://svnweb.freebsd.org/changeset/ports/524625

Log:
  MFH: r524564
  
  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)
  
  Approved by:	koobs (ports), cem (maintainer)
  
  Approved by:	ports-secteam (implicit; build fix)

Modified:
  branches/2020Q1/devel/elfutils/files/patch-lib_eu-config.h
Directory Properties:
  branches/2020Q1/   (props changed)

Modified: branches/2020Q1/devel/elfutils/files/patch-lib_eu-config.h
==============================================================================
--- branches/2020Q1/devel/elfutils/files/patch-lib_eu-config.h	Thu Jan 30 03:49:12 2020	(r524624)
+++ branches/2020Q1/devel/elfutils/files/patch-lib_eu-config.h	Thu Jan 30 04:07:45 2020	(r524625)
@@ -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?202001300407.00U47jqC037177>