Users should notice no difference with this change,
but this makes the code less coupled to affects of
closed standard streams as flagged by the
sc_require_stdio_safer syntax check.

* src/basenc.c: Include stdio--.h.
* src/cut.c: Likewise.
* src/expand-common.c: Likewise.
* src/fmt.c: Likewise.
* src/fold.c: Likewise.
* src/nl.c: Likewise.
* src/od.c: Likewise.
* src/pinky.c: Likewise.
---
 src/basenc.c        | 2 +-
 src/cut.c           | 2 +-
 src/expand-common.c | 2 +-
 src/fmt.c           | 2 +-
 src/fold.c          | 2 +-
 src/nl.c            | 2 +-
 src/od.c            | 2 +-
 src/pinky.c         | 2 +-
 8 files changed, 8 insertions(+), 8 deletions(-)

diff --git a/src/basenc.c b/src/basenc.c
index cafd04e32..61a482384 100644
--- a/src/basenc.c
+++ b/src/basenc.c
@@ -18,7 +18,6 @@
 
 #include <config.h>
 
-#include <stdio.h>
 #include <getopt.h>
 #include <sys/types.h>
 #include <gmp.h>
@@ -28,6 +27,7 @@
 #include "c-ctype.h"
 #include "fadvise.h"
 #include "quote.h"
+#include "stdio--.h"
 #include "xstrtol.h"
 #include "xbinary-io.h"
 
diff --git a/src/cut.c b/src/cut.c
index b438f661f..b924c0a01 100644
--- a/src/cut.c
+++ b/src/cut.c
@@ -24,7 +24,6 @@
 
 #include <config.h>
 
-#include <stdio.h>
 #include <getopt.h>
 #include <sys/types.h>
 #include "system.h"
@@ -38,6 +37,7 @@
 #include "memchr2.h"
 
 #include "set-fields.h"
+#include "stdio--.h"
 #include "utf8.h"
 
 /* The official name of this program (e.g., no 'g' prefix).  */
diff --git a/src/expand-common.c b/src/expand-common.c
index f63e6d80b..0cf84678b 100644
--- a/src/expand-common.c
+++ b/src/expand-common.c
@@ -16,12 +16,12 @@
 
 #include <config.h>
 
-#include <stdio.h>
 #include <sys/types.h>
 #include "system.h"
 #include "c-ctype.h"
 #include "fadvise.h"
 #include "quote.h"
+#include "stdio--.h"
 
 #include "expand-common.h"
 
diff --git a/src/fmt.c b/src/fmt.c
index 1492e4e16..e77cb7da4 100644
--- a/src/fmt.c
+++ b/src/fmt.c
@@ -17,7 +17,6 @@
 /* Written by Ross Paterson <[email protected]>.  */
 
 #include <config.h>
-#include <stdio.h>
 #include <sys/types.h>
 #include <getopt.h>
 
@@ -28,6 +27,7 @@
 #include "c-ctype.h"
 #include "system.h"
 #include "fadvise.h"
+#include "stdio--.h"
 #include "xdectoint.h"
 
 /* The official name of this program (e.g., no 'g' prefix).  */
diff --git a/src/fold.c b/src/fold.c
index 1ce2700dc..a2206c810 100644
--- a/src/fold.c
+++ b/src/fold.c
@@ -18,7 +18,6 @@
 
 #include <config.h>
 
-#include <stdio.h>
 #include <getopt.h>
 #include <sys/types.h>
 
@@ -27,6 +26,7 @@
 #include "ioblksize.h"
 #include "mcel.h"
 #include "mbbuf.h"
+#include "stdio--.h"
 #include "xdectoint.h"
 
 #define TAB_WIDTH 8
diff --git a/src/nl.c b/src/nl.c
index 826ca4e48..741121a70 100644
--- a/src/nl.c
+++ b/src/nl.c
@@ -19,7 +19,6 @@
 
 #include <config.h>
 
-#include <stdio.h>
 #include <sys/types.h>
 #include <getopt.h>
 
@@ -31,6 +30,7 @@
 #include "linebuffer.h"
 #include "mcel.h"
 #include "quote.h"
+#include "stdio--.h"
 #include "xdectoint.h"
 
 /* The official name of this program (e.g., no 'g' prefix).  */
diff --git a/src/od.c b/src/od.c
index bdeaa0bd1..ec48b182b 100644
--- a/src/od.c
+++ b/src/od.c
@@ -20,7 +20,6 @@
 
 #include <endian.h>
 #include <float.h>
-#include <stdio.h>
 #include <getopt.h>
 #include <sys/types.h>
 #include "system.h"
@@ -30,6 +29,7 @@
 #include "ftoastr.h"
 #include "quote.h"
 #include "stat-size.h"
+#include "stdio--.h"
 #include "xbinary-io.h"
 #include "xprintf.h"
 #include "xstrtol.h"
diff --git a/src/pinky.c b/src/pinky.c
index d336c51c7..8c87e6008 100644
--- a/src/pinky.c
+++ b/src/pinky.c
@@ -19,7 +19,6 @@
 #include <config.h>
 #include <getopt.h>
 #include <pwd.h>
-#include <stdio.h>
 
 #include <sys/types.h>
 #include "system.h"
@@ -31,6 +30,7 @@
 #include "hard-locale.h"
 #include "ioblksize.h"
 #include "readutmp.h"
+#include "stdio--.h"
 
 /* The official name of this program (e.g., no 'g' prefix).  */
 #define PROGRAM_NAME "pinky"
-- 
2.56.0


Reply via email to