Source-Changes-HG archive

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

[src/trunk]: src/include PR/50983: David Shao: Protect stddef;



details:   https://anonhg.NetBSD.org/src/rev/1564cdc07ccc
branches:  trunk
changeset: 344289:1564cdc07ccc
user:      christos <christos%NetBSD.org@localhost>
date:      Sun Mar 20 14:11:49 2016 +0000

description:
PR/50983: David Shao: Protect stddef;
also make the pointer void *.

diffstat:

 include/stddef.h |  7 +++++--
 1 files changed, 5 insertions(+), 2 deletions(-)

diffs (24 lines):

diff -r f377381b5460 -r 1564cdc07ccc include/stddef.h
--- a/include/stddef.h  Sun Mar 20 10:29:12 2016 +0000
+++ b/include/stddef.h  Sun Mar 20 14:11:49 2016 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: stddef.h,v 1.18 2016/03/17 00:03:38 mrg Exp $  */
+/*     $NetBSD: stddef.h,v 1.19 2016/03/20 14:11:49 christos Exp $     */
 
 /*-
  * Copyright (c) 1990, 1993
@@ -67,10 +67,13 @@
     (&reinterpret_cast<const volatile char &>(static_cast<type *>(0)->member))))
 #endif  
 
+#if (defined (__STDC_VERSION__) && __STDC_VERSION__ >= 201112L) \
+  || (defined(__cplusplus) && __cplusplus >= 201103L)
 typedef union {
-       char *_c;
+       void *_v;
        long double _ld;
        long long int _ll;
 } max_align_t;
+#endif
  
 #endif /* _STDDEF_H_ */



Home | Main Index | Thread Index | Old Index