From owner-svn-src-all@freebsd.org Sun Feb 2 19:45:13 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 7B5C8237D9C; Sun, 2 Feb 2020 19:45:13 +0000 (UTC) (envelope-from kevans@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 489hJ91NyCz4Z22; Sun, 2 Feb 2020 19:45:13 +0000 (UTC) (envelope-from kevans@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 26D671CEB2; Sun, 2 Feb 2020 19:45:13 +0000 (UTC) (envelope-from kevans@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 012JjDYh009387; Sun, 2 Feb 2020 19:45:13 GMT (envelope-from kevans@FreeBSD.org) Received: (from kevans@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 012JjC3W009385; Sun, 2 Feb 2020 19:45:12 GMT (envelope-from kevans@FreeBSD.org) Message-Id: <202002021945.012JjC3W009385@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kevans set sender to kevans@FreeBSD.org using -f From: Kyle Evans Date: Sun, 2 Feb 2020 19:45:12 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r357419 - in head: include lib/libc/stdio X-SVN-Group: head X-SVN-Commit-Author: kevans X-SVN-Commit-Paths: in head: include lib/libc/stdio X-SVN-Commit-Revision: 357419 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 02 Feb 2020 19:45:13 -0000 Author: kevans Date: Sun Feb 2 19:45:12 2020 New Revision: 357419 URL: https://svnweb.freebsd.org/changeset/base/357419 Log: libc: provide fputc_unlocked Among the same justification as the other stdio _unlocked; in addition to an inline version in , we must provide a function in libc as well for the functionality. This fixes the lang/gcc* builds, which want to use the symbol from libc. PR: 243810 Reported by: antoine, swills, Michael X-MFC-With: r357284 Modified: head/include/stdio.h head/lib/libc/stdio/Symbol.map head/lib/libc/stdio/fputc.c Modified: head/include/stdio.h ============================================================================== --- head/include/stdio.h Sun Feb 2 19:16:52 2020 (r357418) +++ head/include/stdio.h Sun Feb 2 19:45:12 2020 (r357419) @@ -348,6 +348,7 @@ int feof_unlocked(FILE *); int ferror_unlocked(FILE *); int fflush_unlocked(FILE *); int fileno_unlocked(FILE *); +int fputc_unlocked(int, FILE *); int fputs_unlocked(const char * __restrict, FILE * __restrict); size_t fread_unlocked(void * __restrict, size_t, size_t, FILE * __restrict); size_t fwrite_unlocked(const void * __restrict, size_t, size_t, Modified: head/lib/libc/stdio/Symbol.map ============================================================================== --- head/lib/libc/stdio/Symbol.map Sun Feb 2 19:16:52 2020 (r357418) +++ head/lib/libc/stdio/Symbol.map Sun Feb 2 19:45:12 2020 (r357419) @@ -173,6 +173,7 @@ FBSD_1.5 { FBSD_1.6 { fflush_unlocked; + fputc_unlocked; fputs_unlocked; fread_unlocked; fwrite_unlocked; Modified: head/lib/libc/stdio/fputc.c ============================================================================== --- head/lib/libc/stdio/fputc.c Sun Feb 2 19:16:52 2020 (r357418) +++ head/lib/libc/stdio/fputc.c Sun Feb 2 19:45:12 2020 (r357419) @@ -47,13 +47,21 @@ __FBSDID("$FreeBSD$"); #undef fputc_unlocked int +fputc_unlocked(int c, FILE *fp) +{ + + /* Orientation set by __sputc() when buffer is full. */ + /* ORIENT(fp, -1); */ + return (__sputc(c, fp)); +} + +int fputc(int c, FILE *fp) { int retval; + FLOCKFILE_CANCELSAFE(fp); - /* Orientation set by __sputc() when buffer is full. */ - /* ORIENT(fp, -1); */ - retval = __sputc(c, fp); + retval = fputc_unlocked(c, fp); FUNLOCKFILE_CANCELSAFE(); return (retval); }