diff options
author | Bruno Haible <bruno@clisp.org> | 2023-01-03 17:11:19 +0100 |
---|---|---|
committer | Bruno Haible <bruno@clisp.org> | 2023-01-03 19:09:18 +0100 |
commit | 7f15a26e19a0ad666a7c8b818e07a6ded7793358 (patch) | |
tree | 9b6e4e30fb139b631891492335fd1af476cf719b /m4/stdio_h.m4 | |
parent | 25147f9df83e0b12339c112d72ab228fedc7301a (diff) | |
download | gnulib-7f15a26e19a0ad666a7c8b818e07a6ded7793358.tar.gz |
stdio: Fix error in C++ mode on Android, due to getw.
* lib/stdio.in.h (getw): Don't declare in the C++ namespace if getw is
not declared.
* m4/stdio_h.m4 (gl_STDIO_H): Test whether getw is declared.
(gl_STDIO_H_DEFAULTS): Initialize HAVE_DECL_GETW.
* modules/stdio (Makefile.am): Substitute HAVE_DECL_GETW.
Diffstat (limited to 'm4/stdio_h.m4')
-rw-r--r-- | m4/stdio_h.m4 | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/m4/stdio_h.m4 b/m4/stdio_h.m4 index 94271e11e7..421f594cfe 100644 --- a/m4/stdio_h.m4 +++ b/m4/stdio_h.m4 @@ -1,4 +1,4 @@ -# stdio_h.m4 serial 59 +# stdio_h.m4 serial 60 dnl Copyright (C) 2007-2023 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, @@ -82,6 +82,11 @@ AC_DEFUN_ONCE([gl_STDIO_H], if test $ac_cv_have_decl_fcloseall = no; then HAVE_DECL_FCLOSEALL=0 fi + + AC_CHECK_DECLS_ONCE([getw]) + if test $ac_cv_have_decl_getw = no; then + HAVE_DECL_GETW=0 + fi ]) # gl_STDIO_MODULE_INDICATOR([modulename]) @@ -178,6 +183,7 @@ AC_DEFUN([gl_STDIO_H_DEFAULTS], HAVE_DECL_FTELLO=1; AC_SUBST([HAVE_DECL_FTELLO]) HAVE_DECL_GETDELIM=1; AC_SUBST([HAVE_DECL_GETDELIM]) HAVE_DECL_GETLINE=1; AC_SUBST([HAVE_DECL_GETLINE]) + HAVE_DECL_GETW=1; AC_SUBST([HAVE_DECL_GETW]) HAVE_DECL_OBSTACK_PRINTF=1; AC_SUBST([HAVE_DECL_OBSTACK_PRINTF]) HAVE_DECL_SNPRINTF=1; AC_SUBST([HAVE_DECL_SNPRINTF]) HAVE_DECL_VSNPRINTF=1; AC_SUBST([HAVE_DECL_VSNPRINTF]) |