Commit Graph

24 Commits

Author SHA1 Message Date
joerg f11532c6b3 Remove trailing whitespace 2020-05-13 14:00:58 +00:00
kamil 11ca7e9ab1 Revert previous
Requested by joerg who wants to fix (ab)users.
2020-03-01 22:08:17 +00:00
kamil eee5e3f86c Fix typo in a comment 2020-03-01 15:18:34 +00:00
kamil 79ecd7cd2c 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.
2020-03-01 15:08:16 +00:00
christos 618262a97a use foo - 0 instead of testing for defined(foo); from joerg@ 2016-03-20 16:26:06 +00:00
christos c07b0c6505 PR/50983: David Shao: Protect stddef;
also make the pointer void *.
2016-03-20 14:11:49 +00:00
mrg b298dc9162 add max_align_t. C11 defines this and GCC 5.3 really wants it.
XXX: language laywers, please feel free to fix this as necessary.
2016-03-17 00:03:38 +00:00
matt a9c8f9282e Make ptrdiff_t available in the kernel. 2013-12-12 17:53:03 +00:00
christos db576bf322 Don't define wchar_t for c++; it is native in the language. From Alexander
Nasonov
2009-11-15 22:21:03 +00:00
thorpej b4bbe79968 Use __GNUC_PREREQ__() for the GCC 4 test, too. 2006-08-21 16:58:29 +00:00
christos 93e48bdb1e __offsetof__ is a builtin, so we need __GNU_PREREQ 2006-08-21 15:31:18 +00:00
christos a162f659c6 gcc-3.3 does not have __offsetof__, but gcc-3.4 eems to require it:
From the redhat web page:

http://www.redhat.com/docs/manuals/enterprise/RHEL-4-Manual/gcc/offsetof.html

__offsetof__ (expression)
    is equivalent to the parenthesized expression, except that the
    expression is considered an integral constant expression even if
    it contains certain operators that are not normally permitted in
    an integral constant expression. Users should never use __offsetof__
    directly; the only valid use of __offsetof__ is to implement the
    offsetof macro in <stddef.h>.
2006-08-21 15:26:49 +00:00
christos a4f92031c6 g++-4 does not like &0->member, so we have to use the built-in offsetof().
g++-3 does not have a built-in offsetof(), but we cannot use the c version,
      otherwise we break with -Wold-style-cast.
Inspired by the DF version, but a bit different.
2006-08-21 15:02:23 +00:00
skd 21f8ec95d5 Use gcc's builtin function. This permits c++ compiliation of const
expressions using offsetof.  Boost-python relies on this, for example.
2006-08-21 14:09:43 +00:00
agc 039cc95684 Move UCB-licensed code from 4-clause to 3-clause licence.
Patches provided by Joel Baker in PR 22270, verified by myself.
2003-08-07 09:44:09 +00:00
tshiozak 004f47d81c u_long -> unsigned long in "offsetof" macro.
Using u_long causes <stddef.h> to undesirably depend on <sys/types.h> .
BTW: Why is the cast needed?
2000-11-10 06:35:45 +00:00
christos 406d83685a de-lint 2000-07-06 00:51:36 +00:00
kleink 1bba558e50 Move <null.h> to <sys/null.h> for the purpose of avoiding conflicts due to
std C headers including it, and a kernel module written in C++ would benfit
as well.
2000-01-10 16:58:38 +00:00
kleink c07f17e8d9 For the benefit of G++'s null pointer constant implementation, #define NULL
as __null with egcs 1.0 (GCC 2.90) and above.  As several headers are affected
by this change, move the definition into a new header file, <null.h>, to ease
maintenance.
1999-12-22 21:26:15 +00:00
perry 4ab34663db merge lite-2 sccs id, but as per jt, don't switch to using lite-2 rune_t's 1998-02-02 17:13:49 +00:00
cgd 4d2cbfce0a new RCS ID format. 1994-10-26 00:55:40 +00:00
cgd 2922de7461 add _BSD's to ansi types 1994-05-21 09:41:59 +00:00
mycroft e9d867ef50 Add RCS identifiers. 1993-08-01 17:54:45 +00:00
cgd 61f282557f initial import of 386bsd-0.1 sources 1993-03-21 09:45:37 +00:00