Module Name:    src
Committed By:   pooka
Date:           Sat Nov 29 13:23:48 UTC 2014

Modified Files:
        src/include/ssp: string.h

Log Message:
Create the stpncpy() inline only when GCC>=4.8 || clang

Mirrors the stpncpy() wrapper macro and avoids the following:
warning: implicit declaration of function ‘__builtin___stpncpy_chk’


To generate a diff of this commit:
cvs rdiff -u -r1.12 -r1.13 src/include/ssp/string.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/include/ssp/string.h
diff -u src/include/ssp/string.h:1.12 src/include/ssp/string.h:1.13
--- src/include/ssp/string.h:1.12	Fri Apr 25 18:37:38 2014
+++ src/include/ssp/string.h	Sat Nov 29 13:23:48 2014
@@ -1,4 +1,4 @@
-/*	$NetBSD: string.h,v 1.12 2014/04/25 18:37:38 pooka Exp $	*/
+/*	$NetBSD: string.h,v 1.13 2014/11/29 13:23:48 pooka Exp $	*/
 
 /*-
  * Copyright (c) 2006 The NetBSD Foundation, Inc.
@@ -83,7 +83,9 @@ __ssp_bos_icheck3_restrict(memcpy, void 
 __ssp_bos_icheck3(memmove, void *, const void *)
 __ssp_bos_icheck3(memset, void *, int)
 __ssp_bos_icheck2_restrict(stpcpy, char *, const char *)
+#if __GNUC_PREREQ__(4,8) || defined(__clang__)
 __ssp_bos_icheck3_restrict(stpncpy, char *, const char *)
+#endif
 __ssp_bos_icheck2_restrict(strcpy, char *, const char *)
 __ssp_bos_icheck2_restrict(strcat, char *, const char *)
 __ssp_bos_icheck3_restrict(strncpy, char *, const char *)

Reply via email to