diff options
author | Bruno Haible <bruno@clisp.org> | 2020-02-22 20:57:30 +0100 |
---|---|---|
committer | Bruno Haible <bruno@clisp.org> | 2020-02-22 23:47:59 +0100 |
commit | 182afcba2635cbff91240656c7fb3742dd23ab6f (patch) | |
tree | 127b2f7f6ce012a80623c59627c7309db4df3c53 /lib/iconv.in.h | |
parent | 0f3fc07d96e8ac1cea19d7e3200b57b03bbc8013 (diff) | |
download | gnulib-182afcba2635cbff91240656c7fb3742dd23ab6f.tar.gz |
Use 'restrict' in all POSIX function declarations.
* lib/iconv.in.h (iconv): Use 'restrict'.
* lib/inttypes.in.h (strtoimax, strtoumax): Likewise.
* lib/monetary.in.h (strfmon_l): Likewise.
* lib/pthread.in.h (pthread_create, pthread_mutex_init,
pthread_mutexattr_gettype, pthread_mutexattr_getrobust,
pthread_mutex_timedlock, pthread_rwlock_init,
pthread_rwlock_timedrdlock, pthread_rwlock_timedwrlock,
pthread_cond_init, pthread_cond_wait, pthread_cond_timedwait): Likewise.
* lib/search.in.h (tdelete): Likewise.
* lib/signal.in.h (pthread_sigmask, sigprocmask): Likewise.
* lib/stdio.in.h (dprintf, fgets, fopen, fprintf, fputs, fread, freopen,
fscanf, fwrite, getdelim, getline, printf, scanf, snprintf, sprintf,
vdprintf, vfprintf, vfscanf, vprintf, vscanf, vsnprintf, vsprintf):
Likewise.
* lib/stdlib.in.h (mbtowc, realpath, strtod, strtold, strtoll,
strtoull): Likewise.
* lib/string.in.h (strncat): Likewise.
* lib/sys_socket.in.h (accept, getpeername, getsockname, getsockopt,
recvfrom): Likewise.
* lib/sys_stat.in.h (fstatat, lstat, stat): Likewise.
* lib/time.in.h (strftime): Likewise.
* lib/unistd.in.h (readlink, readlinkat): Likewise.
* lib/wchar.in.h (mbrtowc, mbrlen, mbsrtowcs, mbsnrtowcs, wcrtomb,
wcsrtombs, wcsnrtombs, wmemcpy, wcscpy, wcpcpy, wcsncpy, wcpncpy,
wcscat, wcsncat, wcsxfrm, wcsstr, wcstok, wcsftime): Likewise.
* m4/iconv_h.m4 (gl_ICONV_H): Require AC_C_RESTRICT.
* m4/inttypes.m4 (gl_INTTYPES_INCOMPLETE): Likewise.
* m4/monetary_h.m4 (gl_MONETARY_H): Likewise.
* m4/search_h.m4 (gl_SEARCH_H): Likewise.
* m4/signal_h.m4 (gl_SIGNAL_H): Likewise.
* m4/stdio_h.m4 (gl_STDIO_H): Likewise.
* m4/stdlib_h.m4 (gl_STDLIB_H): Likewise.
* m4/sys_socket_h.m4 (gl_HEADER_SYS_SOCKET): Likewise.
* m4/sys_stat_h.m4 (gl_HEADER_SYS_STAT_H): Likewise.
* m4/unistd_h.m4 (gl_UNISTD_H): Likewise.
* m4/wchar_h.m4 (gl_WCHAR_H): Likewise.
* m4/string_h.m4 (gl_HEADER_STRING_H_BODY): Make consistent with the
other *_h.m4 files.
* m4/time_h.m4 (gl_HEADER_TIME_H): Likewise.
Diffstat (limited to 'lib/iconv.in.h')
-rw-r--r-- | lib/iconv.in.h | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/lib/iconv.in.h b/lib/iconv.in.h index 125fa3751d..904e8f69d7 100644 --- a/lib/iconv.in.h +++ b/lib/iconv.in.h @@ -80,19 +80,22 @@ _GL_WARN_ON_USE (iconv_open, "iconv_open is not working correctly everywhere - " # endif _GL_FUNCDECL_RPL (iconv, size_t, (iconv_t cd, - @ICONV_CONST@ char **inbuf, size_t *inbytesleft, - char **outbuf, size_t *outbytesleft)); + @ICONV_CONST@ char **restrict inbuf, + size_t *restrict inbytesleft, + char **restrict outbuf, size_t *restrict outbytesleft)); _GL_CXXALIAS_RPL (iconv, size_t, (iconv_t cd, - @ICONV_CONST@ char **inbuf, size_t *inbytesleft, - char **outbuf, size_t *outbytesleft)); + @ICONV_CONST@ char **restrict inbuf, + size_t *restrict inbytesleft, + char **restrict outbuf, size_t *restrict outbytesleft)); # else /* Need to cast, because on some versions of Solaris, ICONV_CONST does not have the right value for C++. */ _GL_CXXALIAS_SYS_CAST (iconv, size_t, (iconv_t cd, - @ICONV_CONST@ char **inbuf, size_t *inbytesleft, - char **outbuf, size_t *outbytesleft)); + @ICONV_CONST@ char **restrict inbuf, + size_t *restrict inbytesleft, + char **restrict outbuf, size_t *restrict outbytesleft)); # endif _GL_CXXALIASWARN (iconv); # ifndef ICONV_CONST |