diff options
author | Bruno Haible <bruno@clisp.org> | 2012-06-19 23:35:08 +0200 |
---|---|---|
committer | Bruno Haible <bruno@clisp.org> | 2012-06-19 23:35:08 +0200 |
commit | 2b14f42b44f04bce5631269ed46cd8be2413ccec (patch) | |
tree | 429bada82d83dc604d674a02cb621cb00494a3e8 /m4 | |
parent | 81c71120400c0f49c1429bf4b5d5ad89c151123a (diff) | |
download | gnulib-2b14f42b44f04bce5631269ed46cd8be2413ccec.tar.gz |
stdioext: Add support for musl libc.
* m4/fbufmode.m4 (gl_FUNC_FBUFMODE): Test whether __fbufsize exists.
* lib/fbufmode.c (fbufmode): Add conditional code for musl.
* m4/fseterr.m4: New file.
* lib/fseterr.h (fseterr): Define as an alias of __fseterr if that
function exists.
* modules/fseterr (Files): Add m4/fseterr.m4.
(configure.ac): Invoke gl_FUNC_FSETERR. Compile fseterr.c if
__fseterr does not exist.
(Makefile.am): Remove fseterr.c from lib_SOURCES.
* lib/freadable.h: Update comment.
* lib/fwritable.h: Update comment.
* lib/freading.h: Update comment.
* lib/fwriting.h: Update comment.
* m4/freadahead.m4: New file.
* lib/freadahead.h (freadahead): Define as an alias of __freadahead if
that function exists.
* modules/freadahead (Files): Add m4/freadahead.m4.
(configure.ac): Invoke gl_FUNC_FREADAHEAD. Compile freadahead.c if
__freadahead does not exist.
(Makefile.am): Remove freadahead.c from lib_SOURCES.
* m4/freadptr.m4: New file.
* lib/freadptr.h (freadptr): Define as an alias of __freadptr if that
function exists.
* modules/freadptr (Files): Add m4/freadptr.m4.
(configure.ac): Invoke gl_FUNC_FREADPTR. Compile freadptr.c if
__freadptr does not exist.
(Makefile.am): Remove freadptr.c from lib_SOURCES.
* m4/freadseek.m4: New file.
* lib/freadseek.c (freadptrinc): Use __freadptrinc if that function
exists.
* modules/freadseek (Files): Add m4/freadseek.m4.
(configure.ac): Invoke gl_FUNC_FREADSEEK.
* lib/fpurge.c (fpurge): Update comment.
Reported by and with help from Rich Felker <dalias@aerifal.cx>.
Diffstat (limited to 'm4')
-rw-r--r-- | m4/fbufmode.m4 | 4 | ||||
-rw-r--r-- | m4/freadahead.m4 | 10 | ||||
-rw-r--r-- | m4/freadptr.m4 | 10 | ||||
-rw-r--r-- | m4/freadseek.m4 | 11 | ||||
-rw-r--r-- | m4/fseterr.m4 | 10 |
5 files changed, 43 insertions, 2 deletions
diff --git a/m4/fbufmode.m4 b/m4/fbufmode.m4 index d9fbf46d21..247d393b96 100644 --- a/m4/fbufmode.m4 +++ b/m4/fbufmode.m4 @@ -1,4 +1,4 @@ -# fbufmode.m4 serial 1 +# fbufmode.m4 serial 2 dnl Copyright (C) 2007, 2009-2012 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, @@ -7,5 +7,5 @@ dnl with or without modifications, as long as this notice is preserved. AC_DEFUN([gl_FUNC_FBUFMODE], [ dnl Prerequisites of lib/fbufmode.c. - AC_CHECK_FUNCS_ONCE([__flbf]) + AC_CHECK_FUNCS_ONCE([__flbf __fbufsize]) ]) diff --git a/m4/freadahead.m4 b/m4/freadahead.m4 new file mode 100644 index 0000000000..4eb6a4bd12 --- /dev/null +++ b/m4/freadahead.m4 @@ -0,0 +1,10 @@ +# freadahead.m4 serial 1 +dnl Copyright (C) 2012 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. + +AC_DEFUN([gl_FUNC_FREADAHEAD], +[ + AC_CHECK_FUNCS_ONCE([__freadahead]) +]) diff --git a/m4/freadptr.m4 b/m4/freadptr.m4 new file mode 100644 index 0000000000..9836bef374 --- /dev/null +++ b/m4/freadptr.m4 @@ -0,0 +1,10 @@ +# freadptr.m4 serial 1 +dnl Copyright (C) 2012 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. + +AC_DEFUN([gl_FUNC_FREADPTR], +[ + AC_CHECK_FUNCS_ONCE([__freadptr]) +]) diff --git a/m4/freadseek.m4 b/m4/freadseek.m4 new file mode 100644 index 0000000000..6ab839216f --- /dev/null +++ b/m4/freadseek.m4 @@ -0,0 +1,11 @@ +# freadseek.m4 serial 1 +dnl Copyright (C) 2012 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. + +AC_DEFUN([gl_FUNC_FREADSEEK], +[ + AC_REQUIRE([AC_C_INLINE]) + AC_CHECK_FUNCS_ONCE([__freadptrinc]) +]) diff --git a/m4/fseterr.m4 b/m4/fseterr.m4 new file mode 100644 index 0000000000..3eb3197f84 --- /dev/null +++ b/m4/fseterr.m4 @@ -0,0 +1,10 @@ +# fseterr.m4 serial 1 +dnl Copyright (C) 2012 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. + +AC_DEFUN([gl_FUNC_FSETERR], +[ + AC_CHECK_FUNCS_ONCE([__fseterr]) +]) |