about summary refs log tree commit diff
diff options
context:
space:
mode:
authorAdhemerval Zanella <adhemerval.zanella@linaro.org>2017-01-06 11:05:27 -0200
committerAdhemerval Zanella <adhemerval.zanella@linaro.org>2017-01-09 13:48:44 -0200
commit75dafa2f323555600a1d1675de6eea09d25e3482 (patch)
tree5ae16531346cfc92099ac82d467fda78bf0de493
parentf68fcd95d34d2f2ac286b9ebb64e3a07e36a20cf (diff)
downloadglibc-75dafa2f323555600a1d1675de6eea09d25e3482.tar.gz
glibc-75dafa2f323555600a1d1675de6eea09d25e3482.tar.xz
glibc-75dafa2f323555600a1d1675de6eea09d25e3482.zip
Move fortified explicit_bzero back to string3
Commit 38765ab68f329fd moved the bzero, bcopy, and explicit_bzero
fortified macros to a common header (strings_fortified.h).  However
the side effect is a fortified explicit_bzero is defined when including
only strings.h.

This patch moves back the fortified explicit_bzero definition to
strings3.h header.

Checked on x86_64-linux-gnu.

	* string/bits/strings_fortified.h (explicit_bzero): Move back to ..
	* string/bits/string3.h: ... here.
-rw-r--r--ChangeLog5
-rw-r--r--string/bits/string3.h9
-rw-r--r--string/bits/strings_fortified.h9
3 files changed, 14 insertions, 9 deletions
diff --git a/ChangeLog b/ChangeLog
index 172b0c9275..8454cd627e 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2017-01-09  Adhemerval Zanella  <adhemerval.zanella@linaro.org>
+
+	* string/bits/strings_fortified.h (explicit_bzero): Move back to ..
+	* string/bits/string3.h: ... here.
+
 2017-01-05  Joseph Myers  <joseph@codesourcery.com>
 
 	[BZ #21028]
diff --git a/string/bits/string3.h b/string/bits/string3.h
index 0b0a37744a..738226d49b 100644
--- a/string/bits/string3.h
+++ b/string/bits/string3.h
@@ -92,6 +92,15 @@ __NTH (memset (void *__dest, int __ch, size_t __len))
 
 #ifdef __USE_MISC
 # include <bits/strings_fortified.h>
+
+void __explicit_bzero_chk (void *__dest, size_t __len, size_t __destlen)
+  __THROW __nonnull ((1));
+
+__fortify_function void
+__NTH (explicit_bzero (void *__dest, size_t __len))
+{
+  __explicit_bzero_chk (__dest, __len, __bos0 (__dest));
+}
 #endif
 
 __fortify_function char *
diff --git a/string/bits/strings_fortified.h b/string/bits/strings_fortified.h
index fd396f9f3c..411e7863d6 100644
--- a/string/bits/strings_fortified.h
+++ b/string/bits/strings_fortified.h
@@ -31,13 +31,4 @@ __NTH (bzero (void *__dest, size_t __len))
   (void) __builtin___memset_chk (__dest, '\0', __len, __bos0 (__dest));
 }
 
-void __explicit_bzero_chk (void *__dest, size_t __len, size_t __destlen)
-  __THROW __nonnull ((1));
-
-__fortify_function void
-__NTH (explicit_bzero (void *__dest, size_t __len))
-{
-  __explicit_bzero_chk (__dest, __len, __bos0 (__dest));
-}
-
 #endif