bug-gnulib
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

stdio: Fix errors in C++ mode on Android, due to getw and putw


From: Bruno Haible
Subject: stdio: Fix errors in C++ mode on Android, due to getw and putw
Date: Tue, 03 Jan 2023 19:08:50 +0100

Building a gnulib testdir on Android (with the Termux development environment)
I see these errors:

../gllib/stdio.h:1461:19: error: no member named 'getw' in the global 
namespace; did you mean 'getc'?
_GL_CXXALIAS_SYS (getw, int, (FILE *restrict stream));
~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

../gllib/stdio.h:1700:19: error: no member named 'putw' in the global namespace
_GL_CXXALIAS_SYS (putw, int, (int w, FILE *restrict stream));
~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

These two patches fix them.


2023-01-03  Bruno Haible  <bruno@clisp.org>

        stdio: Fix error in C++ mode on Android, due to putw.
        * lib/stdio.in.h (putw): Don't declare in the C++ namespace if putw is
        not declared.
        * m4/stdio_h.m4 (gl_STDIO_H): Test whether putw is declared.
        (gl_STDIO_H_DEFAULTS): Initialize HAVE_DECL_PUTW.
        * modules/stdio (Makefile.am): Substitute HAVE_DECL_PUTW.
        * doc/glibc-functions/putw.texi: Update regarding Android.

2023-01-03  Bruno Haible  <bruno@clisp.org>

        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.

Attachment: 0001-stdio-Fix-error-in-C-mode-on-Android-due-to-getw.patch
Description: Text Data

Attachment: 0002-stdio-Fix-error-in-C-mode-on-Android-due-to-putw.patch
Description: Text Data


reply via email to

[Prev in Thread] Current Thread [Next in Thread]