| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
| |
Fix harmless but related bugs in %_$zd and %_$tu.
PR: 131880
MFC after: 1 week
|
|
|
|
| |
to be relevant to FreeBSD at all.
|
|
|
|
|
|
| |
a release, I think there's no impact here...
Reviewed by: cognet@
|
|
|
|
|
|
|
|
|
| |
When calling setttyent() after calling endttyent(), pts_valid will never
be set to 1, because the readdir()-loop will likely never vind a pts
that has a higher number than before.
Simplify the code by removing pts_valid. We'll just set maxpts to -1
when we don't have a valid count yet.
|
|
|
|
|
|
|
| |
It seems ttyslot() calls rindex(), to strip the device name to the last
slash, but this is obviously invalid. /dev/pts/0 should be stripped
until pts/0. Because /etc/ttys only supports TTY names in /dev/, just
strip this piece of the pathname.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
A more elegant way of obtaining a name of a character device by its file
descriptor on FreeBSD, is to use the FIODGNAME ioctl. Because a valid
file descriptor implies a file descriptor is visible in /dev, it will
always resolve a valid device name.
I'm adding a more friendly wrapper for this ioctl, called fdevname(). It
is a lot easier to use than devname() and also has better error
handling. When a device name cannot be resolved, it will just return
NULL instead of a generated device name that makes no sense.
Discussed with: kib
|
|
|
|
|
|
| |
PR: bin/127591
Submitted by: "Eugene M. Kim" <20080111.freebsd.org__at__ab.ote.we.lv>
MFC after: 1 week
|
|
|
|
|
|
|
|
|
|
| |
stating that in FreeBSD the atol() and atoll() functions affect
errno in the same way as strtol() and stroll().
PR: docs/126487
Submitted by: edwin
Reviewed by: trhodes, gabor
MFC after: 1 week
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
return zero on success and an error code otherwise. The possible errors
are EADDRNOTAVAIL if an address being checked for doesn't match the
prison, and EAFNOSUPPORT if the prison doesn't have any addresses in
that address family. For most callers of these functions, use the
returned error code instead of e.g. a hard-coded EADDRNOTAVAIL or
EINVAL.
Always include a jailed() check in these functions, where a non-jailed
cred always returns success (and makes no changes). Remove the explicit
jailed() checks that preceded many of the function calls.
Approved by: bz (mentor)
|
|
|
|
| |
from the ANSI-C prototype due to the 'int promotion' rule.
|
|
|
|
|
|
| |
- use nul when we are looking for a terminating character where appropriate
Approved by: imp
|
|
|
|
| |
Approved by: kib (mentor)
|
|
|
|
|
| |
PR: docs/129400
Submitted by: Gavin Atkinson <gavin@freebsd.org>
|
|
|
|
|
| |
PR: 100242
Reviewed by: jhb
|
|
|
|
| |
Submitted by: keramida and jhb
|
|
|
|
| |
Noticed by: bde
|
| |
|
|
|
|
|
|
|
|
|
| |
the EOF indicator, fseek() may also be used for this.
Bump document date.
PR: 76333
Submitted by: Yoshihiko Sarumaru <mistral@imasy.or.jp>
|
|
|
|
|
|
|
|
| |
- Use the correct term 'long mode'. [2]
- style(9) for return value. [3]
Submitted by: Ben Kaduk <minimarmot gmail com> [1],
obrien [2], scf [3]
|
|
|
|
|
|
|
|
|
| |
reducing branches and doing word-sized operation.
The idea is taken from J.T. Conklin's x86_64 optimized version of strlen(3)
for NetBSD, and reimplemented in C by me.
Discussed on: -arch@
|
|
|
|
|
|
|
|
| |
The integer thousands' separator code is rewritten in order to
avoid having to preallocate a buffer for the largest possible
digit string with the most possible instances of the longest
possible multibyte thousands' separator. The new version inserts
thousands' separators for integers using the same code as floating point.
|
|
|
|
|
| |
A forthcoming gdtoa import is needed to make this fully work.
- Improve the way "nan(...)" is parsed.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
sets up a fake buffered FILE and then effectively calls itself
recursively. Unfortunately, gcc doesn't know how to do tail call
elimination in this case, and actually makes things worse by
inlining __sbprintf(). This means that f[w]printf() to stderr was
allocating about 5k of stack on 64-bit platforms, much of which was
never used.
I've reorganized things to eliminate the waste. In addition to saving
some stack space, this improves performance in my tests by anywhere
from 5% to 17% (depending on the test) when -fstack-protector is
enabled. I found no statistically significant performance difference
when stack protection is turned off. (The tests redirected stderr to
/dev/null.)
|
|
|
|
| |
reduces the code size by about 10% and improves performance slightly.
|
|
|
|
|
| |
Submitted by: christoph.mallon at gmx.de
Approved by: kib (mentor)
|
|
|
|
|
|
|
|
| |
to get rid of restrict qualifier discarding. This lets libc compile
cleanly in gnu99 mode.
Suggested by: kib, christoph.mallon at gmx.de
Approved by: kib (mentor)
|
|
|
|
|
| |
vfprintf.c and vfwprintf.c (except for char/wchar_t differences) to a
common header file.
|
|
|
|
|
|
|
|
|
|
|
| |
slightly less evil inline functions, and move the buffering state into
a struct. This will make it possible for helper routines to produce
output for printf() directly, making it possible to untangle the code
somewhat.
In wprintf(), use the same buffering mechanism to reduce diffs to
printf(). This has the side-effect of causing wprintf() to catch write
errors that it previously ignored.
|
|
|
|
|
|
|
| |
FreeBSD 7.1
Submitted by: Jan Henrik Sylvester <me janh de>
MFC after: 3 days
|
|
|
|
|
|
|
|
| |
- fix struct memeber's name [1]
PR: docs/130413 [1]
Submitted by: Thomas Mueller <tmueller@sysgo.com> [1]
MFC after: 3 days
|
|
|
|
|
|
| |
o Use an ISC-style license as did by the author.
Obtained from: OpenBSD
|
|
|
|
|
|
| |
o Use ISC style copyright as did by the author.
Obtained from: OpenBSD
|
| |
|
|
|
|
|
| |
PR: 127335
MFC after: 2 weeks
|
|
|
|
|
|
|
| |
PR: kern/103464
Submitted by: brueffer (correct markup)
Reviewed by: brueffer
MFC after: 2 weeks
|
| |
|
|
|
|
| |
- the support of AI_ALL and AI_V4MAPPED has been completely removed.
|
|
|
|
|
| |
PR: 127890
Reviewed by: rwatson
|
|
|
|
| |
PR: 125639
|
|
|
|
|
|
|
|
|
| |
FPA floating-point format is identical to the VFP format,
but is always stored in big-endian.
Introduce _IEEE_WORD_ORDER to describe the byte-order of
the FP representation.
Obtained from: Juniper Networks, Inc
|
|
|
|
|
|
|
|
| |
override the use of the rsh(1) program in rcmd(3).
PR: docs/51133
Obtained from: NetBSD, partially
MFC after: 3 weeks
|
|
|
|
|
|
|
|
|
|
| |
It includes the following fix:
2426. [bug] libbind: inet_net_pton() can sometimes return the
wrong value if excessively large netmasks are
supplied. [RT #18512]
Reported by: Maksymilian Arciemowicz <cxib__at__securityreason.com>
|
| |
|
|
|
|
| |
middle of vfprintf's variable declarations.
|
| |
|
|
|
|
|
|
|
|
| |
Copyright attribution is kept the same as in original NetBSD source.
Submitted by: Florian Smeets <flo kasimir com>
Obtained from: NetBSD
MFC after: 2 weeks
|
|
|
|
|
| |
Submitted by: Florian Smeets <flo kasimir com>
MFC after: 2 weeks
|
|
|
|
| |
Reviewed by: trasz
|