summary refs log tree commit diff
path: root/string
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>2005-08-08 19:04:11 +0000
committerUlrich Drepper <drepper@redhat.com>2005-08-08 19:04:11 +0000
commitdc4bb1c2be1370fafd597602eb2b009cf10c025b (patch)
tree8f4ebb944a214ecae469243b05fada295839a487 /string
parent6c49b464d92da2945de33b9f1b0bddbb14c240ef (diff)
downloadglibc-dc4bb1c2be1370fafd597602eb2b009cf10c025b.tar.gz
glibc-dc4bb1c2be1370fafd597602eb2b009cf10c025b.tar.xz
glibc-dc4bb1c2be1370fafd597602eb2b009cf10c025b.zip
* posix/bits/unistd.h (confstr, getgroups, ttyname_r, gethostname,
	getdomainname): Add __NTH.
	* stdlib/bits/stdlib.h (ptsname_r, wctomb, mbstowcs, wcstombs):
	Likewise.
	(realpath): Likewise.  Use __const instead of const.  Add __restrict
	keywords.
	* socket/bits/socket2.h (recvfrom): Add __restrict keyword to __buf.
	* wcsmbs/bits/wchar2.h (wmemcpy, wmemmove, wmempcpy, wmemset,
	wcscpy, wcpcpy, wcsncpy, wcpncpy, wcscat, wcsncat, vswprintf, wcrtomb,
	mbsrtowcs, wcsrtombs, mbsnrtowcs, wcsnrtombs): Add __NTH.
	* string/bits/string3.h (__memset_ichk): Likewise.
	(__memcpy_ichk, __memmove_ichk, __mempcpy_ichk, __strcpy_ichk,
	__stpcpy_ichk, __strncpy_ichk, stpncpy, __strcat_ichk,
	__strncat_ichk): Likewise.  Use __const instead of const.
	(__stpncpy_chk): Use __const instead of const.
	(__stpncpy_alias): Use __REDIRECT_NTH instead of __REDIRECT.

2005-08-08  Ulrich Drepper  <drepper@redhat.com>
	    Jakub Jelinek  <jakub@redhat.com>

	* nscd/mem.c (BLOCK_ALIGN_LOG, BLOCK_ALIGN, BLOCK_ALIGN_M1): Move
	definitions to...
	* nscd/nscd.h (BLOCK_ALIGN_LOG, BLOCK_ALIGN, BLOCK_ALIGN_M1): ...here.
	* nscd/connections.c (usekey): New enum.
	(check_use, verify_persistent_db): New functions.
	(nscd_init): If persistent database is corrupted, unlink it and
	recreate rather than falling back to non-persistent database.
	Call verify_persistent_db.  Avoid overflows in total computation.

2005-08-08  Ulrich Drepper  <drepper@redhat.com>

	* iconvdata/utf-16.c (PREPARE_LOOP): Minor cleanups to make code
	better readable.  Avoid passing var to loop function, it's not
	necessary at all.
Diffstat (limited to 'string')
-rw-r--r--string/bits/string3.h35
1 files changed, 18 insertions, 17 deletions
diff --git a/string/bits/string3.h b/string/bits/string3.h
index 8da73ffde2..041ac11259 100644
--- a/string/bits/string3.h
+++ b/string/bits/string3.h
@@ -45,8 +45,8 @@
    ? __builtin___memcpy_chk (dest, src, len, __bos0 (dest))		\
    : __memcpy_ichk (dest, src, len))
 static __always_inline void *
-__memcpy_ichk (void *__restrict __dest, const void *__restrict __src,
-	       size_t __len)
+__NTH (__memcpy_ichk (void *__restrict __dest, __const void *__restrict __src,
+		      size_t __len))
 {
   return __builtin___memcpy_chk (__dest, __src, __len, __bos0 (__dest));
 }
@@ -57,7 +57,7 @@ __memcpy_ichk (void *__restrict __dest, const void *__restrict __src,
    ? __builtin___memmove_chk (dest, src, len, __bos0 (dest))		\
    : __memmove_ichk (dest, src, len))
 static __always_inline void *
-__memmove_ichk (void *__dest, const void *__src, size_t __len)
+__NTH (__memmove_ichk (void *__dest, __const void *__src, size_t __len))
 {
   return __builtin___memmove_chk (__dest, __src, __len, __bos0 (__dest));
 }
@@ -69,8 +69,8 @@ __memmove_ichk (void *__dest, const void *__src, size_t __len)
    ? __builtin___mempcpy_chk (dest, src, len, __bos0 (dest))		\
    : __mempcpy_ichk (dest, src, len))
 static __always_inline void *
-__mempcpy_ichk (void *__restrict __dest, const void *__restrict __src,
-		size_t __len)
+__NTH (__mempcpy_ichk (void *__restrict __dest,
+		       __const void *__restrict __src, size_t __len))
 {
   return __builtin___mempcpy_chk (__dest, __src, __len, __bos0 (__dest));
 }
@@ -91,7 +91,7 @@ __warndecl (__warn_memset_zero_len,
       ? __builtin___memset_chk (dest, ch, len, __bos0 (dest))		      \
       : __memset_ichk (dest, ch, len)))
 static __always_inline void *
-__memset_ichk (void *__dest, int __ch, size_t __len)
+__NTH (__memset_ichk (void *__dest, int __ch, size_t __len))
 {
   return __builtin___memset_chk (__dest, __ch, __len, __bos0 (__dest));
 }
@@ -113,7 +113,7 @@ __memset_ichk (void *__dest, int __ch, size_t __len)
    ? __builtin___strcpy_chk (dest, src, __bos (dest))			\
    : __strcpy_ichk (dest, src))
 static __always_inline char *
-__strcpy_ichk (char *__restrict __dest, const char *__restrict __src)
+__NTH (__strcpy_ichk (char *__restrict __dest, __const char *__restrict __src))
 {
   return __builtin___strcpy_chk (__dest, __src, __bos (__dest));
 }
@@ -125,7 +125,7 @@ __strcpy_ichk (char *__restrict __dest, const char *__restrict __src)
    ? __builtin___stpcpy_chk (dest, src, __bos (dest))			\
    : __stpcpy_ichk (dest, src))
 static __always_inline char *
-__stpcpy_ichk (char *__restrict __dest, const char *__restrict __src)
+__NTH (__stpcpy_ichk (char *__restrict __dest, __const char *__restrict __src))
 {
   return __builtin___stpcpy_chk (__dest, __src, __bos (__dest));
 }
@@ -137,21 +137,22 @@ __stpcpy_ichk (char *__restrict __dest, const char *__restrict __src)
    ? __builtin___strncpy_chk (dest, src, len, __bos (dest))		\
    : __strncpy_ichk (dest, src, len))
 static __always_inline char *
-__strncpy_ichk (char *__restrict __dest, const char *__restrict __src,
-		size_t __len)
+__NTH (__strncpy_ichk (char *__restrict __dest, __const char *__restrict __src,
+		       size_t __len))
 {
   return __builtin___strncpy_chk (__dest, __src, __len, __bos (__dest));
 }
 
 
 // XXX We have no corresponding builtin yet.
-extern char *__stpncpy_chk (char *__dest, const char *__src, size_t __n,
+extern char *__stpncpy_chk (char *__dest, __const char *__src, size_t __n,
 			    size_t __destlen) __THROW;
-extern char *__REDIRECT (__stpncpy_alias, (char *__dest, const char *__src,
-					   size_t __n), stpncpy) __THROW;
+extern char *__REDIRECT_NTH (__stpncpy_alias, (char *__dest,
+					       __const char *__src,
+					       size_t __n), stpncpy);
 
 extern __always_inline char *
-stpncpy (char *__dest, const char *__src, size_t __n)
+__NTH (stpncpy (char *__dest, __const char *__src, size_t __n))
 {
   if (__bos (__dest) != (size_t) -1
       && (!__builtin_constant_p (__n) || __n <= __bos (__dest)))
@@ -165,7 +166,7 @@ stpncpy (char *__dest, const char *__src, size_t __n)
    ? __builtin___strcat_chk (dest, src, __bos (dest))			\
    : __strcat_ichk (dest, src))
 static __always_inline char *
-__strcat_ichk (char *__restrict __dest, const char *__restrict __src)
+__NTH (__strcat_ichk (char *__restrict __dest, __const char *__restrict __src))
 {
   return __builtin___strcat_chk (__dest, __src, __bos (__dest));
 }
@@ -176,8 +177,8 @@ __strcat_ichk (char *__restrict __dest, const char *__restrict __src)
    ? __builtin___strncat_chk (dest, src, len, __bos (dest))		\
    : __strncat_ichk (dest, src, len))
 static __always_inline char *
-__strncat_ichk (char *__restrict __dest, const char *__restrict __src,
-		size_t __len)
+__NTH (__strncat_ichk (char *__restrict __dest, __const char *__restrict __src,
+		       size_t __len))
 {
   return __builtin___strncat_chk (__dest, __src, __len, __bos (__dest));
 }