This removes a lot of complexity, since we basically just reserve
space on a retrieval of a label, and pass around strings. Two new
elements: (1) consumers of the API must now declare what label
elements they are interested in retrieving, or (2) rely on the default
provided in a new configuration file, mac.conf.
Approved by: re
Obtained from: TrustedBSD Project
Sponsored by: DARPA, Network Associates Laboratories
to bring in the new MAC label management API. With the new API
revision, we have only policy-agnostic code in libc and the base
kernel.
Obtained from: TrustedBSD Project
Sponsored by: DARPA, Network Associates Laboratories
maximum number of bytes that may be stored in the array, not the maximum
number of wide characters to read. The wording of the standard unfortunately
does not make this clear.
the compatibility library libcompat.
- Add new implementations of lsearch() and lfind() which conform to
IEEE Std 1003.1-2001 to libc. Add a new manual page for them and
add them to the makefile.
- Add function prototypes for lsearch() and lfind() to the search.h
header.
page from the compatibility library.
- Add new implementations of insque() and remque() which conform to
IEEE Std 1003.1-2001 to libc. Add a new manual page for them and
connect them to the build.
- Add the prototypes of insque() and remque() to the search.h
header.
in the UDP RPC client code. As a side-effect, this fixes some bugs
that might prevent the RPC call from ever timing out for example
if the server keeps responding with the wrong xid. This could
probably be simplified further by using the EVFILT_TIMER filter.
(at least the French ones), a memory leak upon successful termination, a
pointer arithmetic error causing heap corruption, and an off-by-one bug
causing incorrect amounts of padding at the right of the value.
"UTF2" method. Although UTF-8 and the old UTF2 encoding are compatible
for 16-bit characters, the new UTF-8 implementation is much more strict
about rejecting malformed input and also handles the full 31 bit range
of characters.
international monetary values: int_p_cs_precedes, int_n_cs_precedes,
int_p_sep_by_space, int_n_sep_by_space, int_p_sign_posn, int_n_sign_posn.
This should not break existing binaries or LC_MONETARY data files.
Reviewed by: ache
MFC after: 1 month
and getipnodeby*() thread-safe.
Our res_*() is not thread-safe. So, we share lock between
getaddrinfo() and getipnodeby*(). Still, we cannot use
getaddrinfo() and getipnodeby*() in conjunction with other
functions which call res_*().
Requested by: many people
`sigprocmask', `sigaltstack', and `sigwait' as well as to the
prototypes of the apparantly unimplemented functions `sigtimedwait'
and `sigwaitinfo'. This complies with IEEE Std 1003.1-2001.
ceased to be useful when the number of "special processes" went from 3
to one per device. I considered replacing it with a "kernel threads"
section, but this seemed like the wrong place for that.
PR: 40969
doesn't do this, and it wouldn't be very useful if it did, since the
caller supplies us with that number.
PR: 41329
Submitted by: Michael Galassi <nerd@xyz.com>
Although there was nothing wrong with getwc() and putwc(), getwchar()
and putwchar() assumed that <stdio.h> had been included before <wchar.h>,
which is not allowed by the standard.
va_end closer to the __vfprintf() call, free the buffer when __vfprintf()
fails and don't bother trying to shrink the buffer with realloc() before
returning it.
Submitted by: bde
- Sort local variable declarations.
- Protect a hand-formatted comment from indent(1).
- Use portable casts, even though this is machine-dependant code.
- Remove extraneous blank lines.
- Remove trailing newline.
- Use sigdelset(3), not SIGDELSET(9).
Requested by: bde
Use the correct constants directly from sysconf() rather than calling
sysctl() to tell us the (still compiled-in) value. Leave the CTL_POSIX1B
stuff alone for now (but I'd like to see this replaced with a single
structure returning all of the relevant information).
Implement all of the keys from 1003.1-2001 that we can. Ensure that
the build will break if someone redefines an option constant to zero
without implementing the necessary presence-detection logic here.
(4 of 5)
hack, thereby allowing future extensions to the structure (e.g., for extended
attributes) without rebreaking the ABI. FTSENT now contains a pointer to the
parent stream, which fts_compar() can then take advantage of, avoiding the
undefined behavior previously warned about. As a consequence of this change,
the prototype of the comparison function passed to fts_open() has changed
to reflect the required amount of constness for its use. All callers in the
tree are updated to use the correct prototype.
Comparison functions can now make use of the new parent pointer to access
the new stream-specific private data pointer, which is intended to assist
creation of reentrant library routines which use fts(3) internally.
Not objected to in spirit by: -arch
and wide characters. These were already documented in the manual page,
with an entry mentioning that they were not implemented yet. The XSI
%S and %C synoyms have not been added.
or "POSIX", other European locales). Use __sgetc() and __sputc() where
possible to avoid a wasteful lock and unlock for each byte and to avoid
function call overhead.
get applications to move to the ISO C interfaces as well as have the
freedom to replace the rune interfaces with ones that support stateful
conversions some time in the future.
here in terms of mbrtowc(), wcrtomb(), and the single-byte I/O functions.
The rune I/O functions are about to become deprecated in favour of the
ones provided by ISO C90 Amd. 1 and C99.
under way to move the remnants of the a.out toolchain to ports. As the
comment in src/Makefile said, this stuff is deprecated and one should not
expect this to remain beyond 4.0-REL. It has already lasted WAY beyond
that.
Notable exceptions:
gcc - I have not touched the a.out generation stuff there.
ldd/ldconfig - still have some code to interface with a.out rtld.
old as/ld/etc - I have not removed these yet, pending their move to ports.
some includes - necessary for ldd/ldconfig for now.
Tested on: i386 (extensively), alpha
KAME did the modification only to _dns_getaddrinfo(). However,
it is not sufficient, and res_queryN() should be modified, too.
So, I did same modification to res_queryN().
Obtained from: KAME
insure enough space is available for the response, or be prepared
to resize the buffer and retry as necessary.
Do the conservative thing and make sure enough space is available.
Reviewed by: silence on freebsd-audit
When it is called directly, gcc is smart enough to generate inline
code for it, which is why it wasn't noticed before that it was missing.
fabs() would probably better fit into libm, but it has traditionally been
in libc on FreeBSD, so there is probably software around that makes
assumptions about this by now.
of pointers to strings. These two arrays were fixed to the same size, but one
had an implicit zeroed trailer element, which was unused because the size was
used up by the ones before said zeroed trailer element. So the unused limb was
chopped off the over-sized-but-not-over-sized array, and everyone lived happily
ever after.
instead of on startup. This fixes binary compatibility of dynamically
linked binaries from before the signal code move.
Suggested by: wollman (a long time ago)
than 32 bits. It was trying to figure out things like the day of week
of when time_t is roughly 2^62 etc. Make a better guess for the starting
point for the binary search that works on both 32 and 64 bit types. I have
been using this for a while now.
bcopy(3) functions are prototyped in <strings.h> and not in
<string.h> anymore.
- Add a sentence about that to the respective HISTORY sections.
In the C source files:
- Include <string.h> or <strings.h> depending on what function
is to be compiled.
- Use ANSI-C function definitions.
.In string.h
with
.In strings.h
and adding a sentence to the HISTORY section.
- Use an ANSI-C function definition.
- Include <strings.h> instead of <string.h>.
- Apply style(9): Put a space after return keywords.
in the ANSI-C format.
- Change the code a bit to hopefully save some cycles.
I.e. (simplified) change
a = b + 1;
while (--b & 0x7)
/* ... */
to
a = b;
for (; b & 0x7; b--)
/* ... */
and
while (--a >= 0)
/* ... */
to
for (; a > 0; a--)
/* ... */
- Equip two function arguments of swab() with the 'restrict'
type qualifier in form of the '__restrict' macro. This is
specified by POSIX.1-2001.
<strings.h> as the associated header file.
The prototypes have been moved there from <string.h> because
POSIX.1-2001 said so.
- Conditionally include either <strings.h> or <string.h> based
on whether the [r]index() or str[r]chr() functions are
compiled, respectively.
- Style(9) tells us to
- put a space after the return keyword
- to check for a NUL character without using the ! operator.
- use NULL instead of (type *)NULL where the compiler knows
the type.
Apply these rules.
- Rather use ANSI-C function definitions than K&R ones.
- For index(3), correct second function argument's type; it was
declared to be a `const char' before and is now an `int'.
is <strings.h> and not <string.h> anymore.
- Tell the reader about this change in the HISTORY section.
- Switch to use an ANSI-C function definition.
- Include <strings.h> instead of <string.h> in the source file.
the prototypes for both functions are now in the <strings.h>
header, as required by IEEE Std 1003.1-2001.
- Add one sentence about that in the HISTORY section.
- Include <strings.h> in the source file to have the prototypes
in scope when the _ANSI_SOURCE macro is defined.
to fail needlessly if a reverse DNS lookup of the IP address didn't
come up with a hostname. As a comment in the code clearly stated,
the "damn hostname" was looked up only for the purpose of netgroup
matching. But if that lookup failed, the function bailed out
immediately even though in many cases netgroup matching would not
be used.
This change marks the hostname as unknown but continues. Where
netgroup matching is performed, an unknown hostname is handled
conservatively. I.e., for "+@netgroup" (accept) entries an unknown
hostname never matches, and for "-@netgroup" (reject) entries an
unknown hostname always matches.
In the lines affected (only), I also fixed a few bogus casts. There
are others, and in fact this entire file would be a good candidate
for a cleanup sweep.
Reviewed by: imp (wearing his flourescent yellow Security Team cap)
MFC after: 2 days
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