Provide explicit prototypes in case HAVE_SSP=no.

This commit is contained in:
joerg 2014-09-17 00:39:28 +00:00
parent b768bac5e7
commit a00bc98930
7 changed files with 30 additions and 14 deletions

View File

@ -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 @@ __RCSID("$NetBSD: memcpy_chk.c,v 1.4 2008/04/28 20:23:00 martin Exp $");
#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)

View File

@ -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 @@ __RCSID("$NetBSD: memmove_chk.c,v 1.4 2008/04/28 20:23:00 martin Exp $");
#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)

View File

@ -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 @@ __RCSID("$NetBSD: memset_chk.c,v 1.4 2008/04/28 20:23:00 martin Exp $");
#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)
{

View File

@ -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)
{

View File

@ -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 @@ __RCSID("$NetBSD: strcpy_chk.c,v 1.6 2013/11/06 16:30:27 christos Exp $");
#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)
{

View File

@ -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 @@ __RCSID("$NetBSD: strncat_chk.c,v 1.4 2009/11/17 20:44:26 drochner Exp $");
#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)

View File

@ -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 @@ __RCSID("$NetBSD: strncpy_chk.c,v 1.4 2008/04/28 20:23:00 martin Exp $");
#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)