Commit Graph

18 Commits

Author SHA1 Message Date
dholland 112cae6f8e Don't pollute the namespace with stdint.h. (This file is included from
string.h so it can't blithely do whatever it feels like.) PR 45258.
2011-08-22 01:24:15 +00:00
yamt a5ad33a8d7 include <stdint.h> instead of <sys/types.h>.
the latter pulls FD_SET etc and it makes wine-1.1.27's winsock vs unixsocket
namespace dance unhappy.  for more information, grep
	Include_winsock_h_before_stdlib_h_or_use_the_MSVCRT_library
in their source.
2009-08-19 04:22:53 +00:00
joerg ebf8c87cf8 Some parts of gcc fail with the direct include of sys/inttypes.h, so
fall back to using sys/types.h like stdlib.h does.
2009-07-21 16:27:54 +00:00
joerg 0578c2ad0f Move popcount et al to src/common and add popcount32/popcount64.
Requested by rmind@. MD should now override popcount32/popcount64 and
provide the aliases as fitting.
2009-07-21 14:55:32 +00:00
joerg 974b291a6c Add popcount(3) and the long and long long version. Name is inspired by
gnulib, the implementation goes back to the AMD Software Optimizer
guide. A number of platforms will want to replace the C version with
assembler code using native instructions.
2009-07-21 13:18:43 +00:00
martin ce099b4099 Remove clause 3 and 4 from TNF licenses 2008-04-28 20:22:51 +00:00
kristerw 1ef79ebc7d Do not include SSP files unless _FORTIFY_SOURCE > 0. 2007-08-02 21:49:09 +00:00
tls dc99372be9 Match usage of FORTIFY_SOURCE on other platforms by not requiring special
include path: the normal header files now include the "SSP" ones (which one
should note are not really named right: SSP and FORTIFY_SOURCE are independent
features).

Disable USE_SSP on targets where the compiler doesn't support it at all
(mips, alpha) or it's known broken (sh3).  But enable FORTIFY_SOURCE,
without SSP, on those platforms -- tested on mipsel.
2007-05-30 21:14:35 +00:00
perry 19b7469a00 de-__P -- the hack is long since useless. Discussed with christos,
matt, kleink, others. Approved by christos.
2005-02-03 04:39:32 +00:00
bjh21 4be7a2dcf3 Add a new feature-test macro, _NETBSD_SOURCE. If this is defined
by the application, all NetBSD interfaces are made visible, even
if some other feature-test macro (like _POSIX_C_SOURCE) is defined.
<sys/featuretest.h> defined _NETBSD_SOURCE if none of _ANSI_SOURCE,
_POSIX_C_SOURCE and _XOPEN_SOURCE is defined, so as to preserve
existing behaviour.

This has two major advantages:
+ Programs that require non-POSIX facilities but define _POSIX_C_SOURCE
  can trivially be overruled by putting -D_NETBSD_SOURCE in their CFLAGS.
+ It makes most of the #ifs simpler, in that they're all now ORs of the
  various macros, rather than having checks for (!defined(_ANSI_SOURCE) ||
  !defined(_POSIX_C_SOURCE) || !defined(_XOPEN_SOURCE)) all over the place.

I've tried not to change the semantics of the headers in any case where
_NETBSD_SOURCE wasn't defined, but there were some places where the
current semantics were clearly mad, and retaining them was harder than
correcting them.  In particular, I've mostly normalised things so that
_ANSI_SOURCE gets you the smallest set of stuff, then _POSIX_C_SOURCE,
_XOPEN_SOURCE and _NETBSD_SOURCE in that order.

Tested by building for vax, encouraged by thorpej, and uncontested in
tech-userlevel for a week.
2003-04-28 23:16:11 +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
kleink f991579d16 Don't make NULL available to _XOPEN_SOURCE. 1998-05-06 17:12:45 +00:00
kleink af3e9a7144 If _XOPEN_SOURCE isn't defined, provide <string.h> definitions for
compatibility.
1998-04-27 16:48:09 +00:00
kleink 7d9fe293d7 Rework this header to be XPG4.2-compliant: provide the symbols and prototypes
defined in the spec, and don't include the whole <string.h> header.
1998-02-02 15:59:13 +00:00
cgd 4d2cbfce0a new RCS ID format. 1994-10-26 00:55:40 +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