Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/include/ssp Wrap stpncpy() iff GNUC_PREREQ(4, 8). Fixes USE_...
details: https://anonhg.NetBSD.org/src/rev/314db369c7cd
branches: trunk
changeset: 328927:314db369c7cd
user: pooka <pooka%NetBSD.org@localhost>
date: Thu Apr 24 20:12:56 2014 +0000
description:
Wrap stpncpy() iff GNUC_PREREQ(4,8). Fixes USE_SSP=yes builds
with gcc 4.5.
diffstat:
include/ssp/string.h | 5 ++++-
1 files changed, 4 insertions(+), 1 deletions(-)
diffs (27 lines):
diff -r 5a98f90ad200 -r 314db369c7cd include/ssp/string.h
--- a/include/ssp/string.h Thu Apr 24 19:23:00 2014 +0000
+++ b/include/ssp/string.h Thu Apr 24 20:12:56 2014 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: string.h,v 1.10 2014/04/06 19:29:58 christos Exp $ */
+/* $NetBSD: string.h,v 1.11 2014/04/24 20:12:56 pooka Exp $ */
/*-
* Copyright (c) 2006 The NetBSD Foundation, Inc.
@@ -31,6 +31,7 @@
#ifndef _SSP_STRING_H_
#define _SSP_STRING_H_
+#include <sys/cdefs.h>
#include <ssp/ssp.h>
__BEGIN_DECLS
@@ -93,7 +94,9 @@
#define memmove(dst, src, len) __ssp_bos_check3(memmove, dst, src, len)
#define memset(dst, val, len) __ssp_bos_check3(memset, dst, val, len)
#define stpcpy(dst, src) __ssp_bos_check2(stpcpy, dst, src)
+#if __GNUC_PREREQ__(4,8)
#define stpncpy(dst, src, len) __ssp_bos_check3(stpncpy, dst, src, len)
+#endif
#define strcpy(dst, src) __ssp_bos_check2(strcpy, dst, src)
#define strcat(dst, src) __ssp_bos_check2(strcat, dst, src)
#define strncpy(dst, src, len) __ssp_bos_check3(strncpy, dst, src, len)
Home |
Main Index |
Thread Index |
Old Index