Commit Graph

15946 Commits

Author SHA1 Message Date
joerg
615642201d Drop obsolete pthread restriction. 2012-05-04 12:28:03 +00:00
joerg
8050d45d71 Simplify check for TLS definition to not hide code. Drop it in another
place as it is redundant.
2012-05-04 12:26:33 +00:00
christos
73e25da1dd - match regular ioctl prototype (3rd argument is optional)
- fix lint issues
2012-05-04 11:48:12 +00:00
christos
b7d2912934 test for both NUL and _POSIX_VDISABLE, because _POSIX_VDISABLE propagation
between different daemons and OS's does not seem reliable.
2012-05-02 14:36:07 +00:00
agc
1a27c54f9a re-work the previous to make it format correctly 2012-05-02 04:23:09 +00:00
agc
142f8d12eb document the correct argument to wstandout(3) and wstandend(3) 2012-05-01 17:32:58 +00:00
enami
3cdda33922 Store allocated lwpctl state in the thread actually forked,
which is the only thread lives in the child process.

The problem originally reported here:
  https://bugs.ruby-lang.org/issues/6341
2012-04-26 00:21:44 +00:00
christos
37a2b6f0c2 use setenv so that we don't leak memory. 2012-04-22 15:55:41 +00:00
wiz
1cc71411f8 Sort SEE ALSO. 2012-04-22 10:13:52 +00:00
roy
27c1dc0dc5 Fix build 2012-04-21 14:39:35 +00:00
roy
258cf0abec Add capfile(5) to describe the termcap format.
Adjust various man pages and other documentation to point to capfile(5)
instead of termcap(5).
Remove getcap(3) as curses hasn't been building it for a long time.
Punt wrterm.c as tset no longer uses it.
2012-04-21 12:27:24 +00:00
blymn
35253f4b16 Fix build break if curses is built without wide char support 2012-04-21 11:33:16 +00:00
blymn
0f995dfd31 Remove trailing whitespace 2012-04-21 11:31:59 +00:00
christos
0bcf0d6f44 PR/46360: YAMAMOTO Takashi: Restore NetBSD-5 compatibility with putenv()
copying the passed string (which is not ToG compliant), instead of using
it directly in the environment arrat as it should. Needs to be pulled up
to NetBSd-6.
2012-04-20 17:31:29 +00:00
wiz
d2ca09c94d Bump date for previous.
New sentence, new line; remove trailing whitespace; fix typos;
punctuation nits.
2012-04-18 14:24:26 +00:00
martin
91d93016c8 poll(), pollts() and select() all return int values, but in the hijack
emulation of them these get passed as exit values from a pthread as
a void* (c.f. pthread_join(), pthread_exit()).
Do not use the address of an int variable for these, but provide the address
of a void* and assign the value afterwards.
Fixes hijacking of pollts/select on 64bit big endian hosts.
Spotted by and fix from pooka.
2012-04-18 10:37:37 +00:00
manu
70d8192475 - When using PUFFS_KFLAG_CACHE_FS_TTL, do not use puffs_node to carry
attribute and TTL fora newly created node. Instead extend puffs_newinfo
  and add puffs_newinfo_setva() and puffs_newinfo_setttl()
- Remove node_mk_common_final in libperfuse. It used to set uid/gid for
  a newly created vnode but has been made redundant along time ago since
  uid and gid are properly set in FUSE header.
- In libperfuse, check for corner case where opc = 0 on INACTIVE and   RECLAIM (how is it possible? Check for it to avoid a crash anyway)
- In libperfuse, make sure we unlimit RLIMIT_AS and RLIMIT_DATA so that
  we do notrun out of memory because the kernel is lazy at reclaiming vnodes.
- In libperfuse, cleanup style of perfuse_destroy_pn()
2012-04-18 00:57:21 +00:00
wiz
ec32c33db9 Wording. Remove trailing whitespace. 2012-04-14 10:34:29 +00:00
christos
0934ef62e5 a clarification, an a formatting nit. 2012-04-14 02:01:12 +00:00
christos
3765cebf73 - If fd == NULL, do the dance with opening /dev/tty
- Add a flag to enter a newline when we are done.
2012-04-14 01:33:43 +00:00
wiz
2306ff07c8 Sort errors. 2012-04-13 16:32:15 +00:00
yamt
8cd2291e6a needs sys/lwpctl.h for constants 2012-04-13 15:14:58 +00:00
yamt
0df0c59ba6 - fix ambiguous sentences.
- mention scheduling class.
2012-04-13 15:14:27 +00:00
christos
d6d7452b38 prefer ETIMEDOUT. 2012-04-13 14:42:18 +00:00
christos
77cac556d1 add timeout. 2012-04-13 14:39:34 +00:00
christos
98ba7d206f - don't update the length of the buffer until the allocation succeeds
- print only printable characters otherwise print '?'
2012-04-13 14:16:27 +00:00
wiz
3193029c4f Remove trailing whitespace. 2012-04-13 06:38:18 +00:00
christos
4e156f338e unconfuse lint; XXX: should really fix lint. 2012-04-13 02:20:50 +00:00
christos
311b90b920 add GETPASS_ECHO_STAR 2012-04-12 23:16:38 +00:00
christos
2968c226a9 name protection for getpassfd 2012-04-12 22:08:46 +00:00
christos
dd362f33aa man page for getpassfd 2012-04-12 22:08:32 +00:00
christos
969c948d8b add getpassfd() that gives us even more fine grain control on how to get
the password.
2012-04-12 22:07:44 +00:00
wiz
0e4c610c3c Remove trailing whitespace. 2012-04-12 20:15:37 +00:00
christos
10fa0b6411 raise signals for the tty characters that do. 2012-04-12 20:08:01 +00:00
christos
48c7acbcd7 Add a new getpass implementation that does not mess with signals, and
include getpass_r
2012-04-12 19:36:19 +00:00
christos
ca7e8bb03f Fix compat code, so if we failed to make raw, return the regular path. 2012-04-08 20:56:12 +00:00
wiz
72e34f2f4a Split file system.
Comma fixes.
Remove dangling "and".
Bump date for previous.
2012-04-08 16:09:55 +00:00
wiz
9a7b574b58 End sentence with dot. 2012-04-08 16:06:23 +00:00
manu
6bceb41868 Use new PUFFS_KFLAG_CACHE_FS_TTL option to puffs_init(3) so that
FUSE TTL on name and attributes are used. This save many PUFFS
operations and improves performances.

PUFFS_KFLAG_CACHE_FS_TTL is #ifdef'ed in many places for now so that
libperfuse can still be used on netbsd-5.
2012-04-08 15:13:06 +00:00
manu
fb4eb35384 Add PUFFS_KFLAG_CACHE_FS_TTL flag to puffs_init(3) to use name and
attribute cache with filesystem provided TTL.
lookup, create, mknod, mkdir, symlink, getattr and setattr messages
have been extended so that attributes and their TTL can be provided
by the filesytem. lookup, create, mknod, mkdir, and symlink messages
are also extended so that the filesystem can provide name TTL.
The filesystem updates attributes and TTL using
puffs_pn_getvap(3), puffs_pn_getvattl(3), and puffs_pn_getcnttl(3)
2012-04-08 15:07:45 +00:00
martin
94b761b6aa Rework posix_spawn locking and memory management:
- always provide a vmspace for the new proc, initially borrowing from proc0
   (this part fixes PR 46286)
 - increase parallelism between parent and child if arguments allow this,
   avoiding a potential deadlock on exec_lock
 - add a new flag for userland to request old (lockstepped) behaviour for
   better error reporting
 - adapt test cases to the previous two and add a new variant to test the
   diagnostics flag
 - fix a few memory (and lock) leaks
 - provide netbsd32 compat
2012-04-08 11:27:44 +00:00
christos
f3cbb49f84 Add and enable COMPAT_DKWEDGE which let's us autoconfigure wedges and boot
with a non-wedge aware fstab.
2012-04-07 17:10:02 +00:00
christos
1e9ca58635 - add getdiskrawname.
- exit on error for lint.
2012-04-07 16:44:39 +00:00
christos
8f3dcf00a8 fix typo 2012-04-07 16:22:42 +00:00
christos
4a87bdacc7 read returns ssize_t, and err is a function name. 2012-04-07 16:17:17 +00:00
christos
920e381419 - pass correct types.
- use sizeof(var) instead of sizeof(type)
2012-04-07 16:16:34 +00:00
wiz
98dbe2d32a Remove trailing whitespace, add dot. 2012-04-07 10:43:38 +00:00
christos
29484ab26f add getfsspecname 2012-04-07 04:04:21 +00:00
christos
9dbf303bcb cross reference getfsspecname 2012-04-07 03:47:30 +00:00
wiz
711cb78a48 Fix capitalization and typo, from Bug Hunting. 2012-04-06 11:36:04 +00:00
wiz
5eee512564 Fix typo, from Bug Hunting. 2012-04-06 11:35:39 +00:00
christos
5662c2716e trailing whitespace police. 2012-04-04 17:47:03 +00:00
joerg
b757af438b Disable new -Wstring-plus-int warning where needed for now.
Adjust various places that add GCC-only options to check for the active
compiler first.
2012-04-04 10:59:44 +00:00
agc
76f4f39125 Add a pthread cancel stub for sigwait, following Onno van der Linden's
analysis in PR 45131.  Kindly tested by Hisashi T Fujinaka (using csup
as the test case) with a successful outcome.

OK martin@
2012-04-04 06:29:16 +00:00
agc
6578e3b1a4 fix a couple of typos 2012-04-02 22:06:47 +00:00
rmind
5f6fa3d5ee Add NPF config retrieval routines. 2012-04-01 19:16:24 +00:00
christos
df08f9313b nbytes is now size_t 2012-03-29 21:21:04 +00:00
christos
781d83f527 make constant explicitly unsigned 2012-03-29 19:27:05 +00:00
christos
ad6ae348d8 fix lint, should nbytes be changed to size_t to match with the struct passed? 2012-03-29 19:26:21 +00:00
christos
4a263fd8ca PR/46279: Dr. W. Stukenbrock: Off-by-one in buffer length check and make sure
that the password fits in the supplied buffer.
2012-03-29 14:43:58 +00:00
christos
b66595809f The flush function makes the tests fail. So undo it for now until we decide
if the tests are wrong or the flushing is wrong.
2012-03-29 14:27:33 +00:00
christos
2ad3ddd659 PR?40728: W. Stukenbrock: Fix various issues with NIS-netgroups in users
and groups.
2012-03-29 13:05:10 +00:00
christos
61a429c0b1 only provide compatibility i/o functions to the ones provided by the caller. 2012-03-28 15:21:11 +00:00
christos
de001ba2a5 - widen the internal read and write calls to match the syscalls
- add funopen2() which provides access to flush() and the wider calls.
- make use of the new flush call in fmemopen()
2012-03-27 15:05:42 +00:00
christos
9bd5031289 cast RHS of >>= operation to unsigned int 2012-03-25 19:53:41 +00:00
christos
9c9d360d27 - change from size_t to unsigned int because we don't need the extra width
- cast to unsigned int results of quad ops
2012-03-25 19:53:18 +00:00
christos
a105f91c05 PR/41558: Stathis Kamperis: Treat a backslash followed by NUL as NUL, instead
of a backslash if FNM_NOESCAPE is not set. According to TOG: a backslash in
a pattern followed by any other character, will match that second character
in the string.
2012-03-25 16:31:23 +00:00
joerg
0e8643658c Don't pass assembler flags to genassym, it doesn't compile. 2012-03-25 06:55:19 +00:00
christos
fac360ff28 From: Jilles Tjoelker: Add a mapping for the cursor delete key 2012-03-24 20:09:30 +00:00
christos
d067817eea From Jilles Tjoelker:
Do not move the cursor for ed-delete-next-char in emacs mode.
This makes ed-delete-next-char suitable for mapping to the <Delete> key.
Behaviour in vi mode is unchanged (for 'x').
2012-03-24 20:08:43 +00:00
matt
05c78a4552 Fix a bug introduced by lint cleanup. 2012-03-24 00:06:20 +00:00
njoly
28247a8661 Use major.minor for NetBSD versions. 2012-03-23 18:08:34 +00:00
skrll
5b9a421677 Shut lint up.
From he@
2012-03-23 09:34:09 +00:00
joerg
e057b2281a Use __printflike. 2012-03-22 23:46:49 +00:00
joerg
4cd46b4ac8 Add some more __dead as exposed by the recent WARN bumps. 2012-03-22 22:59:43 +00:00
joerg
5df6c2ea3b Format the diagnostic with vasprintf once and use plain syslog instead
of messing with format strings.
2012-03-22 22:58:15 +00:00
drochner
e917deee9c don't reuse a dynamically allocated stack if a fixed one is requested 2012-03-22 20:01:18 +00:00
christos
1bb11e66cb vax-specific lint fixes. 2012-03-22 17:32:21 +00:00
christos
c5142b6c92 add constcond, make shifts unsigned 2012-03-22 15:34:14 +00:00
christos
12968661bf get rid of the cheesy BAD macros 2012-03-22 14:18:34 +00:00
he
4efbcb2b62 Make this lint-free (only built for real for the __sh__ ports):
* Mark some code after goto as /* NOTREACHED */
 * Add a cast for file size (off_t) to size_t to avoid warning about
   possibly losing bits.
 * Avoid a "pointer casts may be troublesome" warning from lint
   by doing a cast via "void *" instead of directly to "struct
   coff_filehdr *".
2012-03-22 13:42:36 +00:00
he
99339bb8f4 Add a pair of casts to silence lint about conversion possibly losing bits. 2012-03-22 13:25:45 +00:00
he
6f8da331f6 A few modifications to make this build for vax:
* The decpt variable is only used if INFNAN_CHECK, which isn't defined
   for vax.
 * Use a cast to avoid warning about shift of a signed variable.
 * Mark a condition as (potentially) a constant condition.
2012-03-22 13:15:48 +00:00
he
648512f83d A few fixes to make this build for vax:
* The fivesbits[] variable is not used for vax
 * The decpt variable is only used if INFNAN_CHECK, which isn't
   defined for vax
2012-03-22 13:09:12 +00:00
he
ff8e71502d Convert to use c89 function declaration. 2012-03-22 13:02:15 +00:00
skrll
d66dab05c4 Shut lint up about dp.
From he@
2012-03-22 12:31:32 +00:00
he
1c46a18eb1 Follow the pattern from powerpc, make lint happy. 2012-03-22 09:32:04 +00:00
he
2bf75ee57f Add a void to make function declaration c89. 2012-03-22 08:56:52 +00:00
he
b722f9f3bf Add a cast of the shift count to int32_t, so that we don't try
to do int32_t << long, since ANSI C doesn't perform "balancing"
before the shift operation according to lint.  Should not make a
difference, offset is limited to 0..3 anyway.
2012-03-22 08:54:48 +00:00
he
2df8a64968 Make 'i' unsigned to avoid signed/unsigned comparison warnings from lint. 2012-03-22 08:52:22 +00:00
matt
3fb1a336a3 Make lint happy.
While here, make sure the top of stack is aligned properly.
2012-03-22 05:36:50 +00:00
christos
a79bdcfa71 c89 prototypes 2012-03-21 21:37:29 +00:00
he
638c9cf502 Add some casts to get rid of "bitwise op on signed value is non-portable"
warning from lint.
2012-03-21 20:07:52 +00:00
he
2d215eaf5b Use c89 function declaration. 2012-03-21 20:04:57 +00:00
christos
2fab93ccbb c89 definitions 2012-03-21 15:32:26 +00:00
christos
acf4d8064f welcome to WARNS=5 2012-03-21 14:52:40 +00:00
christos
d703a14882 rename umax2s->size_t2s function per apb's request. 2012-03-21 14:32:22 +00:00
christos
b2b93bb9ff fix argument order. 2012-03-21 14:28:32 +00:00
christos
d9285aa434 unsigned char portability casts 2012-03-21 14:19:15 +00:00
christos
de7ac11be7 add casts 2012-03-21 14:17:54 +00:00
christos
56a2b6ea32 cast CHAR_MAX to (char) for unsigned character machines 2012-03-21 14:11:24 +00:00
christos
ebf07d2912 do not need lint overrides anymore 2012-03-21 14:10:47 +00:00
christos
db0b896367 no need for linted annotations 2012-03-21 14:03:06 +00:00
matt
e1a2f47f12 Use C89 function definition 2012-03-21 10:10:36 +00:00
matt
cb0a562de5 Use __UNCONST to unconst a "" 2012-03-21 10:09:20 +00:00
matt
572e1c8587 These directories don't handle WARNS=5 2012-03-21 10:08:30 +00:00
he
912d4f1845 Cast an int argument to umax2s() to size_t. 2012-03-21 09:49:02 +00:00
bsh
583109cfde shut up lint(1) 2012-03-21 09:05:35 +00:00
matt
fcd1fc711f Libraries default to be built with WARNS=5 2012-03-21 05:39:21 +00:00
matt
510d3d4c1d These directories default to WARNS=2 2012-03-21 05:38:49 +00:00
matt
fa835e8c8b These directories default to WARNS?=5 2012-03-21 05:37:42 +00:00
matt
5d04d368b8 Use WARNS=2 (the previous WARN=4 was incorrect and ignored). 2012-03-21 05:36:24 +00:00
matt
6fb2a3179f Use C89 functions definitions. 2012-03-21 05:34:54 +00:00
matt
f9113d007b Use C89 functions definitions.
Remove use of __P
2012-03-21 05:33:26 +00:00
christos
39052f3b3d cast to appropriate types. 2012-03-21 02:32:26 +00:00
christos
59f433dfc5 - don't compile unreachable code.
- convert uintmax_t to uintptr_t
2012-03-21 02:18:14 +00:00
christos
c2ff854c81 c89 prototypes, unsigned int 2012-03-21 00:38:34 +00:00
christos
c59812a81a uintmax_t -> size_t (never called with larger than size_t) 2012-03-21 00:38:06 +00:00
christos
79f2de1232 size_t -> uint8_t 2012-03-21 00:35:50 +00:00
christos
a8d19c80ee time_t casts 2012-03-21 00:34:54 +00:00
christos
de9f2b1f30 void cast 2012-03-21 00:34:04 +00:00
martin
9e9f4b8bed We do not care about portability when instantiating softfloats for our
concrete environment - add appropriate lintflags.
2012-03-20 21:37:19 +00:00
martin
2335ebce2c Remove initialized but unused variable 2012-03-20 21:34:51 +00:00
matt
504f867176 Use C89 Prototypes.
Remove use of __P
2012-03-20 17:44:17 +00:00
matt
adb7422177 Use C89 definitions
Remove use of __P
2012-03-20 17:14:50 +00:00
matt
1f0437222e Use C89 definitions 2012-03-20 17:08:13 +00:00
matt
56a38fd9b4 Use C89 definition.
u_int*_t -> uint*_t
2012-03-20 17:06:43 +00:00
matt
5688dfcf9c Switch to C89 definitions.
Remove use of __P
2012-03-20 17:05:59 +00:00
matt
44551472c9 Remove use of __P
Switch to using C89 definitions.
2012-03-20 16:38:44 +00:00
matt
cf884af3e9 Use C89 definitions.
Remove use of __P
2012-03-20 16:36:04 +00:00
matt
8147d218bf Convert to use C89 prototypes.
Remove use of __P
2012-03-20 16:30:26 +00:00
matt
68e3ffa377 Convert to C89 prototypes. Remove use of __P 2012-03-20 16:26:12 +00:00
matt
336af9bbce Revert unneeded casts. 2012-03-20 16:19:56 +00:00
kardel
5d92cd82ed PR pkg/46206
re-establish fqdn lookup when AI_ADDRCONFIG is used in hints
AI_ADDRCONFIG led to fqdn lookup being skipped as the systems didn't
configure any PF_UNSPEC addresses - check was too strict here.
Thnaks to Ryo ONODERA for testing.
2012-03-20 12:04:01 +00:00
he
46fd488dd6 Cast to unsigned int before doing shift operations, to appease lint. 2012-03-20 10:51:23 +00:00
he
a1a4d3d82c Sprinkle some /* ARGSUSED */ before the dummy functions to appease lint. 2012-03-20 10:40:48 +00:00
kardel
52f5a00d5c PR 46206: fix programmed SIGSEGV
more work is needed as tests seem to indicate that name resolution now
does no seem to work (firefox reports Server not found)
thanks to Ryo ONODERA for testing.
2012-03-20 10:34:33 +00:00
christos
bc3dd708b6 ansi prototype 2012-03-20 01:42:59 +00:00
matt
7e14795b01 Simplify a bit and constify as well. Since the file is mapped read-only,
use const references to access its data.
2012-03-20 00:31:24 +00:00
christos
b5fc25d19b cast to size_t 2012-03-20 00:16:35 +00:00
christos
8b01ea2a71 - sprinkle CONSTCOND
- back to char * to simplify code, requested by gimpy
2012-03-20 00:03:12 +00:00
matt
f8659af7ae Move -D_DIAGNOSTIC to a separate line (makes it easier to comment out). 2012-03-19 22:32:16 +00:00
matt
5d44f1d51d Convert to C89 definitions.
Cleanup up type usage.
2012-03-19 22:23:10 +00:00
christos
ff236fe4d7 don't do arithmetic on void pointer. 2012-03-19 16:20:58 +00:00
plunky
3d672173f2 pselect->paccept for this page 2012-03-19 09:34:36 +00:00
christos
768a62209a parenthesize. 2012-03-18 16:43:34 +00:00
christos
1af1a7c82f fix lint 2012-03-18 16:26:34 +00:00
christos
8aceef3b7b fix lint. 2012-03-18 14:34:28 +00:00
christos
59ba550f28 fail as the man page says sched_rr_get_interval should. 2012-03-18 02:04:39 +00:00
christos
2a6850a9bf Add AI_ADDRCONFIG, which makes getaddrinfo() return only address with families
that are already configured in the system.
2012-03-17 21:56:40 +00:00
martin
0abf123a71 delint 2012-03-17 21:35:06 +00:00
martin
e9be25776b Avoid lint warnings 2012-03-17 20:48:58 +00:00
christos
3bf842e395 PR/44097: Yamamoto Takashi: Prevent overflow. 2012-03-17 20:01:14 +00:00
christos
4bc43cf6c5 make lint exit on warnings 2012-03-17 18:00:50 +00:00
christos
64c780f832 hack to silence lint 2012-03-17 17:59:58 +00:00
njoly
a973b36486 Use Lk macro when dealing with URLs. Another part of PR/29238. 2012-03-15 19:04:46 +00:00
christos
526d942790 - ansify, knf.
- no functional changes
2012-03-15 18:22:30 +00:00
christos
815317212f missed one (thanks joerg) 2012-03-15 16:47:38 +00:00
christos
16b0f218f0 fix signature. 2012-03-15 13:23:10 +00:00
njoly
874d053d0b Use puffs_access() return value in the VA_UTIMES_NULL case. 2012-03-15 12:49:36 +00:00
christos
504754efd0 ansi prototypes. 2012-03-15 11:46:08 +00:00
joerg
66dd2755f5 Add __printflike attribution to use vprintf and friends with an argument
as format string.
2012-03-15 02:02:20 +00:00
martin
90310d68b0 Rename __zero to __sf128_zero to avoid clashes with the strange new
inline function in cdefs.h
2012-03-14 17:03:10 +00:00
skrll
938140d192 Use the _end symbol rather than the end symbol. Prevents version info
problems in elflink.c for the heimdal libraries.
2012-03-14 14:18:10 +00:00
jruoho
0208cf2398 Use more markup. 2012-03-14 13:24:48 +00:00
christos
98c744016d rename the macros ftsent_ since they apply to the ftsent struct not the
fts one.
2012-03-14 00:25:19 +00:00
joerg
9cc96dd169 Fix all the issues lint is too dumb to warn about and re-enable
-Wconstant-conversion.
2012-03-13 22:37:51 +00:00
joerg
3e39914d72 Add missing includes. 2012-03-13 22:24:48 +00:00
joerg
7e379a8558 Disable -w again until the complains are resolved. 2012-03-13 22:12:40 +00:00
joerg
51d5b8a1ef Revert bloat. 2012-03-13 21:32:12 +00:00
christos
c5e820cae4 PR/45989: Martin Husemann: lint invocation does include -w only on i386
- turn lint -w for all the platforms after fixing the lint warnings.
- add _DIAGASSERTS() for casts that would assign values to types that
  would not fit.
- change types, add casts
- change into ansii prototypes
- turn on _DIAGNOSTIC for libc (during current, to be eliminated for release
  builds)

approved by core@
2012-03-13 21:13:30 +00:00
joerg
e865ac2891 Move the pthread_once alias where it belongs. 2012-03-13 01:05:55 +00:00
joerg
77bfe129a9 Move pthread_once implementation into a separate file, it doesn't depend
on the mutex implementation in any way.
2012-03-12 21:35:10 +00:00
joerg
d3660af7b6 Keep track of the size of the guard area, in case we want to make it
modifiable later. Only reuse the stack if it was allocated by libpthread
and if the expected thread size matches the current stack size.
2012-03-12 20:16:52 +00:00
joerg
1d34190ecc Further refine stack allocation. If the stack was provided by the user,
don't bother with setting up a guard page. Otherwise, round up the size
to page size. Point stack inside the guarded area, without the guard
page. Fix size when mprotect failed.
2012-03-12 16:37:15 +00:00
christos
9b25b03245 include the NULL in the argv conversion 2012-03-11 21:15:25 +00:00
christos
75b1bb5aad use arraycount 2012-03-11 21:14:56 +00:00
joerg
654395b265 Keep in sync with libpthread: Fix error handling. 2012-03-10 19:59:21 +00:00
joerg
fa060fc8c7 Fix error handling 2012-03-10 18:01:10 +00:00
joerg
af435e468b Use correct size. 2012-03-10 18:01:09 +00:00
joerg
a65b1aeb01 Disable reduced stack for now. It creates fallout I'm not willing to
deal with.
2012-03-09 21:03:09 +00:00
drochner
677d666c8d -fix initial stacksize rounding
-minor indentation fix
2012-03-09 12:06:44 +00:00
njoly
92562600d4 On alpha compile the math library with dynamic rounding mode instead
of fixed normal IEEE rounding mode. This makes function that depends on
the current rounding mode, such as rint(3), just work.
2012-03-09 08:03:53 +00:00
wiz
9c18a264d9 Add sem_timedwait to NAME and fix SYNOPSIS. Add serial comma. 2012-03-08 22:13:32 +00:00
wiz
6e8389e3bc Whitespace nits. 2012-03-08 22:13:05 +00:00
wiz
5f354a83a5 Merge error descriptions for same error code. 2012-03-08 22:12:52 +00:00
wiz
c744abbb43 Add missing comma. 2012-03-08 22:12:37 +00:00
joerg
4acff4c01b Implement sem_timedwait. 2012-03-08 21:59:24 +00:00
joerg
344a231144 Actually use the stack thread attributes when creating a new thread. 2012-03-08 16:40:45 +00:00
joerg
bfcb2008c8 Fix the stack base pointer for the initial thread on !HPPA.
AT_STACKBASE is pointing to the start of the stack, which is the
upper limit on platforms where the stack grows down.
2012-03-08 16:33:45 +00:00
manu
202e6de05c The kernel can lookup the same node multiple time and will reclaim as
many times it looked up. All reclaims but the last one must be ignored,
otherwise we discard a node which will still get operations. We therefore
have to keep track of lookup/reclaim count and hnour reclaims only when
the count reaches zero.
2012-03-08 14:58:57 +00:00
joerg
d1de8de689 Remove libpthread's semaphore implementation and always use the kernel
one. The implementation doesn't provide an async-safe sem_post and can't
without a lot of work on the pthread primitives.

Remove bogus time out requirement in test case, it should have been
a "known failure" if anything.
2012-03-07 23:31:44 +00:00
christos
fd10e83118 misc cleanups:
- const for mibs
- #define for magic constants
- casts
2012-03-05 19:40:08 +00:00
tnozaki
2f142eb3e0 don't use __link_set_* stuff for locale implementation.
patch reviewed by matt@, thanks.
2012-03-04 21:14:55 +00:00
christos
abe98abf0f base0 == NULL is allowed when nmemb == 0, in fact the nsdispatch code calls
bsearch this way.
2012-03-04 20:01:45 +00:00
wiz
87b2e48e9c Sort error descriptions. 2012-03-04 11:58:31 +00:00
wiz
cb8f720cc4 Change macro argument for mdoclint, no effective change. 2012-03-04 11:52:32 +00:00
christos
3a7a306503 fix signature according to TOG. 2012-03-04 03:23:35 +00:00
tls
b39292dc65 Fix bug in previous: don't reinitialize on every call! Fix arc4random_buf so it actually ever initializes -- a security problem with revisions 1.9 and 1.10. 2012-03-04 00:36:43 +00:00
dholland
e9f7fa95bf Clarify description of sticky bit, based on a 3-year-old suggestion by
Hubert Feyrer.
2012-03-04 00:07:44 +00:00
mbalmer
afd3d43b03 Add an empty line. 2012-03-03 11:32:14 +00:00
joerg
d2be1428c2 Avoid getcontext() as it triggers clobbering warnings. Use inline
assembler to get the fields directly. Saves a system call as side
effect.
2012-03-02 23:19:47 +00:00
joerg
12529f382e Fix indentation. 2012-03-02 18:11:53 +00:00
joerg
1d9862f144 Drop obsolete incompatibility note for interaction with libpthread. 2012-03-02 18:07:17 +00:00
joerg
a56440951d Separate pthread_t from thread stack. Drop additional alignment
restrictions on the thread stack. Remove remaining parts of stackid.
2012-03-02 18:06:05 +00:00
christos
2b01a8ad07 PR/46111: Wolfgang Stukenbrock: Add yp_setbindtries(3) so that yp operations
don't hang forever if requested.
2012-03-02 17:27:48 +00:00
wiz
e5899dd0ea Fix punctuation markup. 2012-03-01 21:31:10 +00:00
tron
df92d05dec Move "libexpat" from X11 into base which fixes PR lib/40346.
This change was approved by the Core Group.
2012-02-29 20:07:51 +00:00
matt
fc3d31db9e PowerPC doesn't have CERROR since it never had a.out.
Use _C_LABEL(__cerror) instead.
2012-02-27 15:47:11 +00:00
tsutsui
501876fe73 Fix pasto. 2012-02-27 14:48:34 +00:00
joerg
f46fb1259f Make __cerror protected to restore ABI leak in older libc versions,
where e.g. librt referenced the copy from libc. This still allows libc
to use PC-relative jumps.
2012-02-27 12:26:21 +00:00
tls
6e07f2d4dc Make arc4random far less greedy for entropy. Make arc4random actually
implement arc4 when used by threaded programs.
2012-02-27 04:25:12 +00:00
shattered
aaf49ded47 Xref zdump(8). OK by wiz@ 2012-02-25 10:56:52 +00:00
njoly
addd71bd1d Check if fstab file exists before trying to parse it, to avoid
warnings from {get,set}fsent() functions if missing.

dholland ok.
2012-02-24 18:00:09 +00:00
dholland
6c69bdb74e Note that gets() is finally dead in C11 and can be removed if we ever
bump libc.
2012-02-24 16:06:39 +00:00
christos
968af0c9f3 PR/46075: Asau: fix typo set_color_paid -> set_color_pair 2012-02-22 23:11:20 +00:00
martin
136a5cd515 Use C++ compatible declaration for posix_spawn (instead of the C99 specific
posix one).
2012-02-22 17:51:01 +00:00
christos
8aaa635ed5 PR/46049: Tim van der Molen:
clrtobot() and clrtoeol() do not set background attributes
2012-02-19 19:38:13 +00:00
matt
c18d70cbd8 Emit SA syscalls using SYS_compat_60_* 2012-02-19 19:18:40 +00:00
christos
be2404a773 remove unused variable 2012-02-17 23:58:36 +00:00
christos
f325545b10 Fix: CVE-2012-0864 fprintf() positional argument abuse.
Described in: http://www.phrack.org/issues.html?issue=67&id=9#article
Reported by Stefan Cornelius / Red Hat Security Response Team

- convert internal positional arguments bookkeeping from int to size_t
- provide overflow protection in positional argument spec
- convert loops to memset
- fix memory leaks
- limit positional argument stack offset to the number of arguments required
  by the printf to avoid coredump from va_arg() exhaustion.
2012-02-17 19:57:53 +00:00
joerg
52a4c27e3e Add _dlauxinfo helper function to provide access to the ELF auxilary
vector. This can normally be found via __ps_strings, but libc is
initialised too early when linked dynamically and doesn't have access to
it yet, so provide an alternative mechanism via ld.elf_so.
Bump libc minor.
2012-02-16 23:00:38 +00:00
joerg
3358b3a30d Make sure that membar_producer gets the proper namespace mangling for libc. 2012-02-15 15:49:46 +00:00
matt
62335767ce Add workaround for ARM cores that don't properly implement the MRC instruction
used for reading the thread pointer.  This is the corresponding change which
was made to <arm/mcontext.h>
2012-02-14 17:32:43 +00:00
dholland
7da608ca9c Update dangling references to quotactl(2), mostly now libquota(3), and to
quotactl(8), mostly now quotarestore(8). ok riz@
2012-02-13 19:53:24 +00:00
dholland
e7114a9280 Fix wrong xref; wrote quotactl(8), meant quotacheck(8). ok riz@ 2012-02-13 19:50:15 +00:00
njoly
e6f95d3fd6 Fix sched_set{param,scheduler} sections. 2012-02-13 16:35:59 +00:00
wiz
7f2677a5a5 Bump date for previous. 2012-02-13 13:23:29 +00:00
wiz
074fd0cb6c Merge descriptions for same error code. 2012-02-13 13:22:09 +00:00
dholland
62cfdf3316 Quota-related docs fixes:
- Remove old quotactl(2); replace with new __quotactl(2).
- Document quota_getrestrictions(3), the semantic restriction codes,
  and quota_quotaon/off(3).
- Update VFS_QUOTACTL(9), which was still describing the pre-proplib API.

Approved by releng for the freeze.
2012-02-13 01:24:00 +00:00
wiz
a49dba341d Remove duplicate function declaration. From Henning Petersen in PR 45998. 2012-02-12 13:52:51 +00:00
wiz
6234e98d3f Remove unused variables. From cppcheck via Henning Petersen in PR 45997. 2012-02-12 13:51:29 +00:00
martin
fcb6901656 Add missing <sys/spawn.h> include 2012-02-12 01:46:05 +00:00
martin
19f52532ad Add userland part of posix_spawn. Libc functions imported from FreeBSD.
Based on Charles Zhang's summer of code project.
2012-02-11 23:31:22 +00:00
njoly
341370651e Add missing Fa macro argument. 2012-02-10 15:21:53 +00:00
mbalmer
577cb3569f Add missing cast, fixes i386 build. releng ok. 2012-02-08 12:10:17 +00:00
christos
4b63973d52 Restore binary compatibility with netbsd-1.x for readdir(3). Tested with
a shark tcsh dynamic binary:

    tcsh: ELF 32-bit LSB executable, ARM, version 1, dynamically linked \
	(uses shared libs), for NetBSD, not stripped
    -rwxr-xr-x  1 root  wheel  994170 Jun 24  2004 /bin/tcsh

This would infinite loop on ls-F /dev
2012-02-08 03:24:30 +00:00
joerg
410d0f4380 Import the new apropos/whatis.
This code has been developed by Abhinav Upadhyay as part of Google's Summer
of Code 2011. It uses libmandoc to parse man pages and builds a Full
Text Index in a SQLite database. The combination of indexing the full
manual page, filtering out stop words and ranking individual matches
based on the section gives a much improved user experience.

The old makewhatis and friends are kept under MKMAKEMANDB=no for now.
2012-02-07 19:13:24 +00:00
rmind
f7fec0d2a4 Multiple NPF fixes, add better error reporting from kernel side, add some
asserts, bump the version.
2012-02-05 00:37:13 +00:00
joerg
eab3272778 ld.elf_so is reentrant. 2012-02-03 21:11:17 +00:00
manu
9724ab82d4 Make sure perfused exit when the filesystem crashed, so that unmount
is done. Failure to do so caused deadlocks, with operation that
held a lock on the root vnode and got stuck in perfused forever.

Approved by releng.
2012-02-03 15:54:15 +00:00
dholland
53787c1f86 Bump libquota.so major version (to 1) 2012-02-01 17:53:23 +00:00
dholland
4146833dd8 Remove old (5.99.48 - 5.99.62) libquota interface. 2012-02-01 17:52:07 +00:00
wiz
890a9f1122 Remove trailing whitespace. Bump date for previous. 2012-02-01 13:30:42 +00:00
manu
5036fcef74 Document when recv(2) returns 0 2012-02-01 13:29:15 +00:00
dholland
31f4a06fb0 Fix stupid bug in cursor_getn - it's supposed to return the number of
values retrieved, but it was returning 0 on success. Fortunately nothing
was using it yet.
2012-02-01 06:19:05 +00:00
dholland
1ce78a5fbd Add missing RCSID(). 2012-02-01 06:12:37 +00:00
dholland
832d4ca72b Be consistent about whether idtype and objtype codes are signed or
unsigned. They are signed. (While unsigned might have been a better
choice, it doesn't really matter and the majority of preexisting uses
were signed. And consistency is good.)
2012-02-01 05:46:45 +00:00
dholland
d2d6fa0ae1 Improve the names of some members of struct quotactl_args. These are
effectively function parameter names, but since they need to be
described with the same names in the man page the choices do matter.
Some.
2012-02-01 05:43:53 +00:00
dholland
59b296daa7 Change the syscall API for quotas over to the new non-proplib one.
- struct vfs_quotactl_args -> struct quotactl_args
   - add sys/stdint.h to sys/quotactl.h for clean userland build
   - install sys/quotactl.h in /usr/include
   - update set lists for same
   - add new marshalling code in libquota
   - add new unmarshalling code in vfs_syscalls.c
   - discard proplib interpreter code in vfs_quotactl.c
   - add dispatching code for the 14 quotactl ops in vfs_quotactl.c
   - mark the proplib quotactl syscall obsolete
   - add a new syscall number for the new quotactl syscall
   - change the name of the syscall to __quotactl()
   - remove the decl of the old quotactl from quota/quotaprop.h
   - add a decl of the new quotactl to sys/quotactl.h
   - update the libc build
   - update ktruss
   - remove proplib marshalling code from libquota
   - update copy of syscall table in gdb ppc sources
   - hack rumphijack to accomodate new quotactl name (as I recall,
     pooka wanted such a name change to simplify something, but I
     don't really see what/how)

This change appears to require a kernel version bump for rumpish
reasons.
2012-02-01 05:34:38 +00:00