Source-Changes-HG archive

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

[src/trunk]: src/include/ssp Apparently clang pretends to be gcc 4.2 but is s...



details:   https://anonhg.NetBSD.org/src/rev/40e685babd4e
branches:  trunk
changeset: 795718:40e685babd4e
user:      pooka <pooka%NetBSD.org@localhost>
date:      Fri Apr 25 18:37:38 2014 +0000

description:
Apparently clang pretends to be gcc 4.2 but is secretly much awesomer
than gcc 4.2, so enable the stpncpy() wrapper also for clang.

diffstat:

 include/ssp/string.h |  4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diffs (18 lines):

diff -r 8e4c25a14420 -r 40e685babd4e include/ssp/string.h
--- a/include/ssp/string.h      Fri Apr 25 18:31:35 2014 +0000
+++ b/include/ssp/string.h      Fri Apr 25 18:37:38 2014 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: string.h,v 1.11 2014/04/24 20:12:56 pooka Exp $        */
+/*     $NetBSD: string.h,v 1.12 2014/04/25 18:37:38 pooka Exp $        */
 
 /*-
  * Copyright (c) 2006 The NetBSD Foundation, Inc.
@@ -94,7 +94,7 @@
 #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)
+#if __GNUC_PREREQ__(4,8) || defined(__clang__)
 #define stpncpy(dst, src, len) __ssp_bos_check3(stpncpy, dst, src, len)
 #endif
 #define strcpy(dst, src) __ssp_bos_check2(strcpy, dst, src)



Home | Main Index | Thread Index | Old Index