From ef05ce61b0e5354256e0096c7dc022bf09bbf1d3 Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Mon, 28 Feb 2011 15:11:11 -0800 Subject: [PATCH] stdio: simplify by moving files to printf-posix, sigpipe * m4/stdio_h.m4 (gl_STDIO_H): Do not require gl_ASM_SYMBOL_PREFIX, since this symbol is needed only if printf is replaced. * m4/printf-posix-rpl.m4 (gl_REPLACE_PRINTF): Require gl_ASM_SYMBOL_PREFIX. * modules/printf-posix (Files): Add m4/asm-underscore.m4. * modules/sigpipe (Files): Likewise. Also, add m4/stdio-write.c. (Depends-on): Add 'raise'. (configure.ac): Require gl_ASM_SYMBOL_PREFIX. * modules/stdio (Files): Remove lib/stdio-write.c, m4/asm-underscore.m4. (Depends-on): Remove 'raise'. --- ChangeLog | 13 +++++++++++++ m4/printf-posix-rpl.m4 | 3 ++- m4/stdio_h.m4 | 1 - modules/printf-posix | 1 + modules/sigpipe | 4 ++++ modules/stdio | 3 --- 6 files changed, 20 insertions(+), 5 deletions(-) diff --git a/ChangeLog b/ChangeLog index 115b6dc688..ceff3bf967 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,18 @@ 2011-02-28 Paul Eggert + stdio: simplify by moving files to printf-posix, sigpipe + * m4/stdio_h.m4 (gl_STDIO_H): Do not require gl_ASM_SYMBOL_PREFIX, + since this symbol is needed only if printf is replaced. + * m4/printf-posix-rpl.m4 (gl_REPLACE_PRINTF): + Require gl_ASM_SYMBOL_PREFIX. + * modules/printf-posix (Files): Add m4/asm-underscore.m4. + * modules/sigpipe (Files): Likewise. Also, add m4/stdio-write.c. + (Depends-on): Add 'raise'. + (configure.ac): Require gl_ASM_SYMBOL_PREFIX. + * modules/stdio (Files): Remove lib/stdio-write.c, + m4/asm-underscore.m4. + (Depends-on): Remove 'raise'. + stdio: simplify by moving gl_STDIN_LARGE_OFFSET to fseeko, ftello * m4/fseeko.m4 (gl_STDIN_LARGE_OFFSET): Moved here, from ... * m4/stdio_h.m4 (gl_STDIN_LARGE_OFFSET): ... here, because diff --git a/m4/printf-posix-rpl.m4 b/m4/printf-posix-rpl.m4 index c57f92d1e1..b9f606d7b1 100644 --- a/m4/printf-posix-rpl.m4 +++ b/m4/printf-posix-rpl.m4 @@ -1,4 +1,4 @@ -# printf-posix-rpl.m4 serial 3 +# printf-posix-rpl.m4 serial 4 dnl Copyright (C) 2007-2011 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, @@ -15,6 +15,7 @@ AC_DEFUN([gl_FUNC_PRINTF_POSIX], AC_DEFUN([gl_REPLACE_PRINTF], [ AC_REQUIRE([gl_STDIO_H_DEFAULTS]) + AC_REQUIRE([gl_ASM_SYMBOL_PREFIX]) AC_LIBOBJ([printf]) REPLACE_PRINTF=1 AC_DEFINE([REPLACE_PRINTF_POSIX], [1], diff --git a/m4/stdio_h.m4 b/m4/stdio_h.m4 index 2d43759378..7f3ae56295 100644 --- a/m4/stdio_h.m4 +++ b/m4/stdio_h.m4 @@ -8,7 +8,6 @@ AC_DEFUN([gl_STDIO_H], [ AC_REQUIRE([gl_STDIO_H_DEFAULTS]) AC_REQUIRE([AC_C_INLINE]) - AC_REQUIRE([gl_ASM_SYMBOL_PREFIX]) gl_NEXT_HEADERS([stdio.h]) dnl No need to create extra modules for these functions. Everyone who uses dnl likely needs them. diff --git a/modules/printf-posix b/modules/printf-posix index b9884f4a22..0597ef9c6f 100644 --- a/modules/printf-posix +++ b/modules/printf-posix @@ -11,6 +11,7 @@ Files: lib/printf.c m4/printf-posix-rpl.m4 m4/printf.m4 +m4/asm-underscore.m4 Depends-on: stdio diff --git a/modules/sigpipe b/modules/sigpipe index 99e3e9e165..4f03c9e14a 100644 --- a/modules/sigpipe +++ b/modules/sigpipe @@ -8,8 +8,11 @@ have side effects on the compilation of the main modules in lib/. Files: m4/sigpipe.m4 +lib/stdio-write.c +m4/asm-underscore.m4 Depends-on: +raise signal sigprocmask stdio @@ -24,6 +27,7 @@ AC_REQUIRE([gl_SIGNAL_H_DEFAULTS]) GNULIB_SIGNAL_H_SIGPIPE=1 dnl Define the substituted variable GNULIB_STDIO_H_SIGPIPE to 1. AC_REQUIRE([gl_STDIO_H_DEFAULTS]) +AC_REQUIRE([gl_ASM_SYMBOL_PREFIX]) GNULIB_STDIO_H_SIGPIPE=1 dnl Define the substituted variable GNULIB_UNISTD_H_SIGPIPE to 1. AC_REQUIRE([gl_UNISTD_H_DEFAULTS]) diff --git a/modules/stdio b/modules/stdio index 1a45909f22..2e6c7268d5 100644 --- a/modules/stdio +++ b/modules/stdio @@ -3,15 +3,12 @@ A GNU-like . Files: lib/stdio.in.h -lib/stdio-write.c m4/stdio_h.m4 -m4/asm-underscore.m4 Depends-on: include_next arg-nonnull c++defs -raise stddef warn-on-use -- 2.30.2