Module Name: src Committed By: kamil Date: Sun Mar 1 15:08:16 UTC 2020
Modified Files: src/include: stddef.h Log Message: Expose max_align_t to C99/C++ max_align_t does not depend on any pre-C99 or !C++ language feature. This structure is in use in 3rd party essential C++ code as an extension for older language revisions and in gnu99 code in the NetBSD distribution (RTLD's build rules define -std=gnu11 just for exposing this struct). Exposing max_align_t from the central NetBSD header avoid duplicate definition in 3rd party code that could differ and produce ABI mismatched binaries between -std= revisions. This problem does not exist on OSs like Linux as they get this namespace visibility defined inside LLVM or GNU toolchain headers. NetBSD ships with its own stddef.h, rather than relying on a toolchain and its internal extensions. To generate a diff of this commit: cvs rdiff -u -r1.20 -r1.21 src/include/stddef.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/stddef.h diff -u src/include/stddef.h:1.20 src/include/stddef.h:1.21 --- src/include/stddef.h:1.20 Sun Mar 20 16:26:06 2016 +++ src/include/stddef.h Sun Mar 1 15:08:16 2020 @@ -1,4 +1,4 @@ -/* $NetBSD: stddef.h,v 1.20 2016/03/20 16:26:06 christos Exp $ */ +/* $NetBSD: stddef.h,v 1.21 2020/03/01 15:08:16 kamil Exp $ */ /*- * Copyright (c) 1990, 1993 @@ -67,7 +67,8 @@ typedef _BSD_WCHAR_T_ wchar_t; (&reinterpret_cast<const volatile char &>(static_cast<type *>(0)->member)))) #endif -#if (__STDC_VERSION__ - 0) >= 201112L || (__cplusplus - 0) >= 201103L +#if (__STDC_VERSION__ - 0) > 199901L || defined(__cplusplus) +/* Introduced in C99/C++11, as an extension exposed to C99/C++98 */ typedef union { void *_v; long double _ld;