aboutsummaryrefslogtreecommitdiffstats
path: root/support/dynarray.h
diff options
context:
space:
mode:
authorArnold D. Robbins <arnold@skeeve.com>2021-06-30 21:46:50 +0300
committerArnold D. Robbins <arnold@skeeve.com>2021-06-30 21:46:50 +0300
commitb3bfdb152de59cab66ee428a42bc2a7f6f97b636 (patch)
treec2fb49b170362f23736b1e720c7de9b512c0368c /support/dynarray.h
parentb00eb107c4f72189c6a49823550413177e6bbb60 (diff)
downloadegawk-b3bfdb152de59cab66ee428a42bc2a7f6f97b636.tar.gz
egawk-b3bfdb152de59cab66ee428a42bc2a7f6f97b636.tar.bz2
egawk-b3bfdb152de59cab66ee428a42bc2a7f6f97b636.zip
Update support files from GNULIB.
Diffstat (limited to 'support/dynarray.h')
-rw-r--r--support/dynarray.h24
1 files changed, 14 insertions, 10 deletions
diff --git a/support/dynarray.h b/support/dynarray.h
index ba2bc2ed..76ca2294 100644
--- a/support/dynarray.h
+++ b/support/dynarray.h
@@ -1,17 +1,17 @@
/* Type-safe arrays which grow dynamically.
Copyright 2021 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
- the Free Software Foundation; either version 3 of the License, or
- (at your option) any later version.
+ This file 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 2.1 of the
+ License, or (at your option) any later version.
- This program is distributed in the hope that it will be useful,
+ This file 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 General Public License for more details.
+ GNU Lesser General Public License for more details.
- You should have received a copy of the GNU General Public License
+ 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/>. */
/* Written by Paul Eggert and Bruno Haible, 2021. */
@@ -259,18 +259,22 @@ static DYNARRAY_ELEMENT *
#if defined DYNARRAY_STRUCT || defined DYNARRAY_ELEMENT || defined DYNARRAY_PREFIX
-# include <libc-config.h>
+# ifndef _GL_LIKELY
+/* Rely on __builtin_expect, as provided by the module 'builtin-expect'. */
+# define _GL_LIKELY(cond) __builtin_expect ((cond), 1)
+# define _GL_UNLIKELY(cond) __builtin_expect ((cond), 0)
+# endif
/* Define auxiliary structs and declare auxiliary functions, common to all
instantiations of dynarray. */
-# include <malloc/dynarray.h>
+# include <malloc/dynarray.gl.h>
/* Define the instantiation, specified through
DYNARRAY_STRUCT
DYNARRAY_ELEMENT
DYNARRAY_PREFIX
etc. */
-# include <malloc/dynarray-skeleton.c>
+# include <malloc/dynarray-skeleton.gl.h>
#else