annotate m4/getdelim.m4 @ 10366:d41011f37051

use unlocked I/O in getdelim 2008-08-27 Paolo Bonzini <bonzini@gnu.org> * lib/getdelim.c (flockfile, funlockfile): Make all of them dummy if one is not available. Do not touch them if USE_UNLOCKED_IO, instead letting unlocked-io.h do that. (getc_maybe_unlocked): New. * m4/getdelim.m4 (gl_PREREQ_GETDELIM): Check for getc_unlocked.
author Paolo Bonzini <bonzini@gnu.org>
date Wed, 27 Aug 2008 14:44:58 +0200
parents 740cd2f7aaa1
children a71cc51b7098
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
9511
740cd2f7aaa1 Let these macros work also with autoconf-2.59.
Jim Meyering <meyering@redhat.com>
parents: 9209
diff changeset
1 # getdelim.m4 serial 5
6011
cf3d0bf4fc6f 2005-08-02 Simon Josefsson <jas@extundo.com>
Simon Josefsson <simon@josefsson.org>
parents:
diff changeset
2
9161
c5cedfcd0db0 Move getline and getdelim into stdio.h, per POSIX 200x.
Eric Blake <ebb9@byu.net>
parents: 7180
diff changeset
3 dnl Copyright (C) 2005, 2006, 2007 Free Software dnl Foundation, Inc.
6011
cf3d0bf4fc6f 2005-08-02 Simon Josefsson <jas@extundo.com>
Simon Josefsson <simon@josefsson.org>
parents:
diff changeset
4 dnl
cf3d0bf4fc6f 2005-08-02 Simon Josefsson <jas@extundo.com>
Simon Josefsson <simon@josefsson.org>
parents:
diff changeset
5 dnl This file is free software; the Free Software Foundation
cf3d0bf4fc6f 2005-08-02 Simon Josefsson <jas@extundo.com>
Simon Josefsson <simon@josefsson.org>
parents:
diff changeset
6 dnl gives unlimited permission to copy and/or distribute it,
cf3d0bf4fc6f 2005-08-02 Simon Josefsson <jas@extundo.com>
Simon Josefsson <simon@josefsson.org>
parents:
diff changeset
7 dnl with or without modifications, as long as this notice is preserved.
cf3d0bf4fc6f 2005-08-02 Simon Josefsson <jas@extundo.com>
Simon Josefsson <simon@josefsson.org>
parents:
diff changeset
8
9511
740cd2f7aaa1 Let these macros work also with autoconf-2.59.
Jim Meyering <meyering@redhat.com>
parents: 9209
diff changeset
9 AC_PREREQ([2.59])
6011
cf3d0bf4fc6f 2005-08-02 Simon Josefsson <jas@extundo.com>
Simon Josefsson <simon@josefsson.org>
parents:
diff changeset
10
cf3d0bf4fc6f 2005-08-02 Simon Josefsson <jas@extundo.com>
Simon Josefsson <simon@josefsson.org>
parents:
diff changeset
11 AC_DEFUN([gl_FUNC_GETDELIM],
cf3d0bf4fc6f 2005-08-02 Simon Josefsson <jas@extundo.com>
Simon Josefsson <simon@josefsson.org>
parents:
diff changeset
12 [
9161
c5cedfcd0db0 Move getline and getdelim into stdio.h, per POSIX 200x.
Eric Blake <ebb9@byu.net>
parents: 7180
diff changeset
13 AC_REQUIRE([gl_STDIO_H_DEFAULTS])
6011
cf3d0bf4fc6f 2005-08-02 Simon Josefsson <jas@extundo.com>
Simon Josefsson <simon@josefsson.org>
parents:
diff changeset
14
cf3d0bf4fc6f 2005-08-02 Simon Josefsson <jas@extundo.com>
Simon Josefsson <simon@josefsson.org>
parents:
diff changeset
15 dnl Persuade glibc <stdio.h> to declare getdelim().
9209
5a0294ce5372 Track CVS Autoconf on AC_USE_SYSTEM_EXTENSIONS.
Eric Blake <ebb9@byu.net>
parents: 9164
diff changeset
16 AC_REQUIRE([AC_USE_SYSTEM_EXTENSIONS])
6011
cf3d0bf4fc6f 2005-08-02 Simon Josefsson <jas@extundo.com>
Simon Josefsson <simon@josefsson.org>
parents:
diff changeset
17
9164
e945561759a5 Getline touchups.
Eric Blake <ebb9@byu.net>
parents: 9161
diff changeset
18 AC_REPLACE_FUNCS([getdelim])
e945561759a5 Getline touchups.
Eric Blake <ebb9@byu.net>
parents: 9161
diff changeset
19 AC_CHECK_DECLS_ONCE([getdelim])
6011
cf3d0bf4fc6f 2005-08-02 Simon Josefsson <jas@extundo.com>
Simon Josefsson <simon@josefsson.org>
parents:
diff changeset
20
cf3d0bf4fc6f 2005-08-02 Simon Josefsson <jas@extundo.com>
Simon Josefsson <simon@josefsson.org>
parents:
diff changeset
21 if test $ac_cv_func_getdelim = no; then
cf3d0bf4fc6f 2005-08-02 Simon Josefsson <jas@extundo.com>
Simon Josefsson <simon@josefsson.org>
parents:
diff changeset
22 gl_PREREQ_GETDELIM
9164
e945561759a5 Getline touchups.
Eric Blake <ebb9@byu.net>
parents: 9161
diff changeset
23 fi
e945561759a5 Getline touchups.
Eric Blake <ebb9@byu.net>
parents: 9161
diff changeset
24
e945561759a5 Getline touchups.
Eric Blake <ebb9@byu.net>
parents: 9161
diff changeset
25 if test $ac_cv_have_decl_getdelim = no; then
9161
c5cedfcd0db0 Move getline and getdelim into stdio.h, per POSIX 200x.
Eric Blake <ebb9@byu.net>
parents: 7180
diff changeset
26 HAVE_DECL_GETDELIM=0
6011
cf3d0bf4fc6f 2005-08-02 Simon Josefsson <jas@extundo.com>
Simon Josefsson <simon@josefsson.org>
parents:
diff changeset
27 fi
cf3d0bf4fc6f 2005-08-02 Simon Josefsson <jas@extundo.com>
Simon Josefsson <simon@josefsson.org>
parents:
diff changeset
28 ])
cf3d0bf4fc6f 2005-08-02 Simon Josefsson <jas@extundo.com>
Simon Josefsson <simon@josefsson.org>
parents:
diff changeset
29
cf3d0bf4fc6f 2005-08-02 Simon Josefsson <jas@extundo.com>
Simon Josefsson <simon@josefsson.org>
parents:
diff changeset
30 # Prerequisites of lib/getdelim.c.
cf3d0bf4fc6f 2005-08-02 Simon Josefsson <jas@extundo.com>
Simon Josefsson <simon@josefsson.org>
parents:
diff changeset
31 AC_DEFUN([gl_PREREQ_GETDELIM],
cf3d0bf4fc6f 2005-08-02 Simon Josefsson <jas@extundo.com>
Simon Josefsson <simon@josefsson.org>
parents:
diff changeset
32 [
cf3d0bf4fc6f 2005-08-02 Simon Josefsson <jas@extundo.com>
Simon Josefsson <simon@josefsson.org>
parents:
diff changeset
33 AC_CHECK_FUNCS([flockfile funlockfile])
10366
d41011f37051 use unlocked I/O in getdelim
Paolo Bonzini <bonzini@gnu.org>
parents: 9511
diff changeset
34 AC_CHECK_DECLS([getc_unlocked])
6011
cf3d0bf4fc6f 2005-08-02 Simon Josefsson <jas@extundo.com>
Simon Josefsson <simon@josefsson.org>
parents:
diff changeset
35 ])