| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This structure is not part of POSIX. According to POSIX, gettimeofday()
has the following prototype:
int gettimeofday(struct timeval *restrict tp, void *restrict tzp);
Also, POSIX states that gettimeofday() shall return 0 (as long as tzp is
not used). Remove dead error handling code. Also use NULL for a
nul-pointer instead of integer 0.
While there, change all pieces of code that only use tv_sec to use
time(3), as this provides less overhead.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
We especifically ignored the glibc compatibility changes
but this should help interaction with Solaris and Linux.
____
Fixed infinite loop in svc_run()
author Steve Dickson
Tue, 10 Jun 2008 12:35:52 -0500 (13:35 -0400)
Fixed infinite loop in svc_run()
____
__rpc_taddr2uaddr_af() assumes the netbuf to always have a
non-zero data. This is a bad assumption and can lead to a
seg-fault. This patch adds a check for zero length and returns
NULL when found.
author Steve Dickson
Mon, 27 Oct 2008 11:46:54 -0500 (12:46 -0400)
____
Changed clnt_spcreateerror() to return clearer
and more concise error messages.
author Steve Dickson
Thu, 20 Nov 2008 08:55:31 -0500 (08:55 -0500)
____
Converted all uid and gid variables of the type uid_t and gid_t.
author Steve Dickson
Wed, 28 Jan 2009 12:44:46 -0500 (12:44 -0500)
____
libtirpc: set r_netid and r_owner in __rpcb_findaddr_timed
These fields in the rpcbind GETADDR call are being passed uninitialized
to CLNT_CALL. In the case of x86_64 at least, this usually leads to a
segfault. On x86, it sometimes causes segfaults and other times causes
garbage to be sent on the wire.
rpcbind generally ignores the r_owner field for calls that come in over
the wire, so it really doesn't matter what we send in that slot. We just
need to send something. The reference implementation from Sun seems to
send a blank string. Have ours follow suit.
author Jeff Layton
Fri, 13 Mar 2009 11:44:16 -0500 (12:44 -0400)
____
libtirpc: be sure to free cl_netid and cl_tp
When creating a client with clnt_tli_create, it uses strdup to copy
strings for these fields if nconf is passed in. clnt_dg_destroy frees
these strings already. Make sure clnt_vc_destroy frees them in the same
way.
author Jeff Layton
Fri, 13 Mar 2009 11:47:36 -0500 (12:47 -0400)
Obtained from: Bull GNU/Linux NFSv4 Project
MFC after: 3 weeks
|
|
|
|
|
|
| |
PR: docs/170380
Submitted by: Garrett Cooper <yanegomi@gmail.com>
Approved by: joel (mentor)
|
| |
|
| |
|
|
|
|
| |
-1 on error.
|
|
|
|
|
|
|
|
| |
for process, thread or others we want to support.
Use the syscall to implement POSIX API clock_getcpuclock and
pthread_getcpuclockid.
PR: 168417
|
|
|
|
|
| |
Reviewed by: ache
MFC after: 3 days
|
|
|
|
| |
Handle TLS for ARMv6 and ARMv7
|
|
|
|
|
|
|
|
|
|
|
| |
On Windows, AUX is the auxiliary device, usually pointing to COM1.
Therefore it is forbidden to create a file named aux.c. To make it a bit
easier for Windows users to check out our source code, rename this file
to auxv.c.
MFC after: 1 month
Discussed with: kib
Suggested by: Eric van Gyzen <eric vangyzen net>
|
|
|
|
| |
Formerly, loops caused nftw() to abort the traversal with ELOOP.
|
|
|
|
| |
the same file.
|
|
|
|
|
|
|
|
|
|
| |
Apart from the fact that nothing should have OPEN_MAX as a limit (as opposed
to RLIMIT_NOFILE from getrlimit() or _SC_OPEN_MAX from sysconf()), POSIX
does not require us to check this. POSIX does have a requirement on the
application that maxfds not exceed {OPEN_MAX}, but does not require the
implementation to check it ("may fail").
PR: 95239
|
|
|
|
|
|
|
|
|
| |
Apart from the fact that nothing should have OPEN_MAX as a limit (as opposed
to RLIMIT_NOFILE from getrlimit() or _SC_OPEN_MAX from sysconf()), POSIX
does not require us to check this.
PR: 95239
Submitted by: Todd Miller
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
- lib/libc/locale/islower.3
- lib/libc/locale/ispunct.3
- lib/libc/locale/nl_langinfo.3
- lib/libc/locale/isgraph.3
- lib/libc/locale/isspace.3
Reviewed by: bz
Approved by: theraven
MFC after: 5 days
|
|
|
|
|
|
|
| |
Since r142667 strerror has unconditionally returned a pointer to a
static buffer.
MFC after: 1 week
|
|
|
|
| |
MFC after: 1 week
|
|
|
|
| |
while here.
|
|
|
|
|
| |
Reviewed by: theraven
MFC after: 1 week
|
|
|
|
|
|
|
|
| |
wctype.h, iswalnum_l(3). Add it and its functions to the Makefile.
Reviewed by: gavin, jilles
Approved by: theraven
MFC after: 5 days
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Append '__' prefix to the tag of struct oflock, and put it under BSD
namespace. Structure is needed both by libc and kernel, thus cannot be
hidden under #ifdef _KERNEL.
Move a set of non-standard F_* and O_* constants into BSD namespace.
SUSv4 explicitely allows implemenation to pollute F_* and O_* names
after fcntl.h is included, but it costs us nothing to adhere
to the specification if exact POSIX compliance level is requested by
user code.
Change some spaces after #define to tabs.
Noted by and discussed with: bde
MFC after: 1 week
|
|
|
|
|
|
| |
F_DUPFD to make it less confusing, at least for me.
MFC after: 1 week
|
|
|
|
|
|
| |
policy is installed.
MFC after: 1 week
|
| |
|
|
|
|
|
| |
Obtained from: DragonFly BSD
MFC after: 2 weeks
|
|
|
|
|
|
|
|
| |
put initially. They were added to head during development of 10-CURRENT, not
9-CURRENT.
Submitted by: glebius
Reviewed by: kib
|
|
|
|
| |
PR: 169730
|
|
|
|
|
|
| |
xlocale refactoring.
MFC after: 1 week
|
|
|
|
|
|
|
| |
single use.
Sponsored by: DARPA, AFRL
MFC after: 3 days
|
|
|
|
|
|
|
|
|
| |
This method is more sandbox-friendly and also should be faster as only
one syscall is needed instead of three.
In case of an error fall back to the old method.
Reviewed by: simon, gleb
MFC after: 2 weeks
|
|
|
|
|
|
| |
Change argument type from 'const unsigned char *' to 'const char *'.
MFC after: 2 weeks
|
|
|
|
|
|
|
| |
The function isascii_l() is not in POSIX even though isascii() is,
probably because isascii() is marked as obsolete. The other functions,
like digittoint_l() and ishexnumber_l(), are FreeBSD-specific just like
their non-_l versions.
|
|
|
|
|
|
| |
value if present.
MFC after: 1 week
|
| |
|
|
|
|
|
|
|
|
|
|
| |
Makefiles:
- libc/stdtime/strftime.3
- libc/stdtime/strptime.3
- libc/stdlib/strfmon.3
Reviewed by: theraven
Approved by: gabor (mentor)
|
|
|
|
|
|
|
|
|
| |
The use of assertions in libraries is not widely accepted.
Requested by: bde, scottl
Approved by: cperciva
MFC after: 3 days
X-MFC-With: r237286
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
clock_gettime(2) functions if supported. The speedup seen in
microbenchmarks is in range 4x-7x depending on the hardware.
Only amd64 and i386 architectures are supported. Libc uses rdtsc and
kernel data to calculate current time, if enabled by kernel.
Hopefully, this code is going to migrate into vdso in some future.
Discussed with: bde
Reviewed by: jhb
Tested by: flo
MFC after: 1 month
|
|
|
|
|
|
|
|
| |
relevant Makefile.
Reminded by: gavin
Approved by: gabor (mentor)
MFC after: 5 days
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
- libc/string/strcoll.3
- libc/string/strstr.3
- libc/string/strxfrm.3
- libc/string/strcasecmp.3
Reviewed by: theraven, gabor
Approved by: gabor (mentor)
MFC after: 5 days
|
|
|
|
|
|
|
|
|
|
| |
Add a sanity check for the validity of the passed fd.
PR: kern/139080 [1]
Submitted by: Andrey Simonenko <simon@comsys.ntu-kpi.kiev.ua> [1]
Reviewed by: pjd (briefly)
Approved by: cperciva
MFC after: 1 week
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
First, extend the changes in r230782 to better handle the common case
of using NOREUSE with sequential reads. A NOREUSE file descriptor
will now track the last implicit DONTNEED request it made as a result
of a NOREUSE read. If a subsequent NOREUSE read is adjacent to the
previous range, it will apply the DONTNEED request to the entire range
of both the previous read and the current read. The effect is that
each read of a file accessed sequentially will apply the DONTNEED
request to the entire range that has been read. This allows NOREUSE
to properly handle misaligned reads by flushing each buffer to cache
once it has been completely read.
Second, apply the same changes made to read(2) by r230782 and this
change to writes. This provides much better performance in the
sequential write case as it allows writes to still be clustered. It
also provides much better performance for misaligned writes. It does
mean that NOREUSE will be generally ineffective for non-sequential
writes as the current implementation relies on a future NOREUSE
write's implicit DONTNEED request to flush the dirty buffer from the
current write.
MFC after: 2 weeks
|
| |
|
|
|
|
| |
MFC after: 3 days
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
string buffer for each linelist l_line into one large string. Since
linelists parsed out during the previous passes store the pointers to
previously allocated l_lines, the reallocation caused undefined
behaviour on accessing the buffers, and quite deterministic fault on
freeing them (in mountd(8) startup).
This fixes reading of netgroup(5) file which contains more then one
netgroup.
Discussed with: ghelmer
MFC after: 3 days
|
|
|
|
| |
Obtained from: OpenBSD
|
|
|
|
|
|
| |
belongs in FBSD_1.3.
MFC after: 1 week
|
|
|
|
|
|
| |
PR: kern/169023
Submitted by: Jukka Ukkonen <jau iki fi>
MFC after: 1 week
|