martin
a5ad420211
Use sigqueueinfo() instead of raise() to generate exceptions. Provide
...
minimalistic siginfo data.
2011-03-04 11:48:58 +00:00
wiz
9e76b48586
Merge EINVAL descriptions; sort errors alphabetically; bump date.
2011-02-28 07:17:02 +00:00
dholland
4669b00fb3
Improve discussion of alignment and rounding per PR 33527.
2011-02-28 04:03:00 +00:00
christos
ebc56329ec
Add <stdint.h> for uint8_t from Jess Thrysoee
2011-02-27 01:53:22 +00:00
njoly
51cca89d16
Switch from floating point to fixed point integer for run sizes maths.
...
From FreeBSD (part of revision 1.154).
2011-02-26 23:27:49 +00:00
pooka
74ed8d21f3
fix my whitespace copypaste
2011-02-25 11:55:28 +00:00
pooka
ba7613308e
Fix LE softfloat (mostly theoretical) and comment.
...
from Alessandro Forin
2011-02-25 11:53:07 +00:00
joerg
1631a78097
Allow storing and receiving the LWP private pointer via ucontext_t
...
on all platforms except VAX and IA64. Add fast access via register for
AMD64, i386 and SH3 ports. Use this fast access in libpthread to replace
the stack based pthread_self(). Implement skeleton support for Alpha,
HPPA, PowerPC, SPARC and SPARC64, but leave it disabled.
Ports that support this feature provide __HAVE____LWP_GETPRIVATE_FAST in
machine/types.h and a corresponding __lwp_getprivate_fast in
machine/mcontext.h.
This material is based upon work partially supported by
The NetBSD Foundation under a contract with Joerg Sonnenberger.
2011-02-24 04:28:41 +00:00
joerg
9674b81ed9
Introduce __weakref_visible to handle the different required visibility
...
for weak references. GCC 4.2+ and Clang require static, older GCC wants
extern. Change __weak_reference to include sym. This requires changes
the existing users to not reuse the name of the symbol, but avoids
further differences between GCC 4.1 and GCC 4.2+/clang.
2011-02-22 05:45:05 +00:00
christos
10e6f9749d
remove duplicate weak aliases
2011-02-21 22:07:44 +00:00
pooka
aa7f369f19
v-node -> vnode
...
(for consistency)
2011-02-21 07:11:11 +00:00
joerg
4bf46019d9
Redo the SSP wrappers to be transparent on the resulting object files.
...
This works by having the inline wrapper calling a second function which
uses renaming to output the correct function name.
2011-02-21 00:40:07 +00:00
joerg
e189b01ad3
Support the different weakref semantic in GCC 4.2 and clang.
2011-02-18 23:41:57 +00:00
tron
f1f20d6adf
Fix build with SSP enabled.
2011-02-16 20:20:25 +00:00
christos
c464e0ebc5
Fix non-fortify build.
2011-02-15 16:29:09 +00:00
christos
26104203c2
Don't forget to set errno. Pointed out by yamt.
2011-02-13 23:58:40 +00:00
pooka
79b560da8c
Don't do highestFD check with USE_POLL. It provides no benefit
...
but causes a dependency between RLIMIT_NOFILE and rumphijack FDOFF.
christos ok
2011-02-09 09:46:59 +00:00
joerg
2c39cf5f91
Don't define weak aliases in the SMALL case. They conflict with the real
...
function name since SMALL doesn't use the normal rename logic.
2011-02-07 21:39:47 +00:00
wiz
6ef76bc469
Remove trailing whitespace.
2011-02-05 00:24:08 +00:00
christos
6f31775ce6
bump for arc4random_{buf,uniform}
2011-02-04 22:07:41 +00:00
christos
a52c04784a
add arc4random_{buf,uniform}, from OpenBSD.
2011-02-04 22:07:07 +00:00
christos
41ed061fdf
PR/44514: Andrey Simonenko: Buffer underflow in RPC library for non-blocking
...
TCP sockets
2011-02-04 17:38:15 +00:00
christos
4a4722163b
knf - no functional changes
2011-02-04 17:36:54 +00:00
matt
90a7a07b86
Use RT_ROUNDUP instead of a private copy since that's what the kernel uses.
...
(t_getaddrinfo passes for both i386 (compat_netbsd32) and amd64 with this
change).
2011-02-04 02:01:12 +00:00
christos
bcb5ce2065
Fix emulation issue of SETVAL, and make the code look the same between the
...
two different versions.
2011-01-31 22:51:39 +00:00
christos
2d5180b4b9
add braces, per joerg.
2011-01-31 19:10:18 +00:00
christos
984dfe5f9f
bump down the recursion limit to 64.
2011-01-31 15:07:29 +00:00
christos
0f6e9a96aa
Limit recursions to avoid DoS attacks from Maksymilian Arciemowicz
2011-01-31 04:20:50 +00:00
matt
0536d96d78
Fix type sigtramp_t -> sigtramp_2
2011-01-29 22:58:47 +00:00
matt
2599cc89ba
Don't use r0 to restore LR, use r7 instead.
2011-01-29 02:21:20 +00:00
njoly
5488d3a23f
Add section 3 for getpwuid_r xref.
2011-01-26 22:00:45 +00:00
pooka
5f7e80a834
Add support for the Extensible MIPS ("eMIPS") platform. The
...
NetBSD/emips port runs on Xilinx and Beecube FPGA systems and the
Giano system simulator.
eMIPS is a platform developed at Microsoft Research for researching
reconfigurable computing. eMIPS allows dynamic loading and scheduling
of application-specific circuits for the purpose of accelerating
computations based on the current workload.
NetBSD eMIPS support for NetBSD 4.x was written at Microsoft Research
by Alessandro Forin and Neil Pittman. Microsoft Corporation has
donated full copyright to The NetBSD Foundation.
Platform support for eMIPS is the first part of Microsoft's
contribution. The second part includes the hardware accelerator
framework and will be proposed on tech-kern soon.
2011-01-26 01:18:43 +00:00
matt
787e823fd1
Move IDs into .ident
...
Use END(x)
Remove a.out support
Make CERROR hidden
2011-01-25 02:38:15 +00:00
njoly
7ef8fa728e
Redo Vt macro fixes (from r1.35) which were lost.
2011-01-24 19:37:35 +00:00
joerg
86b3b196ed
Correctly define inta using a helper macro for the #
2011-01-23 14:08:53 +00:00
matt
5ae5f9ae2e
Instead of testing for all mips variants, just use MACHINE_CPU.
2011-01-23 06:27:32 +00:00
christos
5b63bdc2ba
remove stray printf.
2011-01-22 16:24:44 +00:00
christos
f98fcbb075
add may alias attribute to the double union because gcc-4.5.x produces
...
incorrect code on ARMv7a. From Nikunj Badjatya and Amol Pise.
2011-01-21 23:36:49 +00:00
christos
e6d36a6ae6
prevent resource DoS from brace expansion (from Maksymilian Arciemowicz)
2011-01-21 23:30:31 +00:00
matt
0da37b7b85
Remove CPUFLAGS?= since it's no longer needed.
2011-01-20 18:41:39 +00:00
christos
b493b4d721
provide a _sys_getcwd() entry like all the rest of the system calls to be
...
used by SSP.
2011-01-20 02:57:00 +00:00
matt
8ef507a844
Fix some bugs introduced when switching to new GOT/PLT format.
2011-01-19 02:47:01 +00:00
matt
57d93d8715
Cleanup the o32 compat build test.
2011-01-18 08:12:05 +00:00
matt
dfe29b1db4
Change to deal with callframe changes
2011-01-18 01:23:24 +00:00
matt
bd081d44b9
Make the MIPS N32/N64 ABIs properly support 128-bit long doubles. With this
...
change, we should be fully conformant with the N32 and N64 ABIs.
Add {fpclassify,infinity,isnan,ininf,signbit}l_ieee754.c back to lib/libc/gen.
Note that infinityl_ieee754.c will work with either 64-bit, 80-bit, or
128-bit long doubles.
2011-01-17 23:53:03 +00:00
matt
7d92b19968
Make __cerror hidden.
2011-01-17 23:34:44 +00:00
matt
e4100763e4
cleanup format of #ifdef
2011-01-17 23:32:31 +00:00
matt
50078c4d66
Add long double functions for eq,ne,gt,le,ge,lt,neg ops.
2011-01-17 10:08:35 +00:00
matt
51db1c5cf3
Kill _NOREGNAMES. Everything should be using %rX now. If it doesn't it
...
soon will.
2011-01-17 08:23:53 +00:00
matt
36cd488617
align comments
2011-01-16 02:45:48 +00:00
matt
b79441d450
Switch to the PIC_GOTSETUP/PIC_TOCSETUP macros for PIC code. Now libc
...
will be built to use secureplt by default.
2011-01-16 02:43:10 +00:00
christos
b163cf8017
Fix reversed oveflow check.
2011-01-15 15:42:10 +00:00
martin
cca650856d
Backout previous, it breaks the build big time and causes e.g. date(1)
...
and top(1) to dump core.
2011-01-15 12:31:56 +00:00
matt
cf88c3890b
Use END(foo) everywhere.
...
Make __cerror hidden.
Use non-PLT calls to __cerror.
Use assym.h when appropriate.
Use addi to adjust stack instead of loading it.
Add __RCSIDs
Force -D_NOREGNAMES for all .S files.
[this is all in preperation for secure plt support]
2011-01-15 07:31:11 +00:00
christos
dd5b7b1566
don't depend on integer oveflow wrapping to detect it. From Paul Eggert in
...
the tz mailing list.
2011-01-14 23:35:07 +00:00
jruoho
b19fbfbfda
Xref strsuftoll(3) and orders(7).
2011-01-14 10:08:57 +00:00
matt
958d64ed82
Generate symbol constants for UC_GREGS_* and CALLFRAME*.
2011-01-14 06:15:27 +00:00
matt
2c2c9e807e
Change __cerror to be marked hidden and change callers to avoid the PLT.
2011-01-14 06:12:16 +00:00
joerg
d3a052c472
Allow use of traditional CPP to be set on a per platform base in sys.mk.
...
Honour this for dependency processing in bsd.dep.mk. Switch i386 and
amd64 assembly to use ISO C90 preprocessor concat and drop the
-traditional-cpp on this platform.
2011-01-12 23:12:10 +00:00
christos
880fe46bea
remove clauses 3/4
2011-01-10 16:42:36 +00:00
wiz
e348791317
Sort errors, fix xref, don't xref itself.
2011-01-10 06:26:30 +00:00
christos
c5aa3a8776
add sigqueue
2011-01-10 04:41:27 +00:00
christos
221dcf2e47
Since localsub and gmtsub are called recursively to search for the local
...
time, setting EOVERFLOW at the inmost level will unfortunately persist,
even if later calls to those functions succeed. Move the EOVERFLOW setting
to the top level calls.
2011-01-06 02:41:34 +00:00
wiz
aff1729a2c
Fix fdleak in error case. Found by cppcheck.
2011-01-05 00:09:43 +00:00
wiz
e97508602c
Fix fdleak in #ifdef DEBUG. Found by cppcheck.
2011-01-05 00:03:52 +00:00
martin
27868e15e9
Special-case the (unlikely in practice) call with len = 2 - previously
...
the code would not have swapped anything. Problem pointed out by
sparc64 automatic test run.
2011-01-04 17:14:07 +00:00
christos
61a5737280
off by one
2010-12-28 16:19:25 +00:00
jnemeth
fd52cff654
vsnprintf_ss does NOT handle floating point formats
2010-12-26 12:39:54 +00:00
wiz
207ab8d006
Add punctuation.
2010-12-22 17:06:03 +00:00
christos
92a95e7ba4
document vsnprintf_ss
2010-12-22 16:59:10 +00:00
wiz
817bb39979
Remove trailing whitespace; sort errors; spell "variadic" like
...
Wikipedia or GNU libc.
2010-12-19 22:19:27 +00:00
christos
4d653f4318
Make the ioctl prototype reflect reality and explain why. Also mention that
...
the generic file descriptor manipulation ioctls are superceded by the
equivalent fcntl one.
2010-12-19 16:54:10 +00:00
jruoho
5c9efd7bb1
Xref __builtin_return_address(3).
2010-12-19 09:33:52 +00:00
jruoho
a20c806d96
Small modifications to wording, tidy up SEE ALSO.
2010-12-19 08:28:40 +00:00
jruoho
6f013d76df
Fix SYNOPSIS, add CAVEATS.
2010-12-19 08:21:36 +00:00
christos
3a693ad8ca
PR/44248: Antti Kantee: Fix multi-threaded localtime hang.
2010-12-17 23:11:57 +00:00
njoly
9f266c104e
Fix cross-reference, dir(5) -> dirent(3).
2010-12-17 19:20:42 +00:00
wiz
db9d3e0efd
Sort ERRORS. Fix a typo. Readd macro usage lost in previous.
...
Remove trailing whitespace.
2010-12-17 01:30:50 +00:00
wiz
a5f2300ef5
Sort SEE ALSO, add a serial comma.
2010-12-17 01:30:14 +00:00
wiz
72b0a97144
Use more markup.
2010-12-17 01:29:45 +00:00
joerg
c4120e324e
Replace use of errlist with a single concatenated version and an offset
...
array. This requires less storage and avoids one runtime relocation per
errno value.
2010-12-16 22:52:32 +00:00
christos
d6bc393ba9
it is getname not time.
2010-12-16 22:18:37 +00:00
christos
84df4ad5ec
add the 3 missing man pages.
2010-12-16 21:53:56 +00:00
christos
5a87b22ec6
Provide a re-entrant and thread-safe set of timezone API's that
...
don't require locking and can operate on user-specified timezones
as opposed to having to alter the environment to change a timezone.
This work was presented to the tzcode folks and it was generally
accepted, but there seems to be a lot of inertia.
2010-12-16 18:36:47 +00:00
jruoho
595da22eed
Reference __builtin_object_size(3) and attribute(3) with each other.
2010-12-16 17:50:39 +00:00
wiz
3d3c5d42cb
Observe the following spelling:
...
- wide character (noun)
- wide-character (adjective)
Inspired by jmc@OpenBSD.
2010-12-16 17:42:25 +00:00
jruoho
9f95187844
.Fn, offset indent, complete reference.
2010-12-16 12:08:16 +00:00
jruoho
fe6e1d361b
Fix the references and -offset indent.
2010-12-16 11:57:20 +00:00
jruoho
c1a91d0bee
Use .Fn.
2010-12-16 11:49:35 +00:00
jruoho
91e230c6b8
Fix xref; module(4) -> module(7).
2010-12-14 16:23:59 +00:00
jruoho
5c1bce6b00
Reference strsuftoll(3) and orders(7) with each other.
2010-12-14 13:00:34 +00:00
joerg
674a655551
Prefix ctype bitmask macros with _CTYPE
2010-12-14 02:28:57 +00:00
pooka
0c0346ae48
Don't __weak_alias non-existent symbols. Apparently the alpha
...
compiler doesn't like it.
2010-12-13 23:10:12 +00:00
pooka
5f35396ed8
last of the RUMP_ACTION syscall swappers
2010-12-13 21:07:54 +00:00
pooka
2f36209c20
Mirror sysctlgetmibinfo RUMP_ACTION change.
2010-12-13 14:17:11 +00:00
jruoho
05a9f55544
Xref module(4).
2010-12-13 10:07:46 +00:00
joerg
230ccda64c
Don't bother with SCCS or the other RCSID conditionals.
2010-12-12 22:34:44 +00:00
christos
b3ddcb3ea2
errlist.c is automatically generated now.
2010-12-12 20:22:48 +00:00
christos
5eeef29dbe
remove comment
2010-12-12 20:16:09 +00:00
christos
91083d6e86
Automatically generate the error list.
2010-12-12 20:08:27 +00:00
tsutsui
be1c859466
We can't assume syscall retains t0, unless it's documented as ABI.
2010-12-12 09:03:06 +00:00
tsutsui
f3f411dad2
brk(2) should update __curbrk, not __minbrk or garbage.
2010-12-12 09:00:37 +00:00
joerg
cb6cc2679c
Wrap sys_errlist constants in a macro to make it easier to extract
...
the strings reliably with sed/awk.
2010-12-09 21:27:31 +00:00
njoly
5db815a78e
Convert a few macros to Vt (variable type).
2010-12-09 09:22:31 +00:00
christos
75a9445418
use %option noinput
2010-12-08 03:19:19 +00:00
joerg
3b7d8067b3
Don't redeclare __isthreaded.
2010-12-08 02:07:03 +00:00
joerg
6ab2cfd0b3
Use __isthreaded from reentrant.h and don't redeclare it.
2010-12-08 02:06:38 +00:00
joerg
7a8f98483f
input() is not used, so don't provide it.
2010-12-08 02:05:39 +00:00
joerg
e325eedcc1
Remove tautology.
2010-12-07 22:01:45 +00:00
joerg
aaf356760f
Mark function as static and give it an explicit return type.
2010-12-07 22:01:22 +00:00
joerg
cb63bb73c3
Don't use argument as direct format string.
2010-12-07 20:10:53 +00:00
jruoho
b4ba5c1508
Xref glob(7).
2010-11-30 21:03:07 +00:00
tnozaki
96bcb898d4
variable must to be nul terminated before "CODESET=foo".
...
ISO2022 module doesn't understand this and may fail setlocale(3).
2010-11-30 15:25:05 +00:00
wiz
cb676ec98b
Remove superfluous comma.
2010-11-28 01:28:21 +00:00
jnemeth
22405528a4
Rename the autoloaded property list from <module>.prop to <module>.plist
...
as discussed on tech-kern.
2010-11-28 00:26:38 +00:00
christos
5fe11453fa
fix lint warning.
2010-11-27 21:22:11 +00:00
christos
d5ea004dc7
Implement VIS_NOESCAPE and VIS_HTTP1866.
2010-11-27 19:44:21 +00:00
christos
b77d89c7da
ansify
2010-11-27 18:33:54 +00:00
dholland
6e4e77d46e
No file system I know of reports directory sizes that are multiples of
...
sizeof(struct dirent) except by accident. So, sync with reality. Brought
to my attention by Taylor R Campbell in chat.
2010-11-25 20:53:23 +00:00
christos
05f534f3c7
PR/44132: Wolfgang Stukenbrock: libc/rpc may overwrite not-allocated memory
...
Return XPRT_DIED when realloc fails for lack of a better error.
2010-11-23 14:02:01 +00:00
christos
b0f3f04a67
PR/44113: Nicolas Joly: printf(3) should ignore zero padding for nan/inf
2010-11-19 00:44:18 +00:00
tron
4a3a313897
Include "namespace.h" to get namespace protection.
2010-11-17 13:25:53 +00:00
tron
aacd5349be
Provide proper namespace protection for rbtree(3) because it is now
...
used by "libc" internally.
2010-11-17 13:19:32 +00:00
tron
d0e6f50de3
Implement mark & sweep garbage collection as suggested by Enami Tsugutomo
...
on "current-users" mailing list. Garbage collection is performed if:
1.) We previously allocated memory for the environment array which
is no longer used because the application overwrote "environ".
2.) We find a non-NULL pointer in the allocated environment array after
the end of the environment. This happens if the applications attempts
to clear the environment with something like "environ[0] = NULL;".
2010-11-16 17:23:10 +00:00
enami
4f54ea7667
Fix typos in comment.
2010-11-16 03:02:20 +00:00
tron
2f85740ecc
1.) Rename internal function __findvar() to __findenvvar().
...
2.) Add a wrapper function __findenv() which implements the previous
*internal* interface. It turns out that ld.elf_so(1) and pthread(3)
both use it.
Stripping e.g. "LD_LIBRARY_PATH" from the environment while running
setuid binaries works again now.
2010-11-14 22:04:36 +00:00
tron
268c79e4cc
Set errno to ENOENT if we reject the environment variable name in
...
getenv_r() instead of leaving it unchanged.
2010-11-14 20:37:02 +00:00
tron
fbf4aa1699
Improve and simplify implementation of *env(3) functions:
...
- Use RB tree to keep track of memory allocated via setenv(3) as
suggested by Enami Tsugutomo in private e-mail.
This simplifies the code a lot as we no longer need to keep the size
of "environ" in sync with an array of allocated environment variables.
It also makes it possible to free environment variables in unsetenv(3)
if something has changed the order of the "environ" array.
- Fix a bug in getenv(3) and getenv_r(3) which would return bogus
results e.g. for " getenv("A=B") " if an environment variable "A"
with value "B=C" exists.
- Clean up the internal functions:
- Don't expose the read/write lock for the environment to other parts
of "libc". Provide locking functions instead.
- Use "bool" to report success or failure.
- Use "ssize_t" or "size_t" instead of "int" for indexes.
- Provide internal functions with simpler interfaces e.g. don't
combine return values and reference arguments.
- Don't copy "environ" into an allocated block unless we really need
to grow it.
Code reviewed by Joerg Sonnenberger and Christos Zoulas, tested by
Joerg Sonnenberger and me. These changes also fix problems in
zsh 4.3.* and pam_ssh according to Joerg.
2010-11-14 18:11:42 +00:00
christos
f214ecbad3
forgot to commit this one for two months!
...
add vdprintf.
2010-11-13 19:41:32 +00:00
enami
5260b632e4
Clear all entries past the NULL while scrubing environ vector.
2010-11-10 02:40:08 +00:00
enami
ef075363bd
Indent using tab rather than four spaces.
2010-11-10 02:33:49 +00:00
pooka
2ddc760fc7
Need getifaddrs() for the rump client since it executes sysctl(2)
2010-11-05 16:23:56 +00:00
pooka
08fc937c06
make sysctl(8) work as a rump client
2010-11-05 15:55:23 +00:00
christos
ee29967bad
scrub the whole array, not just the first n malloced entries.
2010-11-04 21:49:45 +00:00
plunky
5cf5f72e75
this page title is CDBW
2010-11-03 16:17:48 +00:00
christos
3954ad831d
Handle the case where a program attempted to cleanup the environment by
...
setting *environ = NULL;
2010-11-03 15:01:07 +00:00
skrll
162991256a
Spell immediately correctly.
2010-11-02 20:49:47 +00:00
enami
b447d18264
- Simplify the code
...
- Reword the comment.
2010-11-02 03:44:05 +00:00
enami
ee9d44a7c1
Double the array only when really necessary. Otherwise memory will be
...
exhausted if user modifies the variable envrion itself repeatedly..
2010-11-01 02:41:27 +00:00
wiz
51a05c8628
Fix a typo and remove trailing whitespace.
2010-10-27 19:18:00 +00:00
christos
de19ef9132
markup improvements, document ctype_r, time_t is not a "long integer"
2010-10-27 19:16:04 +00:00
wiz
83306973da
Improve wording after consultation with njoly.
2010-10-26 22:34:33 +00:00
njoly
5d63576039
Make putenv(3) fails with EINVAL for a null pointer, or for a string
...
that either miss or start with a `=' character.
Adjust man page and testcase accordingly.
2010-10-25 20:35:36 +00:00
wiz
ecad7beb9c
Bump date.
2010-10-25 07:37:11 +00:00
dholland
6d14a316d9
Mention err/warn. Note that they're generally preferred to perror().
...
Might want to strengthen the wording.
2010-10-24 23:10:51 +00:00
tron
1dc4fb4ea1
Double the size of the allocate environment vector when we resize it.
...
This should speed up extending the environment via setenv(3).
2010-10-24 17:53:27 +00:00
tron
410614d6b3
Replace _FPOS_OVERFLOW() macro with a static inline function called
...
__fpos_overflow() that doesn't cause any lint warnings.
2010-10-24 17:44:32 +00:00
christos
3dbfe3dd7e
tell lint to shut up.
2010-10-23 14:12:50 +00:00
christos
13fa4dc134
not that it can happen, but make the test more robust.
2010-10-22 22:00:32 +00:00
christos
ec053f73a0
implement EOVERFLOW
2010-10-22 21:29:45 +00:00