[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [bug-gnulib] Re: should argp depend on unlocked-io?
From: |
Bruno Haible |
Subject: |
Re: [bug-gnulib] Re: should argp depend on unlocked-io? |
Date: |
Thu, 14 Jul 2005 18:34:39 +0200 |
User-agent: |
KMail/1.5 |
Paul Eggert wrote:
> The first piece defines USE_UNLOCKED_IO and AC_LIBSOURCES
> unlocked-io.h, and is useful only in non-multithreaded apps. The 2nd
> piece requires gl_USE_SYSTEM_EXTENSIONS and checks for the
> declarations of clearerr_unlocked, etc. The 1st piece depends on the
> 2nd piece. Argp depends only on the 2nd piece.
You are right. I missed that.
> We could call the 2nd piece a new module "unlocked-decls", say.
We don't even need a new module for this: just copy some of the tests
from unlocked-io.m4 to argp.m4. This is benign duplication: Where
unlocked-io.m4 reflects unlocked-io.h, argp.m4 reflects argp-namefrob.h.
This patch should do it. If both unlocked-io.m4 and argp.m4 are used by
a configure.ac, the tests will only appear once, thanks to AC_REQUIRE
and AC_CHECK_DECLS_ONCE.
Bruno
2005-07-14 Bruno Haible <address@hidden>
* argp.m4 (gl_ARGP): Remove invocation of gl_FUNC_GLIBC_UNLOCKED_IO.
Instead, test for *_unlocked function declarations directly.
*** m4/argp.m4 23 Jan 2005 08:06:57 -0000 1.5
--- m4/argp.m4 14 Jul 2005 16:31:52 -0000
***************
*** 1,5 ****
! # argp.m4 serial 4
! dnl Copyright (C) 2003, 2004 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
--- 1,5 ----
! # argp.m4 serial 5
! dnl Copyright (C) 2003-2005 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
***************
*** 7,17 ****
AC_DEFUN([gl_ARGP],
[
AC_REQUIRE([AC_C_INLINE])
- AC_REQUIRE([gl_FUNC_GLIBC_UNLOCKED_IO])
AC_REQUIRE([gl_USE_SYSTEM_EXTENSIONS])
AC_REQUIRE([gl_GETOPT_SUBSTITUTE])
AC_CHECK_DECLS([program_invocation_name, program_invocation_short_name],,,
[#include <errno.h>])
AC_CHECK_FUNCS_ONCE([flockfile funlockfile])
AC_CHECK_HEADERS_ONCE([features.h linewrap.h])
])
--- 7,21 ----
AC_DEFUN([gl_ARGP],
[
AC_REQUIRE([AC_C_INLINE])
AC_REQUIRE([gl_USE_SYSTEM_EXTENSIONS])
AC_REQUIRE([gl_GETOPT_SUBSTITUTE])
AC_CHECK_DECLS([program_invocation_name, program_invocation_short_name],,,
[#include <errno.h>])
+ AC_CHECK_DECLS_ONCE(
+ [clearerr_unlocked feof_unlocked ferror_unlocked
+ fflush_unlocked fgets_unlocked fputc_unlocked fputs_unlocked
+ fread_unlocked fwrite_unlocked getc_unlocked
+ getchar_unlocked putc_unlocked putchar_unlocked])
AC_CHECK_FUNCS_ONCE([flockfile funlockfile])
AC_CHECK_HEADERS_ONCE([features.h linewrap.h])
])