| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
| |
Approved by: delphij (mentor)
|
|
|
|
|
|
|
| |
- style(9) nits
Pointed out by: jilles [1]
Approved by: delphij (mentor)
|
|
|
|
| |
Pointed out by: bde
|
|
|
|
| |
Approved by: delphij
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Continuous catopen() calls cause 4 failig stat(2) each, which means a lot
of overhead. It is also a good idea to keep the opened catalogs in the memory
to speed up further catopen() calls to the same catalog since these catalogs
are not big at all. In this case, we count references and only free() the
allocated space when the reference count reaches 0. The reads and writes to
the cache are syncronized with an rwlock when these functions are called from
a threaded program.
Requested by: kib
Approved by: delphij
|
|
|
|
|
|
|
|
|
|
|
| |
it type and endian clean and removing of stdio dependency from NLS
functions (catalog files now are processed via mmap())
Also following changes were done (against NetBSD version):
. If mmap() failed, set errno to EINVAL and do not try to munmap() file
Obtained from: NetBSD
|
|
|
|
| |
MFC After: 3 days
|
|
|
|
| |
lacking the issetugid() and utrace() syscalls.
|
|
|
|
| |
vocally objected to this safety belt.
|
|
|
|
|
|
|
| |
technique) so that we don't wind up calling into an application's
version if the application defines them.
Inspired by: qpopper's interfering and buggy version of strlcpy
|
|
|
|
| |
consumption.
|
| |
|
| |
|
|
|
|
| |
Our malloc sometimes forget to set errno, f.e. for size overflow case.
|
| |
|
|
|
|
|
| |
Try harder to not overwrite failure errno.
style(9) whitespace reformatting for code readability.
|
|
|
|
| |
I believe have made all of libc .c's as consistent as possible.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
adding (weak definitions to) stubs for some of the pthread
functions. If the threads library is linked in, the real
pthread functions will pulled in.
Use the following convention for system calls wrapped by the
threads library:
__sys_foo - actual system call
_foo - weak definition to __sys_foo
foo - weak definition to __sys_foo
Change all libc uses of system calls wrapped by the threads
library from foo to _foo. In order to define the prototypes
for _foo(), we introduce namespace.h and un-namespace.h
(suggested by bde). All files that need to reference these
system calls, should include namespace.h before any standard
includes, then include un-namespace.h after the standard
includes and before any local includes. <db.h> is an exception
and shouldn't be included in between namespace.h and
un-namespace.h namespace.h will define foo to _foo, and
un-namespace.h will undefine foo.
Try to eliminate some of the recursive calls to MT-safe
functions in libc/stdio in preparation for adding a mutex
to FILE. We have recursive mutexes, but would like to avoid
using them if possible.
Remove uneeded includes of <errno.h> from a few files.
Add $FreeBSD$ to a few files in order to pass commitprep.
Approved by: -arch
|
|
|
|
|
| |
PR: misc/21596
Submitted by: TOGAWA Satoshi <toga@puyo.org>
|
| |
|
| |
|
|
|
|
| |
Found by: ache
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* rewrite catopen() to remove duplicate code chunks and optimize
* if empty string is passed to catopen() as name argument then
catopen() will set errno to ENOENT (File not found), not EINVAL
* move search code to LOOKUP() macro to shrink amount of duplicated code
* move common resource freeing actions to __nls_free_resources() function
* exclude from build code related to MCLoadAll defintion since it is not
using at all
* style(9) related whitespace changes
Reviewed by: ache
|
|
|
|
|
| |
read() syscalls. It not cause static binary size increasing because stdio
already picked via setlocale() called from catopen()
|
| |
|
|
|
|
|
| |
Resort #include files
Remove SYSV compatibility chunks
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
| |
cosmetique, use NULL for pointers comparison
|
|
|
|
|
|
| |
argument in catopen().
Reviewed by: chris, -audit
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
just use _foo() <-- foo(). In the case of a libpthread that doesn't do
call conversion (such as linuxthreads and our upcoming libpthread), this
is adequate. In the case of libc_r, we still need three names, which are
now _thread_sys_foo() <-- _foo() <-- foo().
Convert all internal libc usage of: aio_suspend(), close(), fsync(), msync(),
nanosleep(), open(), fcntl(), read(), and write() to _foo() instead of foo().
Remove all internal libc usage of: creat(), pause(), sleep(), system(),
tcdrain(), wait(), and waitpid().
Make thread cancellation fully POSIX-compliant.
Suggested by: deischen
|
|
|
|
|
|
| |
points. For library functions, the pattern is __sleep() <--
_libc_sleep() <-- sleep(). The arrows represent weak aliases. For
system calls, the pattern is _read() <-- _libc_read() <-- read().
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
| |
Manpages cleanup
|
|
|
|
| |
Fix error return codes
|
|
|
|
| |
do not exist in NetBSD 1.3.
|
| |
|
|
|
|
|
|
| |
Plug failure memory leaks
Use issetugid now
PR: 3492
|
|
|
|
| |
Pointed out by: Everybody but Jordan.
|
|
|
|
|
|
| |
Fixes PR 2582
Submitted by: Julian Assange
|
| |
|
|
|
|
|
|
|
|
| |
This will make a number of things easier in the future, as well as (finally!)
avoiding the Id-smashing problem which has plagued developers for so long.
Boy, I'm glad we're not using sup anymore. This update would have been
insane otherwise.
|