Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/lib/libc/ssp Provide explicit prototypes in case HAVE_SSP=no.



details:   https://anonhg.NetBSD.org/src/rev/f1b63e6bb3d7
branches:  trunk
changeset: 332341:f1b63e6bb3d7
user:      joerg <joerg%NetBSD.org@localhost>
date:      Wed Sep 17 00:39:28 2014 +0000

description:
Provide explicit prototypes in case HAVE_SSP=no.

diffstat:

 lib/libc/ssp/memcpy_chk.c  |  6 ++++--
 lib/libc/ssp/memmove_chk.c |  6 ++++--
 lib/libc/ssp/memset_chk.c  |  6 ++++--
 lib/libc/ssp/strcat_chk.c  |  6 ++++--
 lib/libc/ssp/strcpy_chk.c  |  6 ++++--
 lib/libc/ssp/strncat_chk.c |  7 +++++--
 lib/libc/ssp/strncpy_chk.c |  7 +++++--
 7 files changed, 30 insertions(+), 14 deletions(-)

diffs (190 lines):

diff -r 189f40b13837 -r f1b63e6bb3d7 lib/libc/ssp/memcpy_chk.c
--- a/lib/libc/ssp/memcpy_chk.c Tue Sep 16 22:29:09 2014 +0000
+++ b/lib/libc/ssp/memcpy_chk.c Wed Sep 17 00:39:28 2014 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: memcpy_chk.c,v 1.4 2008/04/28 20:23:00 martin Exp $    */
+/*     $NetBSD: memcpy_chk.c,v 1.5 2014/09/17 00:39:28 joerg Exp $     */
 
 /*-
  * Copyright (c) 2006 The NetBSD Foundation, Inc.
@@ -29,7 +29,7 @@
  * POSSIBILITY OF SUCH DAMAGE.
  */
 #include <sys/cdefs.h>
-__RCSID("$NetBSD: memcpy_chk.c,v 1.4 2008/04/28 20:23:00 martin Exp $");
+__RCSID("$NetBSD: memcpy_chk.c,v 1.5 2014/09/17 00:39:28 joerg Exp $");
 
 /*LINTLIBRARY*/
 
@@ -38,6 +38,8 @@
 
 #undef memcpy
 
+void *__memcpy_chk(void * __restrict, const void * __restrict, size_t, size_t);
+
 void *
 __memcpy_chk(void * __restrict dst, const void * __restrict src, size_t len,
     size_t slen)
diff -r 189f40b13837 -r f1b63e6bb3d7 lib/libc/ssp/memmove_chk.c
--- a/lib/libc/ssp/memmove_chk.c        Tue Sep 16 22:29:09 2014 +0000
+++ b/lib/libc/ssp/memmove_chk.c        Wed Sep 17 00:39:28 2014 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: memmove_chk.c,v 1.4 2008/04/28 20:23:00 martin Exp $   */
+/*     $NetBSD: memmove_chk.c,v 1.5 2014/09/17 00:39:28 joerg Exp $    */
 
 /*-
  * Copyright (c) 2006 The NetBSD Foundation, Inc.
@@ -29,7 +29,7 @@
  * POSSIBILITY OF SUCH DAMAGE.
  */
 #include <sys/cdefs.h>
-__RCSID("$NetBSD: memmove_chk.c,v 1.4 2008/04/28 20:23:00 martin Exp $");
+__RCSID("$NetBSD: memmove_chk.c,v 1.5 2014/09/17 00:39:28 joerg Exp $");
 
 /*LINTLIBRARY*/
 
@@ -38,6 +38,8 @@
 
 #undef memmove
 
+void *__memmove_chk(void *, void *src, size_t, size_t);
+
 void *
 __memmove_chk(void *dst, void *src, size_t len,
     size_t slen)
diff -r 189f40b13837 -r f1b63e6bb3d7 lib/libc/ssp/memset_chk.c
--- a/lib/libc/ssp/memset_chk.c Tue Sep 16 22:29:09 2014 +0000
+++ b/lib/libc/ssp/memset_chk.c Wed Sep 17 00:39:28 2014 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: memset_chk.c,v 1.4 2008/04/28 20:23:00 martin Exp $    */
+/*     $NetBSD: memset_chk.c,v 1.5 2014/09/17 00:39:28 joerg Exp $     */
 
 /*-
  * Copyright (c) 2006 The NetBSD Foundation, Inc.
@@ -29,7 +29,7 @@
  * POSSIBILITY OF SUCH DAMAGE.
  */
 #include <sys/cdefs.h>
-__RCSID("$NetBSD: memset_chk.c,v 1.4 2008/04/28 20:23:00 martin Exp $");
+__RCSID("$NetBSD: memset_chk.c,v 1.5 2014/09/17 00:39:28 joerg Exp $");
 
 /*LINTLIBRARY*/
 
@@ -38,6 +38,8 @@
 
 #undef memset
 
+void *__memset_chk(void * __restrict, int, size_t, size_t);
+
 void *
 __memset_chk(void * __restrict dst, int val, size_t len, size_t slen)
 {
diff -r 189f40b13837 -r f1b63e6bb3d7 lib/libc/ssp/strcat_chk.c
--- a/lib/libc/ssp/strcat_chk.c Tue Sep 16 22:29:09 2014 +0000
+++ b/lib/libc/ssp/strcat_chk.c Wed Sep 17 00:39:28 2014 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: strcat_chk.c,v 1.4 2009/11/17 20:44:26 drochner Exp $  */
+/*     $NetBSD: strcat_chk.c,v 1.5 2014/09/17 00:39:28 joerg Exp $     */
 
 /*-
  * Copyright (c) 2006 The NetBSD Foundation, Inc.
@@ -29,13 +29,15 @@
  * POSSIBILITY OF SUCH DAMAGE.
  */
 #include <sys/cdefs.h>
-__RCSID("$NetBSD: strcat_chk.c,v 1.4 2009/11/17 20:44:26 drochner Exp $");
+__RCSID("$NetBSD: strcat_chk.c,v 1.5 2014/09/17 00:39:28 joerg Exp $");
 
 /*LINTLIBRARY*/
 
 #include <ssp/ssp.h>
 #include <string.h>
 
+char *__strcat_chk(char * __restrict, const char * __restrict, size_t);
+
 char *
 __strcat_chk(char * __restrict dst, const char * __restrict src, size_t slen)
 {
diff -r 189f40b13837 -r f1b63e6bb3d7 lib/libc/ssp/strcpy_chk.c
--- a/lib/libc/ssp/strcpy_chk.c Tue Sep 16 22:29:09 2014 +0000
+++ b/lib/libc/ssp/strcpy_chk.c Wed Sep 17 00:39:28 2014 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: strcpy_chk.c,v 1.6 2013/11/06 16:30:27 christos Exp $  */
+/*     $NetBSD: strcpy_chk.c,v 1.7 2014/09/17 00:39:28 joerg Exp $     */
 
 /*-
  * Copyright (c) 2006 The NetBSD Foundation, Inc.
@@ -29,7 +29,7 @@
  * POSSIBILITY OF SUCH DAMAGE.
  */
 #include <sys/cdefs.h>
-__RCSID("$NetBSD: strcpy_chk.c,v 1.6 2013/11/06 16:30:27 christos Exp $");
+__RCSID("$NetBSD: strcpy_chk.c,v 1.7 2014/09/17 00:39:28 joerg Exp $");
 
 /*LINTLIBRARY*/
 
@@ -38,6 +38,8 @@
 
 #undef memcpy
 
+char *__strcpy_chk(char * __restrict, const char * __restrict, size_t);
+
 char *
 __strcpy_chk(char * __restrict dst, const char * __restrict src, size_t slen)
 {
diff -r 189f40b13837 -r f1b63e6bb3d7 lib/libc/ssp/strncat_chk.c
--- a/lib/libc/ssp/strncat_chk.c        Tue Sep 16 22:29:09 2014 +0000
+++ b/lib/libc/ssp/strncat_chk.c        Wed Sep 17 00:39:28 2014 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: strncat_chk.c,v 1.4 2009/11/17 20:44:26 drochner Exp $ */
+/*     $NetBSD: strncat_chk.c,v 1.5 2014/09/17 00:39:28 joerg Exp $    */
 
 /*-
  * Copyright (c) 2006 The NetBSD Foundation, Inc.
@@ -29,7 +29,7 @@
  * POSSIBILITY OF SUCH DAMAGE.
  */
 #include <sys/cdefs.h>
-__RCSID("$NetBSD: strncat_chk.c,v 1.4 2009/11/17 20:44:26 drochner Exp $");
+__RCSID("$NetBSD: strncat_chk.c,v 1.5 2014/09/17 00:39:28 joerg Exp $");
 
 /*LINTLIBRARY*/
 
@@ -37,6 +37,9 @@
 #include <string.h>
 #include <stdio.h>
 
+char *__strncat_chk(char * __restrict, const char * __restrict, size_t,
+    size_t);
+
 char *
 __strncat_chk(char * __restrict dst, const char * __restrict src, size_t len,
     size_t slen)
diff -r 189f40b13837 -r f1b63e6bb3d7 lib/libc/ssp/strncpy_chk.c
--- a/lib/libc/ssp/strncpy_chk.c        Tue Sep 16 22:29:09 2014 +0000
+++ b/lib/libc/ssp/strncpy_chk.c        Wed Sep 17 00:39:28 2014 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: strncpy_chk.c,v 1.4 2008/04/28 20:23:00 martin Exp $   */
+/*     $NetBSD: strncpy_chk.c,v 1.5 2014/09/17 00:39:28 joerg Exp $    */
 
 /*-
  * Copyright (c) 2006 The NetBSD Foundation, Inc.
@@ -29,7 +29,7 @@
  * POSSIBILITY OF SUCH DAMAGE.
  */
 #include <sys/cdefs.h>
-__RCSID("$NetBSD: strncpy_chk.c,v 1.4 2008/04/28 20:23:00 martin Exp $");
+__RCSID("$NetBSD: strncpy_chk.c,v 1.5 2014/09/17 00:39:28 joerg Exp $");
 
 /*LINTLIBRARY*/
 
@@ -38,6 +38,9 @@
 
 #undef strncpy
 
+char *__strncpy_chk(char * __restrict, const char * __restrict, size_t,
+    size_t);
+
 char *
 __strncpy_chk(char * __restrict dst, const char * __restrict src, size_t len,
     size_t slen)



Home | Main Index | Thread Index | Old Index