diff options
author | Bruno Haible <bruno@clisp.org> | 2020-02-19 20:28:15 +0100 |
---|---|---|
committer | Bruno Haible <bruno@clisp.org> | 2020-02-19 20:28:15 +0100 |
commit | 8f2e74a91f2c9118cb86a632a7bef5c7b394d1ab (patch) | |
tree | cd9fd0807048faa734271edac4425b974b940557 /lib/array-mergesort.h | |
parent | f4693b0166bab83ab232dcd3cfd95906411d1110 (diff) | |
download | gnulib-8f2e74a91f2c9118cb86a632a7bef5c7b394d1ab.tar.gz |
uninorm/decompose-internal: Avoid "no previous prototype" warning.
Reported by Tim Rühsen <tim.ruehsen@gmx.de> in
<https://lists.gnu.org/archive/html/bug-gnulib/2020-02/msg00105.html>.
* lib/array-mergesort.h: Accept an optional macro definition
STATIC_FROMTO.
* lib/uninorm/decompose-internal.c (STATIC_FROMTO): New macro.
Diffstat (limited to 'lib/array-mergesort.h')
-rw-r--r-- | lib/array-mergesort.h | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/lib/array-mergesort.h b/lib/array-mergesort.h index 3d363bb4e3..bf86d644ca 100644 --- a/lib/array-mergesort.h +++ b/lib/array-mergesort.h @@ -29,6 +29,8 @@ respectively, less, equal, or greater than the element pointed to by the second argument. STATIC The storage class of the functions being defined. + STATIC_FROMTO (Optional.) Overrides STATIC for the 'merge_sort_fromto' + function. Before including this file, you also need to include: #include <stddef.h> */ @@ -87,7 +89,12 @@ merge (const ELEMENT *src1, size_t n1, /* Sort src[0..n-1] into dst[0..n-1], using tmp[0..n/2-1] as temporary (scratch) storage. The arrays src, dst, tmp must not overlap. */ -STATIC void +#ifdef STATIC_FROMTO +STATIC_FROMTO +#else +STATIC +#endif +void merge_sort_fromto (const ELEMENT *src, ELEMENT *dst, size_t n, ELEMENT *tmp) { switch (n) |