head 1.2; access; symbols netbsd-11-0-RC5:1.2 netbsd-11-0-RC4:1.2 netbsd-11-0-RC3:1.2 netbsd-11-0-RC2:1.2 netbsd-11-0-RC1:1.2 perseant-exfatfs-base-20250801:1.2 netbsd-11:1.2.0.8 netbsd-11-base:1.2 netbsd-10-1-RELEASE:1.2.4.2 netbsd-9:1.2.0.6 netbsd-10:1.2.0.4 perseant-exfatfs-base-20240630:1.2 perseant-exfatfs:1.2.0.2 perseant-exfatfs-base:1.2; locks; strict; comment @# @; 1.2 date 2024.05.20.11.20.53; author riastradh; state Exp; branches 1.2.4.1 1.2.6.1; next 1.1; commitid uqSijp38QRPAiJaF; 1.1 date 2024.04.28.01.21.27; author riastradh; state Exp; branches; next ; commitid TT7xsEOMeEiNGQ7F; 1.2.4.1 date 2024.05.20.11.20.53; author martin; state dead; branches; next 1.2.4.2; commitid DAdadJ9gBwPRBYmF; 1.2.4.2 date 2024.08.23.18.28.09; author martin; state Exp; branches; next ; commitid DAdadJ9gBwPRBYmF; 1.2.6.1 date 2024.05.20.11.20.53; author martin; state dead; branches; next 1.2.6.2; commitid fwGsKyqA176oDYmF; 1.2.6.2 date 2024.08.23.18.32.36; author martin; state Exp; branches; next ; commitid fwGsKyqA176oDYmF; desc @@ 1.2 log @libstdc++: Don't try to fflush stdin. It doesn't work. It's undefined behaviour. On NetBSD, it will fail with EBADF, if fd 0 isn't open for write, or if fd 0 is open for write, it will write heap garbage to fd 0. If stream points to an output stream or an update stream in which the most recent operation was not input, the fflush function causes any unwritten data for that stream to be delivered to the host environment to be written to the file; otherwise, the behavior is undefined. (ISO C11 and ISO C17, Sec. 7.21.5.2 `The fflush function') PR lib/58206 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114879 @ text @# $NetBSD: t_sync_with_stdio.sh,v 1.1 2024/04/28 01:21:27 riastradh Exp $ # # Copyright (c) 2024 The NetBSD Foundation, Inc. # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions # are met: # 1. Redistributions of source code must retain the above copyright # notice, this list of conditions and the following disclaimer. # 2. Redistributions in binary form must reproduce the above copyright # notice, this list of conditions and the following disclaimer in the # documentation and/or other materials provided with the distribution. # # THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS # ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED # TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR # PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS # BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR # CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF # SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS # INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN # CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) # ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE # POSSIBILITY OF SUCH DAMAGE. # cin_nosync_head() { atf_set descr "Check cin works after std::ios::sync_with_stdio(false)" } cin_nosync_body() { echo hello >in atf_check -o inline:'6\n' "$(atf_get_srcdir)"/h_cin_nosync in atf_check -o inline:'6\n' "$(atf_get_srcdir)"/h_cin_nosync in atf_check -o inline:'6\n' "$(atf_get_srcdir)"/h_cin_nosync