From 571312de5fe09764b2d469642636934f6d8cf608 Mon Sep 17 00:00:00 2001 From: Rich Felker Date: Tue, 15 Feb 2011 19:47:22 -0500 Subject: [PATCH] move stdio stuff that's not arch-specific out of bits --- arch/i386/bits/stdio.h | 17 ----------------- arch/x86_64/bits/stdio.h | 10 ---------- include/stdio.h | 10 +++++++++- 3 files changed, 9 insertions(+), 28 deletions(-) delete mode 100644 arch/i386/bits/stdio.h delete mode 100644 arch/x86_64/bits/stdio.h diff --git a/arch/i386/bits/stdio.h b/arch/i386/bits/stdio.h deleted file mode 100644 index b4611f3f..00000000 --- a/arch/i386/bits/stdio.h +++ /dev/null @@ -1,17 +0,0 @@ -#define BUFSIZ 1024 - -#define FILENAME_MAX 4095 -#define FOPEN_MAX 1000 -#define TMP_MAX 10000 - -#define L_cuserid 20 -#define L_tmpnam 20 - -#if defined(_POSIX_SOURCE) || defined(_POSIX_C_SOURCE) \ - || defined(_XOPEN_SOURCE) || defined(_GNU_SOURCE) -#define L_ctermid 20 -#endif - -#if defined(_XOPEN_SOURCE) || defined(_GNU_SOURCE) -#define P_tmpdir "/tmp" -#endif diff --git a/arch/x86_64/bits/stdio.h b/arch/x86_64/bits/stdio.h deleted file mode 100644 index 0afd8b40..00000000 --- a/arch/x86_64/bits/stdio.h +++ /dev/null @@ -1,10 +0,0 @@ -#define BUFSIZ 1024 - -#define FILENAME_MAX 4095 -#define FOPEN_MAX 1000 -#define TMP_MAX 10000 - -#define L_cuserid 20 -#define L_ctermid 20 -#define L_tmpnam 20 -#define P_tmpdir "/tmp" diff --git a/include/stdio.h b/include/stdio.h index 7441cae4..4abb1e65 100644 --- a/include/stdio.h +++ b/include/stdio.h @@ -38,7 +38,11 @@ extern "C" { #define _IOLBF 1 #define _IONBF 2 -#include +#define BUFSIZ 1024 +#define FILENAME_MAX 4095 +#define FOPEN_MAX 1000 +#define TMP_MAX 10000 +#define L_tmpnam 20 typedef union { char __opaque[16]; @@ -136,14 +140,18 @@ ssize_t getdelim(char **, size_t *, int, FILE *); ssize_t getline(char **, size_t *, FILE *); int renameat(int, const char *, int, const char *); char *ctermid(char *); +#define L_ctermid 20 #endif #if defined(_XOPEN_SOURCE) || defined(_GNU_SOURCE) +#define P_tmpdir "/tmp" char *tempnam(const char *, const char *); #endif #if defined(_GNU_SOURCE) +#define L_cuserid 20 +char *cuserid(char *); #undef off64_t #define off64_t off_t #endif -- 2.25.1