| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
| |
which is not strictly pure because it calls malloc()/free() in some cases.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
an int constant to a long constant. This change improves consistency
in the following two ways:
1. The first 8 arguments are always passed in registers on ia64, which
by virtue of the generated code implicitly widens ints to longs and
allows the use of an 32-bit integral type for 64-bit arguments.
Subsequent arguments are passed onto the memory stack, which does
not exhibit the same behaviour and consequently do not allow this.
In practice this means that variadic functions taking pointers
and given NULL (without cast) work as long as the NULL is passed
in one of the first 8 arguments. A SIGSEGV is more likely the
result if such would be done for stack-based arguments. This is
due to the fact that the upper 4 bytes remain undefined.
2. All 64-bit platforms that FreeBSD supports, with the obvious
exception of ia64, allow 32-bit integral types (specifically NULL)
when 64-bit pointers are expected in variadic functions by way of
how the compiler generates code. As such, code that works correctly
(whether rightfully so or not) on any platform other than ia64, may
fail on ia64.
To more easily allow tweaking of the definition of NULL, this commit
removes the 12 definitions in the various headers and puts it in a
new header that can be included whenever NULL is to be made visible.
This commit fixes GNOME, emacs, xemacs and a whole bunch of ports
that I don't particularly care about at this time...
|
|
|
|
| |
strtok_r(). Merge conditional prototypes into the regular block.
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
called <machine/_types.h>.
o <machine/ansi.h> will continue to live so it can define MD clock
macros, which are only MD because of gratuitous differences between
architectures.
o Change all headers to make use of this. This mainly involves
changing:
#ifdef _BSD_FOO_T_
typedef _BSD_FOO_T_ foo_t;
#undef _BSD_FOO_T_
#endif
to:
#ifndef _FOO_T_DECLARED
typedef __foo_t foo_t;
#define _FOO_T_DECLARED
#endif
Concept by: bde
Reviewed by: jake, obrien
|
|
|
|
| |
PR: 37078
|
|
|
|
|
|
|
| |
<strings.h>, based on POSIX.1-2001's requirements.
o Add 'restrict' qualifier (spelled '__restrict') to functions in
<string.h>, as per C99 and POSIX.1-2001.
o Properly expose new POSIX.1-2001 functions in <string.h>.
|
|
|
|
|
|
| |
# This appears to not break X11, but I'm having problems compiling the
# glide part of the server with or without this patch, so I can't tell
# for sure.
|
|
|
|
|
| |
sterror_r() must not be declared in the C90/POSIX.1-1990 section.
Put it in the nonstandard section for now.
|
|
|
|
|
| |
Reviewed by: Mike Barcroft <mike@FreeBSD.org>
MFC after: 2 weeks
|
|
|
|
|
|
| |
- rev.1.6: corrupt tab before strlcpy.
- rev.1.7: "From: " in vendor id.
- rev.1.8: unsorted prototype for strccasestr.
|
| |
|
|
|
|
|
|
|
|
| |
number of characters that are searched. This is especially useful
with file operations and non-NUL terminated strings.
Silence from: -audit, -hackers
MFC after: 5 days
|
|
|
|
|
| |
Forgotten by: imp
Reported by: bde
|
|
|
|
| |
systems. NetBSD, Linux, SVR4 etc all have it.
|
| |
|
|
|
|
|
|
|
| |
defined. It has been fixed to not do that.
Submitted by: Jake Hamby <jehamby@lightside.com>
Closes PR: 1954
|
| |
|
|
|