christos
8de47c09e3
- do some CSE.
...
- pass lint
2007-10-19 19:28:57 +00:00
yamt
b79fded28d
use mremap for huge -> huge realloc.
...
fix PR/31425 (Nicolas Joly) and possibly PR/36175 (Brian de Alwis).
2007-10-16 15:12:16 +00:00
ad
9c3109d6c5
Add _SC_NPROCESSORS_ONLN and _SC_NPROCESSORS_CONF for sysconf(). These
...
are extensions but are provided by many Unix systems.
2007-10-15 14:12:54 +00:00
yamt
89aa62f9b2
we don't have reallocf.
2007-10-15 11:18:44 +00:00
yamt
687cd24ebe
make lint happy.
2007-10-15 10:30:56 +00:00
yamt
1277f9b0a0
malloc_print_stats: print huge_allocated correctly. it's already in bytes.
2007-10-15 10:28:10 +00:00
yamt
14bfffc9db
use MAP_ALIGNED.
2007-10-15 00:05:00 +00:00
rmind
25e540085b
Add cancellation stubs in libpthread for POSIX messages queues and
...
asynchronous I/O.
OK by <ad>.
2007-10-09 18:18:33 +00:00
ad
3465d8db6f
Add defs for hppa. From he@.
2007-10-09 00:59:52 +00:00
uwe
a34b3f871d
In handwritten asm use -fPIC code instead of -fpic, our libc has grown
...
large enough for GOT to be larger than 8k.
While here kill redundant PIC ifdefs in setjmp.S - sparc "call"
instruction is piccy by itself.
Tested by martin@
2007-10-08 13:06:00 +00:00
he
7ed9cc8edd
On sparc64, both __sparc__ and __sparc64__ is defined. Avoid redefinition
...
of size constants for sparc64.
This code still produces many, many lint warnings due to "may loose accuracy"
when mixing long/int, and also warnings related to <<.
2007-10-07 21:45:18 +00:00
ad
81e619b9a4
Update for jemalloc.
2007-10-06 01:09:48 +00:00
ad
9b64888c5d
Use jemalloc as the default allocator unless USE_JEMALLOC=no.
2007-10-06 01:09:07 +00:00
ad
e7a9e46b7e
Port to NetBSD. Note: posix_memalign() is here, but it's not exported
...
via the headers yet.
2007-10-05 23:42:23 +00:00
ad
8a475bcba1
Pull in jemalloc from FreeBSD:
...
FreeBSD: src/lib/libc/stdlib/malloc.c,v 1.147 2007/06/15 22:00:16 jasone Exp
2007-10-05 23:39:58 +00:00
tnozaki
fc34dcfbb7
s/__attribute__((__packed__))/__packed/g;
2007-09-29 08:10:17 +00:00
tnozaki
059d600590
1. add workaround for ctype.h is* funcs problem.
...
isspace((int)0xA0) should return false under LC_CTYPE=en_US.UTF-8,
see: http://www.freebsd.org/cgi/query-pr.cgi?pr=116363&cat=gnu
2. change __runtable_to_netbsd_ctype() as reentrant.
patch ok'ed by tshiozak-san, thanks!
2007-09-29 07:55:45 +00:00
christos
f1f2d5a365
make this compilable from rtld.
2007-09-27 17:53:05 +00:00
tnn
aa8a5e0d63
remove extraneous "has"
2007-09-25 09:42:51 +00:00
tnozaki
0941b12b16
lib/36938 mbtowc misbehaving after invalid char sequence
...
- make sure to initialize mbtowc's internal state.
- add regression test.
2007-09-18 15:12:07 +00:00
rmind
2cecf9bbe9
Implementation of POSIX message queues.
...
Reviewed by: <ad>, <tech-kern>
2007-09-07 18:56:02 +00:00
jnemeth
8e9c7dbf0c
PR/36933 - Robert Elz -- ARPA IPv6 -> IPv6
2007-09-06 09:32:52 +00:00
drochner
dce09ea075
clean up some definitions around rune_t which are not needed anymore
2007-09-03 20:31:56 +00:00
perry
e34be9798b
Never use "utilize". It means exactly the same thing as "use", but it
...
is longer and more cumbersome. It can always be replaced with "use"
without any change in meaning.
2007-08-20 16:07:05 +00:00
he
fd961c4429
Add a new socket option for unix domain sockets: LOCAL_PEEREID, to make
...
it possible to get the pid, euid and egid of the process at the remote
end at the time it did bind() or connect().
Add a new libc function, getpeereid() to easily get at the euid and egid.
As a consequence, bump libc's minor number.
Document the LOCAL_PEEREID socket option in unix(4).
Based on contribution by Arne H. Juul, minor modifications by myself.
2007-08-09 15:23:01 +00:00
kristerw
3a6ef3e3c1
Keep track of atexit functions that are added while processing
...
atexit functions, to ensure that the new functions will be called.
2007-08-08 01:05:34 +00:00
kristerw
af220472c9
Ensure that the struct atexit_handler has been removed from the list
...
of pending atexit handlers before the structure is reused. This prevents
__cxa_finalize from going into an infinite loop when an atexit handler
register a new atexit handler as in:
#include <stdlib.h>
void two(void) {
}
void one(void) {
atexit(two);
}
int main(void) {
atexit(one);
return 0;
}
2007-08-08 00:51:18 +00:00
ad
c3f8e2ee55
Change the signature of _lwp_park() to accept an lwpid_t and second
...
hint pointer, but do so in a way that remains compatible with older
pthread libraries. This can be used to wake another thread before the
calling thread goes asleep, saving at least one syscall + involuntary
context switch. This turns out to be a fairly large win on the condvar
benchmarks that I have tried.
2007-08-07 19:04:21 +00:00
kristerw
d0d36b6101
Update includes so that this builds for USE_FORT=no too.
2007-08-04 19:37:52 +00:00
wiz
5ad579abd9
Explicitly talk about file pointers (to avoid confusion with general C pointers).
...
Suggested by joerg.
Bump date.
2007-08-02 23:46:39 +00:00
wiz
e3d3393d01
Add xref to shquote(3), suggested by joerg. Bump date.
2007-08-02 23:45:10 +00:00
ginsbach
f5f9bb5739
Make sure that %r honors the LC_TIME t_fmt_ampm. This restores
...
functionality lost at revision 1.12!
2007-07-31 20:19:16 +00:00
yamt
8a52d96235
add a comment.
2007-07-20 12:41:07 +00:00
christos
f65c16a601
forgot include namespace.h
2007-07-19 12:05:42 +00:00
wiz
4213bf340c
Uppercase logical OR operator.
2007-07-18 23:34:23 +00:00
dsl
9145137adc
Fix the return value so the MNT_GETARGS returns 0, not the buffer length.
2007-07-18 20:10:47 +00:00
christos
fede0a77fc
kill MFSNAMELEN
2007-07-17 20:03:10 +00:00
joerg
e4fc1154a4
Add native mremap system call based on the UVM implementation for
...
Linux compat. Add code to enforce alignment of the new location.
Special thanks to wizd for helping with the man page.
2007-07-17 17:42:07 +00:00
dsl
8f51f1bf76
Document the new 'data_len' argument.
...
Remove references to nfs export args and xref nfssvc(2) instead.
Change text to allow for other fs types.
2007-07-14 18:24:08 +00:00
dsl
b2dd7438f9
Change beacuse of extra parameter to mount(2).
2007-07-14 16:09:48 +00:00
dsl
4d09898946
Change libc system callstub from 'mount' to '__mount50', add compat call.
2007-07-14 15:53:04 +00:00
ginsbach
15b661abe9
Fix several end cases:
...
o If a long option looks like an ambiguous abbreviation of two or more long
options, but all the possible interpretations would return the same
value, then just return that value without complaining that it's
ambiguous.
o If a long option could be interpreted either as an exact match for one
long option, or as an abbreviation for one or more other long options,
then treat it as the exact match.
These changes align NetBSD's getopt_long(3) with the current behavior of
GNU getopt_long(3), the de facto standard, and FreeBSD's getopt_long(3).
2007-07-05 16:05:40 +00:00
nakayama
0c74dffd74
Add strndup(3) to libnbcompat, since estrndup(3) added into efun.c calls it.
2007-07-03 12:11:09 +00:00
ginsbach
a3ae2738c9
Document that getopt_long(3) can and will accept unique abbreviated long
...
option names. This feature has been present since getopt_long(3) was first
released in NetBSD 1.5. This is also standard GNU getopt_long(3) behavior.
2007-07-02 17:56:17 +00:00
christos
7b1793900f
make this compile without INET6 (Scott Ellis)
2007-06-29 15:53:21 +00:00
christos
2f53e821af
Since we are going to be looking for ports many times, use a centralized
...
servent data structure and pass the stayopen hint.
2007-06-23 17:32:08 +00:00
ginsbach
2f41073256
Follow the example of other nbtool compat functions, like dirname, and
...
don't create if it is determined that the system in question doesn't need
them. This cleans up build warnings on systems with err.h (HAVE_ERR_H)
for example Mac OS X 10.3.
2007-06-18 14:13:54 +00:00
christos
cc32d5a569
Note ZFS returning the number of entries instead of the size of the directory.
2007-06-10 01:21:53 +00:00
christos
7a5ce90a9f
PR/36464: scandir(3) corrupts heap when run on ZFS directories because ZFS
...
returns the number of entries as the directory size.
Use a new, more conservative entries estimator.
2007-06-09 23:57:25 +00:00
christos
a9df04f00d
bring in many changes from FreeBSD
2007-06-09 18:51:19 +00:00