]> Savannah Git Hosting - gnulib.git/commitdiff
astrxfrm: Use 'restrict'.
authorBruno Haible <bruno@clisp.org>
Sun, 23 Feb 2020 11:06:29 +0000 (12:06 +0100)
committerBruno Haible <bruno@clisp.org>
Sun, 23 Feb 2020 11:06:29 +0000 (12:06 +0100)
* lib/astrxfrm.h (astrxfrm): Use 'restrict'.
* modules/astrxfrm (configure.ac): Require AC_C_RESTRICT.

ChangeLog
lib/astrxfrm.h
modules/astrxfrm

index 563d7709f1fbcdec2ea3b8dd6e1e958b8f95ec7e..80a90eb6b532e3b5f64e1fe730fbb00c13badc78 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,9 @@
 2020-02-23  Bruno Haible  <bruno@clisp.org>
 
+       astrxfrm: Use 'restrict'.
+       * lib/astrxfrm.h (astrxfrm): Use 'restrict'.
+       * modules/astrxfrm (configure.ac): Require AC_C_RESTRICT.
+
        amemxfrm: Use 'restrict'.
        * lib/amemxfrm.h (amemxfrm): Use 'restrict'.
        * modules/amemxfrm (configure.ac): Require AC_C_RESTRICT.
index a23ed707e921cad48df29ef724076c81c66595dd..211fe3b24e7bf4e4d667264d7e3fe1cc74e4b6fc 100644 (file)
@@ -37,7 +37,8 @@ extern "C" {
    freshly allocated string is returned.  In both cases, *lengthp is set to the
    length of the returned string.
    Upon failure, return NULL, with errno set.  */
-extern char * astrxfrm (const char *s, char *resultbuf, size_t *lengthp);
+extern char * astrxfrm (const char *s,
+                        char *restrict resultbuf, size_t *lengthp);
 
 
 #ifdef __cplusplus
index e2edc42cc11326d43399376c5750e1d624fa89ee..053340344cbfc1850e4bd361b95d23dcc27e15cc 100644 (file)
@@ -8,6 +8,7 @@ lib/astrxfrm.c
 Depends-on:
 
 configure.ac:
+AC_REQUIRE([AC_C_RESTRICT])
 
 Makefile.am:
 lib_SOURCES += astrxfrm.c