From: Jan Nieuwenhuizen Date: Wed, 19 Jun 2019 09:26:37 +0000 (+0200) Subject: mescc: Mes C Library: Support GNU Awk: Do not flush std files. X-Git-Tag: v0.21~42 X-Git-Url: https://jxself.org/git/?p=mes.git;a=commitdiff_plain;h=749248ac3aff77b5d70e71449f0ccc9c852f3864;ds=sidebyside mescc: Mes C Library: Support GNU Awk: Do not flush std files. * lib/stdio/fflush.c (fflush): Do not flush std files. --- diff --git a/include/ctype.h b/include/ctype.h index d0f2c7db..01d231a0 100644 --- a/include/ctype.h +++ b/include/ctype.h @@ -1,6 +1,6 @@ /* -*-comment-start: "//";comment-end:""-*- * GNU Mes --- Maxwell Equations of Software - * Copyright © 2017,2018 Jan (janneke) Nieuwenhuizen + * Copyright © 2017,2018,2019 Jan (janneke) Nieuwenhuizen * * This file is part of GNU Mes. * diff --git a/lib/stdio/fflush.c b/lib/stdio/fflush.c index 89e29bc9..09930896 100644 --- a/lib/stdio/fflush.c +++ b/lib/stdio/fflush.c @@ -1,6 +1,6 @@ /* -*-comment-start: "//";comment-end:""-*- * GNU Mes --- Maxwell Equations of Software - * Copyright © 2017,2018 Jan (janneke) Nieuwenhuizen + * Copyright © 2017,2018,2019 Jan (janneke) Nieuwenhuizen * * This file is part of GNU Mes. * @@ -25,5 +25,8 @@ int fflush (FILE * stream) { - fsync ((long) stream); + int filedes = (long) stream; + if (filedes < 3) + return 0; + return fsync (filedes); }