diff options
author | Simon Josefsson <simon@josefsson.org> | 2010-04-13 10:23:03 +0200 |
---|---|---|
committer | Simon Josefsson <simon@josefsson.org> | 2010-04-13 10:23:03 +0200 |
commit | bd50a4d730e75804744f45308c4d4dfb40db042d (patch) | |
tree | f3cbc90a765c9567a0f32bf1cfceb8c6f4918717 /build-aux | |
parent | 253f4faa23195cc599bb06feafc1dccb4ed1a6b1 (diff) | |
download | libtasn1-bd50a4d730e75804744f45308c4d4dfb40db042d.tar.gz libtasn1-bd50a4d730e75804744f45308c4d4dfb40db042d.tar.bz2 libtasn1-bd50a4d730e75804744f45308c4d4dfb40db042d.zip |
Update gnulib files, fix new syntax-check warnings, add license.
Diffstat (limited to 'build-aux')
-rw-r--r-- | build-aux/c++defs.h | 18 | ||||
-rw-r--r-- | build-aux/warn-on-use.h | 9 |
2 files changed, 26 insertions, 1 deletions
diff --git a/build-aux/c++defs.h b/build-aux/c++defs.h index 31b29c2..7d71089 100644 --- a/build-aux/c++defs.h +++ b/build-aux/c++defs.h @@ -126,6 +126,24 @@ _GL_EXTERN_C int _gl_cxxalias_dummy #endif +/* _GL_CXXALIAS_RPL_CAST_1 (func, rpl_func, rettype, parameters); + is like _GL_CXXALIAS_RPL_1 (func, rpl_func, rettype, parameters); + except that the C function rpl_func may have a slightly different + declaration. A cast is used to silence the "invalid conversion" error + that would otherwise occur. */ +#if defined __cplusplus && defined GNULIB_NAMESPACE +# define _GL_CXXALIAS_RPL_CAST_1(func,rpl_func,rettype,parameters) \ + namespace GNULIB_NAMESPACE \ + { \ + rettype (*const func) parameters = \ + reinterpret_cast<rettype(*)parameters>(::rpl_func); \ + } \ + _GL_EXTERN_C int _gl_cxxalias_dummy +#else +# define _GL_CXXALIAS_RPL_CAST_1(func,rpl_func,rettype,parameters) \ + _GL_EXTERN_C int _gl_cxxalias_dummy +#endif + /* _GL_CXXALIAS_SYS (func, rettype, parameters); declares a C++ alias called GNULIB_NAMESPACE::func that redirects to the system provided function func, if GNULIB_NAMESPACE diff --git a/build-aux/warn-on-use.h b/build-aux/warn-on-use.h index 1cd5062..171e599 100644 --- a/build-aux/warn-on-use.h +++ b/build-aux/warn-on-use.h @@ -67,7 +67,10 @@ /* A compiler attribute is available in gcc versions 4.3.0 and later. */ # define _GL_WARN_ON_USE(function, message) \ extern __typeof__ (function) function __attribute__ ((__warning__ (message))) - +# elif __GNUC__ >= 3 && GNULIB_STRICT_CHECKING +/* Verify the existence of the function. */ +# define _GL_WARN_ON_USE(function, message) \ +extern __typeof__ (function) function # else /* Unsupported. */ # define _GL_WARN_ON_USE(function, message) \ _GL_WARN_EXTERN_C int _gl_warn_on_use @@ -85,6 +88,10 @@ _GL_WARN_EXTERN_C int _gl_warn_on_use # define _GL_WARN_ON_USE_CXX(function,rettype,parameters_and_attributes,msg) \ extern rettype function parameters_and_attributes \ __attribute__ ((__warning__ (msg))) +# elif __GNUC__ >= 3 && GNULIB_STRICT_CHECKING +/* Verify the existence of the function. */ +# define _GL_WARN_ON_USE_CXX(function,rettype,parameters_and_attributes,msg) \ +extern rettype function parameters_and_attributes # else /* Unsupported. */ # define _GL_WARN_ON_USE_CXX(function,rettype,parameters_and_attributes,msg) \ _GL_WARN_EXTERN_C int _gl_warn_on_use |