| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
| |
|
|
|
|
|
|
|
|
|
| |
routines provide write-only stdio FILE objects that store their data in a
dynamically allocated buffer. They are a string builder interface somewhat
akin to a completely dynamic sbuf.
Reviewed by: bde, jilles (earlier versions)
MFC after: 1 month
|
|
|
|
|
|
|
|
|
| |
* Reopen the directory using openat(fd, ".", ...) instead of opening the
pathname again. This fixes a race condition where the meaning of the
pathname changes and allows a reopen with fdopendir().
* Always reopen the directory for union stacks, not only when DTF_REWIND
is passed. Applications should be able to fchdir(dirfd(dir)) and
*at(dirfd(dir), ...). DTF_REWIND now does nothing.
|
|
|
|
|
|
|
|
|
|
| |
example from bsearch(3) too, so that we don't have to duplicate
the example code in both places.
PR: docs/176197
Reviewed by: stefanf
Approved by: remko (mentor), gjb (mentor)
MFC after: 1 week
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
- Remove unused #include.
- Do not cast away const.
- Use the canonical idiom to compare two numbers.
- Use proper type for sizes, i.e. size_t instead of int.
- Correct indentation.
- Simplify printf("\n") to puts("").
- Use return instead of exit() in main().
Submitted by: Christoph Mallon, christoph.mallon at gmx.de
Approved by: gjb (mentor)
Reviewed by: stefanf
MFC after: 1 week
|
|
|
|
|
|
|
|
|
| |
qsort(3) can work together to sort an array of integers.
PR: docs/176197
Submitted by: Fernando, fapesteguia at opensistemas.com
Approved by: gjb (mentor)
MFC after: 1 week
|
|
|
|
|
|
|
| |
The brokenness of setbuf() is not specific to 4.2BSD and 4.3BSD but inherent
in the API definition.
Reported by: bde
|
|
|
|
|
| |
error case, the file exclusive lock is now released as soon as possible,
in previous code, child process can still hold the exclusive lock.
|
| |
|
|
|
|
| |
PR: kern/175674
|
| |
|
|
|
|
|
| |
Approved by: joel (mentor)
MFC After: 2 weeks
|
|
|
|
|
|
|
| |
a pointer to the end of the string, rather than NULL, if the character was
not found.
Approved by: theraven
|
|
|
|
|
|
|
|
| |
now disables read-ahead. It used to effectively restore the system default
readahead hueristic if it had been changed; a negative value now restores
the default.
Reviewed by: kib
|
|
|
|
|
|
|
|
|
|
| |
this is not a problem as they are resolved by libgcc. The exception is for
the __aeabi_mem* functions. These call back into libc to the appropriate
function. This causes issues for static binaries as we only link against
libc once so there is no way for it to call into libgcc and back.
The fix for this is to include these symbols in libc but keep them hidden
so binaries use the libgcc version.
|
|
|
|
|
|
|
|
| |
There are uncommon cases where fts_safe_changedir() may be called with a
non-NULL name that is not "..". Do not block or worse if an attacker put (a
(symlink to) a fifo or device where a directory used to be.
MFC after: 1 week
|
|
|
|
| |
MFC after: 3 days
|
|
|
|
| |
MFC after: 3 days
|
|
|
|
|
|
| |
PR: docs/174966
Submitted by: Christian Ullrich <chris+freebsd@chrullrich.net>
Approved by: bcr (mentor)
|
| |
|
|
|
|
| |
MFC after: 2 weeks
|
|
|
|
|
| |
Based on the submission by: jilles
MFC after: 2 weeks
|
|
|
|
|
|
|
|
|
| |
names, unnecessary casts)
- Change type of boolean variable from char to bool
Suggested by: jhb, zont, jmallett
Reviewed by: cognet
Approved by: cognet
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
with the user's namespace.
- Correct size and position variables type from long to size_t.
- Do not set errno to ENOMEM on malloc failure, as malloc already does so.
- Implement the concept of "buffer data length", which mandates what SEEK_END
refers to and the allowed extent for a read.
- Use NULL as read-callback if the buffer is opened in write-only mode.
Conversely, use NULL as write-callback when opened in read-only mode.
- Implement the handling of the ``b'' character in the mode argument. A binary
buffer differs from a text buffer (default mode if ``b'' is omitted) in that
NULL bytes are never appended to writes and that the "buffer data length"
equals to the size of the buffer.
- Remove shall from the man page. Use indicative instead. Also, specify that
the ``b'' flag does not conform with POSIX but is supported by glibc.
- Update the regression test so that the ``b'' functionality and the "buffer
data length" concepts are tested.
- Minor style(9) corrections.
Suggested by: jilles
Reviewed by: cognet
Approved by: cognet
|
|
|
|
|
|
|
|
| |
with the respective regression test.
See http://pubs.opengroup.org/onlinepubs/9699919799/functions/fmemopen.html
Reviewed by: cognet
Approved by: cognet
|
|
|
|
|
|
|
|
|
|
| |
but use normal references instead of weak. This makes the statically
linked binaries to use fast gettimeofday(2) by forcing the linker to
resolve references and providing the neccessary functions.
Reported by: bde
Tested by: marius (sparc64)
MFC after: 2 weeks
|
| |
|
| |
|
|
|
|
|
| |
The floating point functions are here rather than compiler-rt because the
libc softfloat code allows us to set the rounding mode.
|
| |
|
|
|
|
|
|
| |
in r7 and use ip to store the old version of r7 as it is not guaranteed to
be kept when calling a subroutine. The kernel will preserve the register
across system calls.
|
|
|
|
| |
provided by libgcc.
|
|
|
|
|
| |
Approved by: kib (mentor)
MFC after: 1 week
|
|
|
|
|
|
| |
version of vis.h.
Reported by: dim
|
|
|
|
|
| |
1.3 breaking the libc ABI. Revert that change (breaking the ABI again
for users who updated after December 18th).
|
|
|
|
|
| |
Requested by: Ben Morrow <ben__at__morrow.me.uk>
MFC after: 1 week
|
|
|
|
|
|
|
|
| |
getipnodebyname(1). RFC 2553 mentions IPv6 addresses
are returned 1st.
Spotted by: uqs
MFC after: 1 week
|
|
|
|
| |
shifting the lower 32bits of the floating point value when we demangle it.
|
|
|
|
| |
MFC after: 2 weeks
|
|
|
|
|
| |
Reviewed by: alphachi <alphachi mediaspirit.org>
MFC after: 2 weeks
|
|
|
|
|
| |
Approved by: kib (mentor)
MFC after: 1 week
|
|
|
|
|
|
|
|
|
|
| |
path longer than this.
- Fix an unreached case of check against sizeof buf, which in turn leads
to an off-by-one nul byte write on the stack. The original condition
can never be satisfied because the passed boundary is the maximum value
that can be returned, so code was harmless.
MFC after: 1 month
|
|
|
|
|
|
|
|
|
| |
NetBSD's. This output size limited versions of vis and unvis functions
as well as a set of vis variants that allow arbitrary characters to be
specified for encoding.
Finally, MIME Quoted-Printable encoding as described in RFC 2045 is
supported.
|
|
|
|
|
|
|
|
| |
PR: kern/173008
Submitted by: Zhihao Yuan <lichray@gmail.com>
Reviewed by: gabor
Approved by: cperciva (implicit)
MFC after: 1 week
|
|
|
|
|
|
|
|
|
| |
A fork/exec could happen between open and fcntl, leaking a file descriptor.
Using O_CLOEXEC fixes this and as a side effect simplifies the code.
NetBSD already had this (I checked this after making the change myself).
Reviewed by: gabor
|
| |
|
|
|
|
| |
These are obtained via fopen().
|
|
|
|
| |
These are obtained via fopen().
|
| |
|