diff options
Diffstat (limited to 'lib')
-rw-r--r-- | lib/Makefile.am | 8 | ||||
-rw-r--r-- | lib/stdbool.mini.h | 15 | ||||
-rw-r--r-- | lib/unistring-notinline.h | 21 | ||||
-rw-r--r-- | lib/unistring/cdefs.h | 115 | ||||
-rw-r--r-- | lib/unistring/inline.h | 21 | ||||
-rw-r--r-- | lib/unistring/version.in.h | 21 | ||||
-rw-r--r-- | lib/unistring/woe32dll.in.h | 21 | ||||
-rw-r--r-- | lib/version.c | 21 |
8 files changed, 186 insertions, 57 deletions
diff --git a/lib/Makefile.am b/lib/Makefile.am index 6136ced..382d2bc 100644 --- a/lib/Makefile.am +++ b/lib/Makefile.am @@ -1,5 +1,5 @@ ## Makefile for the lib subdirectory of GNU libunistring. -## Copyright (C) 2009-2019 Free Software Foundation, Inc. +## Copyright (C) 2009-2022 Free Software Foundation, Inc. ## ## This program is free software: you can redistribute it and/or modify ## it under the terms of the GNU General Public License as published by @@ -303,7 +303,7 @@ config.h: $(BUILT_SOURCES) $(srcdir)/libunistring.sym done; \ } 5>&1 1>&2 \ | sed -e 's,.* ,,' | grep -v '@' | LC_ALL=C sort | LC_ALL=C uniq \ - | LC_ALL=C join -v 1 - $(srcdir)/libunistring.sym \ + | LC_ALL=C $(top_srcdir)/build-aux/join-v-1 - $(srcdir)/libunistring.sym \ | grep -v '^libintl_locale' \ | grep -v 'gl_get_setlocale_null_lock' \ | sed -e 's,^\(.*\)$$,#define \1 libunistring_\1,' > config.h-t; \ @@ -336,9 +336,9 @@ AM_CPPFLAGS += -DDEPENDS_ON_LIBICONV=1 # Libtool's library version information for libunistring. # See the libtool documentation, section "Library interface versions". -LTV_CURRENT=3 +LTV_CURRENT=5 LTV_REVISION=0 -LTV_AGE=1 +LTV_AGE=0 # How to build libunistring.la. libunistring_la_LDFLAGS += \ diff --git a/lib/stdbool.mini.h b/lib/stdbool.mini.h index 29736b7..7bdec72 100644 --- a/lib/stdbool.mini.h +++ b/lib/stdbool.mini.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2001-2003, 2006-2017 Free Software Foundation, Inc. +/* Copyright (C) 2001-2003, 2006-2022 Free Software Foundation, Inc. Written by Bruno Haible <haible@clisp.cons.org>, 2001. This program is free software; you can redistribute it and/or modify @@ -96,8 +96,17 @@ /* The other macros must be usable in preprocessor directives. */ #ifdef __cplusplus -# define false false -# define true true +# if !defined _MSC_VER +# define false false +# define true true +# endif +/* In Sun C++ 5.11 (Solaris Studio 12.2) and older, 'true' as a preprocessor + expression evaluates to 0, not 1. Fix this by overriding 'true'. Note that + the replacement has to be of type 'bool'. */ +# if defined __SUNPRO_CC && true != 1 +# undef true +# define true (!false) +# endif #else # undef false # define false 0 diff --git a/lib/unistring-notinline.h b/lib/unistring-notinline.h index 1fc8be0..59ebc63 100644 --- a/lib/unistring-notinline.h +++ b/lib/unistring-notinline.h @@ -1,15 +1,24 @@ /* Override decision whether to use 'inline' or not. Copyright (C) 2009 Free Software Foundation, Inc. - This program is free software: you can redistribute it and/or modify it - under the terms of the GNU Lesser General Public License as published - by the Free Software Foundation; either version 3 of the License, or - (at your option) any later version. + This program is free software: you can redistribute it and/or + modify it under the terms of either: + * the GNU Lesser General Public License as published by the Free + Software Foundation; either version 3 of the License, or (at your + option) any later version. + + or + + * the GNU General Public License as published by the Free + Software Foundation; either version 2 of the License, or (at your + option) any later version. + + or both in parallel, as here. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Lesser General Public License for more details. + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this program. If not, see <https://www.gnu.org/licenses/>. */ diff --git a/lib/unistring/cdefs.h b/lib/unistring/cdefs.h index e186b3a..3faf5ba 100644 --- a/lib/unistring/cdefs.h +++ b/lib/unistring/cdefs.h @@ -1,15 +1,24 @@ /* Common macro definitions for C include files. - Copyright (C) 2008-2020 Free Software Foundation, Inc. + Copyright (C) 2008-2021 Free Software Foundation, Inc. - This program is free software: you can redistribute it and/or modify it - under the terms of the GNU Lesser General Public License as published - by the Free Software Foundation; either version 3 of the License, or - (at your option) any later version. + This program is free software: you can redistribute it and/or + modify it under the terms of either: + * the GNU Lesser General Public License as published by the Free + Software Foundation; either version 3 of the License, or (at your + option) any later version. + + or + + * the GNU General Public License as published by the Free + Software Foundation; either version 2 of the License, or (at your + option) any later version. + + or both in parallel, as here. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Lesser General Public License for more details. + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this program. If not, see <https://www.gnu.org/licenses/>. */ @@ -17,25 +26,91 @@ #ifndef _UNISTRING_CDEFS_H #define _UNISTRING_CDEFS_H -/* _GL_UNUSED_PARAMETER is a marker that can be appended to function parameter +/* _GL_UNUSED_PARAMETER is a marker that can be prepended to function parameter declarations for parameters that are not used. This helps to reduce warnings, such as from GCC -Wunused-parameter. The syntax is as follows: - type param _GL_UNUSED_PARAMETER + _GL_UNUSED_PARAMETER type param or more generally - param_decl _GL_UNUSED_PARAMETER + _GL_UNUSED_PARAMETER param_decl For example: - int param _GL_UNUSED_PARAMETER - int *(*param)(void) _GL_UNUSED_PARAMETER - Other possible, but obscure and discouraged syntaxes: - int _GL_UNUSED_PARAMETER *(*param)(void) - _GL_UNUSED_PARAMETER int *(*param)(void) + _GL_UNUSED_PARAMETER int param + _GL_UNUSED_PARAMETER int *(*param) (void) */ #ifndef _GL_UNUSED_PARAMETER -# if __GNUC__ >= 3 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 7) -# define _GL_UNUSED_PARAMETER __attribute__ ((__unused__)) -# else -# define _GL_UNUSED_PARAMETER -# endif +# define _GL_UNUSED_PARAMETER _UC_ATTRIBUTE_MAYBE_UNUSED +#endif +/* _GL_ATTRIBUTE_MAYBE_UNUSED likewise. */ +#ifndef _GL_ATTRIBUTE_MAYBE_UNUSED +# define _GL_ATTRIBUTE_MAYBE_UNUSED _UC_ATTRIBUTE_MAYBE_UNUSED +#endif + +#ifndef _GL_ATTRIBUTE_MALLOC +# define _GL_ATTRIBUTE_MALLOC _UC_ATTRIBUTE_MALLOC +#endif + +/* _GL_ATTRIBUTE_DEALLOC (F, I) is for functions returning pointers + that can be freed by passing them as the Ith argument to the + function F. _UC_ATTRIBUTE_DEALLOC_FREE is for functions that + return pointers that can be freed via 'free'; it can be used + only after including stdlib.h. These macros cannot be used on + inline functions. */ +#ifndef _GL_ATTRIBUTE_DEALLOC +# define _GL_ATTRIBUTE_DEALLOC _UC_ATTRIBUTE_DEALLOC +#endif +#ifndef _GL_ATTRIBUTE_DEALLOC_FREE +# define _GL_ATTRIBUTE_DEALLOC_FREE _UC_ATTRIBUTE_DEALLOC_FREE +#endif + +/* The definitions below are taken from gnulib/m4/gnulib-common.m4, + with prefix _UC instead of prefix _GL. */ + +/* True if the compiler says it groks GNU C version MAJOR.MINOR. */ +#if defined __GNUC__ && defined __GNUC_MINOR__ +# define _UC_GNUC_PREREQ(major, minor) \ + ((major) < __GNUC__ + ((minor) <= __GNUC_MINOR__)) +#else +# define _UC_GNUC_PREREQ(major, minor) 0 +#endif + +#if (defined __has_attribute \ + && (!defined __clang_minor__ \ + || 3 < __clang_major__ + (5 <= __clang_minor__))) +# define _UC_HAS_ATTRIBUTE(attr) __has_attribute (__##attr##__) +#else +# define _UC_HAS_ATTRIBUTE(attr) _UC_ATTR_##attr +# define _UC_ATTR_malloc _UC_GNUC_PREREQ (3, 0) +# define _UC_ATTR_unused _UC_GNUC_PREREQ (2, 7) +#endif + +#ifdef __has_c_attribute +# define _UC_HAS_C_ATTRIBUTE(attr) __has_c_attribute (__##attr##__) +#else +# define _UC_HAS_C_ATTRIBUTE(attr) 0 +#endif + +#if _UC_GNUC_PREREQ (11, 0) +# define _UC_ATTRIBUTE_DEALLOC(f, i) __attribute__ ((__malloc__ (f, i))) +#else +# define _UC_ATTRIBUTE_DEALLOC(f, i) +#endif +#define _UC_ATTRIBUTE_DEALLOC_FREE _UC_ATTRIBUTE_DEALLOC (free, 1) + +#if _UC_HAS_ATTRIBUTE (malloc) +# define _UC_ATTRIBUTE_MALLOC __attribute__ ((__malloc__)) +#else +# define _UC_ATTRIBUTE_MALLOC +#endif + +#if _UC_HAS_C_ATTRIBUTE (maybe_unused) +# define _UC_ATTRIBUTE_MAYBE_UNUSED [[__maybe_unused__]] +#else +# define _UC_ATTRIBUTE_MAYBE_UNUSED _UC_ATTRIBUTE_UNUSED +#endif + +#if _UC_HAS_ATTRIBUTE (unused) +# define _UC_ATTRIBUTE_UNUSED __attribute__ ((__unused__)) +#else +# define _UC_ATTRIBUTE_UNUSED #endif #endif /* _UNISTRING_CDEFS_H */ diff --git a/lib/unistring/inline.h b/lib/unistring/inline.h index a6c8985..4605fbf 100644 --- a/lib/unistring/inline.h +++ b/lib/unistring/inline.h @@ -1,15 +1,24 @@ /* Decision whether to use 'inline' or not. Copyright (C) 2006, 2009, 2018 Free Software Foundation, Inc. - This program is free software: you can redistribute it and/or modify it - under the terms of the GNU Lesser General Public License as published - by the Free Software Foundation; either version 3 of the License, or - (at your option) any later version. + This program is free software: you can redistribute it and/or + modify it under the terms of either: + * the GNU Lesser General Public License as published by the Free + Software Foundation; either version 3 of the License, or (at your + option) any later version. + + or + + * the GNU General Public License as published by the Free + Software Foundation; either version 2 of the License, or (at your + option) any later version. + + or both in parallel, as here. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Lesser General Public License for more details. + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this program. If not, see <https://www.gnu.org/licenses/>. */ diff --git a/lib/unistring/version.in.h b/lib/unistring/version.in.h index 0e588ef..d35adc6 100644 --- a/lib/unistring/version.in.h +++ b/lib/unistring/version.in.h @@ -2,15 +2,24 @@ Copyright (C) 2009-2010 Free Software Foundation, Inc. Written by Bruno Haible <bruno@clisp.org>, 2009. - This program is free software: you can redistribute it and/or modify it - under the terms of the GNU Lesser General Public License as published - by the Free Software Foundation; either version 3 of the License, or - (at your option) any later version. + This program is free software: you can redistribute it and/or + modify it under the terms of either: + * the GNU Lesser General Public License as published by the Free + Software Foundation; either version 3 of the License, or (at your + option) any later version. + + or + + * the GNU General Public License as published by the Free + Software Foundation; either version 2 of the License, or (at your + option) any later version. + + or both in parallel, as here. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Lesser General Public License for more details. + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this program. If not, see <https://www.gnu.org/licenses/>. */ diff --git a/lib/unistring/woe32dll.in.h b/lib/unistring/woe32dll.in.h index 19df687..6f5b9d8 100644 --- a/lib/unistring/woe32dll.in.h +++ b/lib/unistring/woe32dll.in.h @@ -1,15 +1,24 @@ /* Support for variables in shared libraries on Windows platforms. Copyright (C) 2009 Free Software Foundation, Inc. - This program is free software: you can redistribute it and/or modify it - under the terms of the GNU Lesser General Public License as published - by the Free Software Foundation; either version 3 of the License, or - (at your option) any later version. + This program is free software: you can redistribute it and/or + modify it under the terms of either: + * the GNU Lesser General Public License as published by the Free + Software Foundation; either version 3 of the License, or (at your + option) any later version. + + or + + * the GNU General Public License as published by the Free + Software Foundation; either version 2 of the License, or (at your + option) any later version. + + or both in parallel, as here. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Lesser General Public License for more details. + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this program. If not, see <https://www.gnu.org/licenses/>. */ diff --git a/lib/version.c b/lib/version.c index a2f2f2d..3036509 100644 --- a/lib/version.c +++ b/lib/version.c @@ -2,15 +2,24 @@ Copyright (C) 2009 Free Software Foundation, Inc. Written by Bruno Haible <bruno@clisp.org>, 2009. - This program is free software: you can redistribute it and/or modify it - under the terms of the GNU Lesser General Public License as published - by the Free Software Foundation; either version 3 of the License, or - (at your option) any later version. + This program is free software: you can redistribute it and/or + modify it under the terms of either: + * the GNU Lesser General Public License as published by the Free + Software Foundation; either version 3 of the License, or (at your + option) any later version. + + or + + * the GNU General Public License as published by the Free + Software Foundation; either version 2 of the License, or (at your + option) any later version. + + or both in parallel, as here. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Lesser General Public License for more details. + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this program. If not, see <https://www.gnu.org/licenses/>. */ |