diff options
author | Bruno Haible <bruno@clisp.org> | 2023-01-22 11:42:32 +0100 |
---|---|---|
committer | Bruno Haible <bruno@clisp.org> | 2023-01-22 15:56:22 +0100 |
commit | afcb36b3c4bca6e8c3fafa8103841f03772e87a5 (patch) | |
tree | 366d9f8bf9d418ea7a05d60552bdbaff3ee3f668 /lib/inttypes.in.h | |
parent | cb4b0191ce484321121bd5701d271f9d1832958c (diff) | |
download | gnulib-afcb36b3c4bca6e8c3fafa8103841f03772e87a5.tar.gz |
Resolve conflicts for functions introduced in Android API level 19.
* lib/inttypes.in.h (imaxabs): Consider REPLACE_IMAXABS. Disable
_GL_CXXALIASWARN invocation on non-glibc systems.
(imaxdiv): Consider REPLACE_IMAXDIV. Disable _GL_CXXALIASWARN invocation
on non-glibc systems.
* m4/inttypes.m4 (gl_INTTYPES_H_DEFAULTS): Initialize HAVE_IMAXABS,
HAVE_IMAXDIV, REPLACE_IMAXABS, REPLACE_IMAXDIV.
* modules/inttypes-incomplete (Makefile.am): Substitute REPLACE_IMAXABS,
REPLACE_IMAXDIV.
* m4/imaxabs.m4 (gl_FUNC_IMAXABS): Conditionally set HAVE_IMAXABS,
REPLACE_IMAXABS.
* modules/imaxabs (configure.ac): Consider HAVE_IMAXABS, REPLACE_IMAXABS.
* m4/imaxdiv.m4 (gl_FUNC_IMAXDIV): Conditionally set HAVE_IMAXDIV,
REPLACE_IMAXDIV.
* modules/imaxdiv (configure.ac): Consider HAVE_IMAXDIV, REPLACE_IMAXDIV.
Diffstat (limited to 'lib/inttypes.in.h')
-rw-r--r-- | lib/inttypes.in.h | 34 |
1 files changed, 30 insertions, 4 deletions
diff --git a/lib/inttypes.in.h b/lib/inttypes.in.h index 50a2bbfcda..5b7ef12dc7 100644 --- a/lib/inttypes.in.h +++ b/lib/inttypes.in.h @@ -903,8 +903,21 @@ extern "C" { #endif #if @GNULIB_IMAXABS@ -# if !@HAVE_DECL_IMAXABS@ -extern intmax_t imaxabs (intmax_t); +# if @REPLACE_IMAXABS@ +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef imaxabs +# define imaxabs rpl_imaxabs +# endif +_GL_FUNCDECL_RPL (imaxabs, intmax_t, (intmax_t x)); +_GL_CXXALIAS_RPL (imaxabs, intmax_t, (intmax_t x)); +# else +# if !@HAVE_DECL_IMAXABS@ +_GL_FUNCDECL_SYS (imaxabs, intmax_t, (intmax_t x)); +# endif +_GL_CXXALIAS_SYS (imaxabs, intmax_t, (intmax_t x)); +# endif +# if __GLIBC__ >= 2 +_GL_CXXALIASWARN (imaxabs); # endif #elif defined GNULIB_POSIXCHECK # undef imaxabs @@ -921,8 +934,21 @@ typedef struct { intmax_t quot; intmax_t rem; } imaxdiv_t; # define GNULIB_defined_imaxdiv_t 1 # endif # endif -# if !@HAVE_DECL_IMAXDIV@ -extern imaxdiv_t imaxdiv (intmax_t, intmax_t); +# if @REPLACE_IMAXDIV@ +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef imaxdiv +# define imaxdiv rpl_imaxdiv +# endif +_GL_FUNCDECL_RPL (imaxdiv, imaxdiv_t, (intmax_t numer, intmax_t denom)); +_GL_CXXALIAS_RPL (imaxdiv, imaxdiv_t, (intmax_t numer, intmax_t denom)); +# else +# if !@HAVE_DECL_IMAXDIV@ +_GL_FUNCDECL_SYS (imaxdiv, imaxdiv_t, (intmax_t numer, intmax_t denom)); +# endif +_GL_CXXALIAS_SYS (imaxdiv, imaxdiv_t, (intmax_t numer, intmax_t denom)); +# endif +# if __GLIBC__ >= 2 +_GL_CXXALIASWARN (imaxdiv); # endif #elif defined GNULIB_POSIXCHECK # undef imaxdiv |