Commit Graph

1967 Commits

Author SHA1 Message Date
joerg
eff7f134e1 \\ -> \e 2010-04-05 21:29:47 +00:00
joerg
1ff41cb93a Fix escape sequences 2010-04-05 21:29:09 +00:00
jruoho
c1b7f739cf Some interesting additions to the history section. From OpenBSD. 2010-04-03 14:49:31 +00:00
drochner
ebfe3c0a28 remove some stray __weak_aliases, where the target functions were
__RENAMEd due to the time_t/dev_t type changes, which caused bogus
references to compat functions
now a libc built with BUILDCOLD is usable
2010-03-23 20:28:58 +00:00
joerg
1c3412fa2f Use .In for header files instead of .Ar Pa and variations. 2010-03-22 19:30:53 +00:00
drochner
6cbc5cbff1 fix behavior in case of +-Inf or NaN input: return the proper
values and set *iptr
(This code is only used under non-default build options, and on m68k.)
2010-01-27 14:10:41 +00:00
dholland
c281fbb701 POSIX says realpath(NULL, foo) is supposed to yield EINVAL rather than
being allowed to crash. Go figure. Closes PR lib/42559 from Stathis Kamperis.
2010-01-01 19:59:21 +00:00
matt
dc05324fb7 Make sure the kernel doesn't pass back 0 for pagesize. 2009-12-14 01:04:46 +00:00
tnozaki
3f8ca7c44a guard single-dot from modification by the application
(SUSv3 spec don't forbid this brutal operation).
this idea taken from OpenBSD's version of basename(3) and dirname(3).
2009-11-24 13:34:20 +00:00
plunky
369de522d5 fix VIS_HTTPSTYLE to not convert "safe" ($-_.+) and "extra" (!*'(),)
characters as mentioned in rfc1738 and rfc1808 and, I think intended
all along in this code but the logic was inverted.

Don't use strchr as it also matches the NUL character which we want
to escape, just compare against the chars directly as done in the
FreeBSD code.
2009-11-23 10:08:47 +00:00
stacktic
da8c43524c Make sure fts_statp is NULL when FTS_NOSTAT is set 2009-11-02 17:17:34 +00:00
bouyer
e0f9b22254 Remove closes 3 and 4 from my copyright. 2009-10-22 21:50:01 +00:00
snj
550147bd6a Remove 3rd and 4th clauses in christos' license. OK christos. 2009-10-21 01:07:44 +00:00
elad
6780ec6543 CTLFLAG_READONLY[12] are long gone. 2009-09-26 04:43:48 +00:00
he
6218a6dafa Introduce a new accessor macro N_NAME() to access the n_name field
in struct nlist, since it's accessed differently depending on
whether we do a.out or not.  Use this macro as appropriate in the
nlist* functions.
Also replace some includes of <a.out.h> with <nlist.h>, to fix build
problem for mips.
2009-08-21 08:42:02 +00:00
martin
bc27f3e093 forward declare struct nlist before including nlist_private.h to avoid a
compiler warning.
2009-08-20 11:08:59 +00:00
he
4cf9cdf39a Actually, when we really need the a.out defines from <nlist.h>, we
need to include <a.out.h> anyway.  Move it inside #ifdef NLIST_AOUT.
2009-08-20 10:19:36 +00:00
he
3a05737d04 Instead of including <a.out.h> to get at "struct nlist" (with a comment
to explain it), include <nlist.h> instead, so that our mips ports don't
error out in the absence of aout_machdep.h.
2009-08-20 08:30:04 +00:00
joerg
8a6f35af57 Fix markup. 2009-08-19 15:43:02 +00:00
christos
f227975929 Version fts one more time! This is the most versioned API ever... Bump
fts_level from short to int to avoid a potential DoS.
From Maksymilian Arciemowicz
2009-08-16 19:33:38 +00:00
matt
3308ff5cbf Only include <sys/exec_aout.h> if NLIST_AOUT is defined.
Don't define NLIST_AOUT for mips anymore.
2009-08-16 03:56:26 +00:00
alc
3831d4ed46 Bump date. 2009-07-22 22:54:15 +00:00
alc
2f42139c8e Constify the fourth argument of sysctlbtname(3) (ie. `newp', the pointer to
the new value).

This change sync sysctl(3) and sysctlbtname(3) prototypes.

No objection on <tech-userlevel>
2009-07-22 22:53:41 +00:00
wiz
282b14962b Bump date for last effective change (2008). 2009-05-18 09:02:35 +00:00
wiz
51004b901f Remove duplicate 'the' found by Jukka Salmi. 2009-04-20 08:37:22 +00:00
mrg
fc2793ab5b add some code to cope with dev.db's that have 32 bit time_t's in them.
shouldn't be relevant very much as dev.db should be re-created at boot,
but it helped me at least twice so far...
2009-04-19 10:19:26 +00:00
wiz
8b5179c21c Add CAVEATS section:
Due to limitations in the current pthread implementation, makecontext(3)
and sigaltstack(2) should not be used in programs which link against
libpthread (whether threads are used or not).

Wording from drochner@ and ad@

Bump date for man pages.

Add note in libpthread/README so it's not forgotten to update the man
pages when the problem is fixed.
2009-04-16 18:37:29 +00:00
joerg
79c74bd3c8 Fix markup. 2009-04-11 15:30:49 +00:00
wiz
68bd1a898e Link glob(3) to glob_pattern_p(3). 2009-04-08 19:28:48 +00:00
wiz
c2c2c34d00 Add glob_pattern_p to NAME section. 2009-04-08 19:27:39 +00:00
christos
1ef020be5f add glob_pattern_p for glibc because cvs needs it and it is a huge mess
to compile in the gnu glob code.
2009-04-08 16:28:50 +00:00
drochner
a75975a121 minor fix in description of an error condition 2009-03-24 22:34:54 +00:00
joerg
c2d267f257 Remove redundant markup as .Bl does vertical spacing already. 2009-03-15 09:31:07 +00:00
joerg
ec28f83cbc Give the full prototype for all ctype functions/macros.
Remove redundant .br.
2009-03-11 12:57:03 +00:00
joerg
bfe775a869 Remove redundant .Pp 2009-03-10 23:14:40 +00:00
joerg
ed0b365527 Use .An for the author instead of more physical .Bl. 2009-03-10 20:59:49 +00:00
joerg
997634fe14 Fix preamble to match order set out by mdoc(7). Discussed with wiz. 2009-03-09 19:24:26 +00:00
christos
c9216fc526 no more weak here. 2009-03-01 19:59:55 +00:00
pgoyette
e3eb5958e0 Avoid possible integer overflow and subsequent collateral damage.
Received from OpenBSD via US-CERT as VU #590371.

Original OpenBSD commit log:

> revision 1.42
> date: 2009/02/11 13:24:05;  author: otto;  state: Exp; lines: +9 -1
> Avoid level going negative on deep (i mean really deep) dirs. Reported
> by Maksymilian Arciemowicz. ok kettenis@ millert@
2009-02-28 14:34:18 +00:00
lukem
be48221f4f A variation on the sign-compare fix for these. 2009-02-16 10:40:45 +00:00
tron
ae34e73bcb Fix -Wsign-compare issue (on NetBSD/sparc64). 2009-02-16 10:34:15 +00:00
lukem
e95441b0ce fix -Wsign-compare issue (on alpha) 2009-02-16 05:22:00 +00:00
lukem
deeb06e363 sign-compare fixes 2009-02-12 04:13:08 +00:00
lukem
8483a30314 sign-compare fix 2009-02-12 04:10:52 +00:00
christos
028f3ea750 fix typo * -> & from enami. 2009-02-11 13:52:28 +00:00
christos
ed71b85e85 remove debugging. pointed by enami 2009-02-11 13:51:59 +00:00
christos
bb0dd61478 Add RFC 2045 MIME Quoted-Printable support. 2009-02-10 23:06:31 +00:00
lukem
f0772e2d1f sign-compare fix 2009-02-06 23:47:44 +00:00
lukem
6f550c4d36 sign-compare fix 2009-02-05 23:52:55 +00:00
lukem
14fddbd703 fix sign-compare issue 2009-02-03 05:21:24 +00:00
wiz
b85179b9a1 Remove empty trailing line. 2009-01-30 23:52:28 +00:00
ad
397f5192b2 Update for SUSv2 compliance. 2009-01-30 23:26:54 +00:00
rmind
97267cc4e2 Change raise(3) to be thread-aware - send the signal to current LWP.
From <ad> via PR/40341.
2009-01-29 23:52:21 +00:00
enami
4e5aed7e08 Put back rev. 1.20 so that nbpwd_mkdb built on 32bit time_t host generates
correct pwd.db.
2009-01-29 10:41:39 +00:00
drochner
ad965be01b cleanup after devmajor_t:
-since getdevmajor(3) is now binary compatible again with <=5.0
 there is no need to rename, I've just left a __getdevmajor50 symbol
 temporarily for those who track -current
-update manpage
2009-01-20 20:08:12 +00:00
drochner
d767912be3 Change major()/minor() to return 32-bit types again, called
devmajor_t/devminor_t, as proposed on tech-kern.
This avoids 64-bit arithmetics and 64-bit printf formats in parts
of the kernel where it is not really useful, and helps clarity.
2009-01-20 18:20:47 +00:00
christos
461a86f9bd merge christos-time_t 2009-01-11 02:45:45 +00:00
lukem
4a94e73441 Change the second argument of getlogin_r() from int to size_t, per POSIX. 2009-01-06 11:16:46 +00:00
wiz
a711e8e9e4 Fix HTML output. 2009-01-04 09:42:43 +00:00
dholland
6557571403 Rework the text to make it clearer; it was really pretty confusing before.
Add an example; note some bugs/shortcomings. Bump date.
2009-01-04 07:54:15 +00:00
lukem
a2c38ed82e Ensure fts_close() doesn't spuriously close fd 0,
by testing FTS_SYMFOLLOW in fts_flags instead of fts_options.
Fix provided by Ben Harris in PR 40319
2009-01-03 06:12:14 +00:00
tnozaki
52ed7b035f Fixes PR lib/39662, shortcomings in LC_{MONETARY,NUMERIC,TIME,MESSAGES} db format.
ok'ed by core and releng.
(thanks for agc@, snj@ and i'm sorry for long time patience).

[libc]
- localeio.[ch] and lc*.[ch] in src/lib/libc/locale was replaced by
  new locale-db implementation using citrus_db backend,
  see src/lib/libc/citrus/citrus_lc_*.[ch].
- add citrus_bcs_strtou?l.c. don't use strtou?l locale implementation
  internally, because they're locale-aware function.
- add some stubs for multi-locale issue, see {current,global}_locale.c.
- remove some obsolete file, setrunelocale.c, ___runetype_mb.c.
- remove __savectype() from ctypeio.[ch].

[tools]
- mklocale(1): add new option ``-t'' that generates new style
  LC_{MONETARY,NUMERIC,TIME,MESSAGES} locale-db format.
- chrtbl(1): added ctypeio.[ch] for __savectype().

[locale-db]
- added en_US.US-ASCII locale.
- removed some shareable locale definition file:
    en_US.US-ASCII -> en_US.ISO8859-1, en_US.UTF-8
    zh_CN.eucCN -> zh_CN.GB18030
    and more...see src/share/locale/*/Makefile.
- remove obsoleted locale sr_YU, added new locale sr_ME, sr_RS.
- change locale name ja_JP.ISO2022-JP* -> ja_JP.ISO-2022-JP*
  for X11's locale.alias file alignments.
- fix regression test, wrong wcs?width(3), NAN/INF usage.

i tested release-build following arch:
  i386, amd64, hpc{mips,arm,sh}, sparc64, vax.

citrus_lc_*.[ch] also can read old-plain-text style locale-db.
so that backward compatibility is keeped, but lc*.[ch] can't read
new citrus_db'ed locale-db and localeio.c never check sanity,
so forward compatibility is broken ;-<

old mklocale(1) doesn't know -t option, so you have to rebuild toolchain.
2009-01-02 00:20:18 +00:00
christos
c900253da8 Martin says:
I had added a getaddrinfo()/getnameinfo() lookup to obtain an FQDN even
if gethostname() would return only the local part of the hostname.
I did not really consider that many systems do not have FQDNs and more
importantly that the calls introduce a high latency (timeout) when DNS
is not available.

On the other hand I do not (or no longer) think that using a non-FQDN is
such a big problem here. Those users/admins that do collect logs from
different hosts and want an FQDN should notice the problem quickly
enough and can easily fix it by correctly setting their hostname.
2008-12-10 15:20:04 +00:00
wiz
edd8540874 New sentence, new line. Bump date for fdopendir. 2008-12-05 13:26:41 +00:00
ad
117c67b2f2 Add fdopendir(), from Solaris/Linux. 2008-12-05 13:08:53 +00:00
matt
0ad7281825 Add new ptree (Patricia / RADIX tree) implementation to NetBSD. 2008-11-20 23:50:08 +00:00
reed
a4bfac4a14 Reference secmodel_securelevel(9) manual page. 2008-11-11 00:09:36 +00:00
cube
26d23ca1c6 Invert the test for the return value of getaddrinfo(), because that's what
is actually meant there, to do nothing when the name doesn't resolve to an
address.
2008-11-03 23:21:19 +00:00
wiz
9a02e1d47d New sentence, new line. Mark up NULL with Dv. 2008-11-01 13:54:01 +00:00
christos
8cda436bf2 fix compile error. 2008-10-31 17:49:48 +00:00
christos
1c6aec2060 Import syslogd SoC project by Martin Schuette:
- new syslog protocol api syslogp(3) that supports structured data
	  and draft-rfc timestamps
	- reliable tcp connections with queueing
	- encrypted connections
2008-10-31 16:12:18 +00:00
dogcow
990e83b99d appease lint: warning: assignment in conditional context [159] 2008-10-22 02:17:29 +00:00
christos
b602f406f7 - vsyslog_r only closes if it opened
- maintain opened properly
- preserve the tag (from OpenBSD)
2008-10-21 21:00:31 +00:00
lukem
2060495782 fix unused variable if !defined(FTS_ALLOC_ALIGNED) 2008-09-27 15:12:00 +00:00
lukem
7fb0a8b2f3 Add fts_free() to complement fts_alloc(), and use instead of free().
Should avoid a memory leak on systems without ALIGNBYTES.
2008-09-20 00:14:12 +00:00
christos
6f1e299202 From Ilya Dogolazky: Fix return value doc. 2008-09-17 22:08:52 +00:00
rmind
0f80b1578d Arguments were swapped for cpuset_set(), cpuset_clr(), cpuset_isset()
functions, but man pages were not updated (hi Christos!).
2008-09-12 13:39:04 +00:00
apb
a1dad6e718 Fix some errors in examples, noticed by Robert Elz:
* use \e in the source to get a backslash in the output.
* test whether the result from shquote[v]() is -1 before, not after,
  adding 1 to it.
2008-09-07 08:55:46 +00:00
lukem
490ac90f8e Add strunvisx(3) as a link to unvis(3) 2008-09-05 04:52:34 +00:00
lukem
6fb06e2c97 In strsvisx(), don't attempt to read the "next" character past the end
of the provided length.
2008-09-04 09:41:44 +00:00
christos
80a5932343 setup _POSIX2_C_BIND per SUSv3, from Andy Shevchenko 2008-08-27 08:56:49 +00:00
lukem
4638a08a72 Use Qq instead of Qc to quote a single word 2008-08-26 05:04:19 +00:00
matt
c331e46238 Add support for missing _SC_* constants for sysconf().
From andy dot shevchenko at gmail dot com
2008-08-06 17:17:03 +00:00
dsl
9edd12efca Change the gross #defines HVIS and SVIS into local functions. 2008-07-25 22:29:23 +00:00
matt
48717a981d Move rb.c from sys/lib/libkern to common so it can be in both libc and libkern. 2008-06-30 19:03:59 +00:00
ad
2a7116daf3 ttyname_r is another of the strange functions that returns its error code
instead of setting errno.
2008-06-25 11:47:29 +00:00
ad
3ae2f84118 Add _SC_TTY_NAME_MAX. 2008-06-25 11:46:11 +00:00
ad
5f64faa3a9 Add getlogin_r. Manual page changes mostly lifted from FreeBSD. 2008-06-25 11:10:24 +00:00
ad
d29b52efe8 Return -1 for the unsupported realtime extensions. 2008-06-25 11:09:20 +00:00
ad
e7bd22925c A few more POSIX defs for threads. 2008-06-24 14:06:55 +00:00
wiz
688c5830e1 Clarify a sentence. 2008-06-22 08:25:26 +00:00
he
842f96408c Correct the use of MLINKS for the cpuset_* manual page links.
The value for MLINKS is a list of pairs, where the original manpage
is listed first in each pair...
2008-06-17 00:10:54 +00:00
rmind
e6acd90e07 - Add affinity(3) manual page, which describes thread affinity,
pthread_setaffinity_np(3) and pthread_getaffinity_np(3) functions,
  provides simple code example.
- Add cpuset(3) manual page, which describes API of CPU-sets.

Thanks <wiz> for many improvements!
2008-06-16 14:25:49 +00:00
christos
22c4053358 PR/38539: Ed Ravin: libc/gen/syslog.c always logs to console if LOG_CONS is set.
While here:
1. Don't loop forever, handle closing and opening the log after each send.
2. Release the lock later, after we've possibly printed to the console.
2008-06-12 20:43:14 +00:00
enami
ed3ed8f740 Refer sigprocmask(2) instead of non existing sigmask(2). Also, xref
sigprocmask(2) and pthread_sigmask(3).
2008-05-31 16:15:07 +00:00
ad
27d03b16a5 Fedora Core 9 doesn't provide ARG_MAX, so use _POSIX_ARG_MAX if it's
not available.
2008-05-26 13:06:38 +00:00
christos
8e11cb8cb8 undo the constification of the argument. Per opengroup. 2008-05-10 22:39:40 +00:00
tonnerre
34f7daa87e Fix a bug in the implementation of seekdir(). If the first entry in
a block has been unlinked, seekdir() may overshoot by one entry.
Thus, _readdir_unlinked() must not skip deleted entries when being
called from seekdir().
Christos agreed.
2008-05-04 18:53:26 +00:00
martin
cd22f25e6f Move TNF licenses to 2 clause form 2008-05-02 18:11:04 +00:00
christos
5614cf4051 Mention errno settings on failure. 2008-04-30 14:51:10 +00:00
martin
11a6dbe728 Convert TNF licenses to new 2 clause variant 2008-04-30 13:10:46 +00:00
martin
3028e483e4 Convert to new 2 clause license 2008-04-29 06:53:00 +00:00
martin
ce099b4099 Remove clause 3 and 4 from TNF licenses 2008-04-28 20:22:51 +00:00
plunky
043900c0cb constify dirname(3) and basename(3) 2008-04-23 07:53:26 +00:00
apb
01a2b8e8ab Clarify the range of the result from toascii. 2008-04-17 16:41:00 +00:00
apb
576ccca3eb When given negative inputs, isascii returns false. Clarify that
it checks for the range 0 to 127, not "less than or equal to 0177".
2008-04-17 16:40:20 +00:00
apb
a754895afc Refer to the CAVEATS section of ctype(3) for more information. 2008-04-17 16:25:36 +00:00
apb
bafb5bb96d * Expand the CAVEATS section with a lot more detail on how to safely
use the ctype functions.
* Use toupper((int)(unsigned char)*s)) instead of just
  toupper((unsigned char)*s) in an example.
2008-04-17 16:24:40 +00:00
njoly
3c71964512 Fix _SC_MQ_OPEN_MAX/_SC_MQ_PRIO_MAX sysctlgetmibinfo calls.
The corresponding sysctl nodes are available under kern.mqueue tree.
2008-04-09 18:37:04 +00:00
rtr
f2575a3983 whitespace fix 2008-04-05 08:01:54 +00:00
dholland
5b571a159f Add a note clarifying that getprogname() results are not trustable in a
setugid environment. Prompted by PR 38327 discussion.
2008-03-29 16:51:40 +00:00
lukem
da757a063f Style tweaks:
* test defined(HAVE_foo) not just HAVE_foo
* replace u_foo with unsigned foo
* the whitespace change whose name we dare not mention
2008-03-10 01:18:44 +00:00
yamt
b82fd04ee9 sysconf: cache the result of _SC_PAGESIZE. 2008-03-08 13:34:40 +00:00
ad
1046045268 Keep one builtin slot so that pthread initialization doesn't need to use
malloc().
2008-03-07 17:56:39 +00:00
christos
5b9284aa07 GLOB_NO_DOTDIRS patch from mouse@
Fixes re-definition of GLOB_PERIOD.
2008-02-22 18:33:51 +00:00
jmmv
2630bb2c25 Document dehumanize_number(3). 2008-02-09 09:09:04 +00:00
christos
0d149bc5fe Add csetexpandtc() 2008-02-02 20:56:46 +00:00
christos
56709adfc9 Try to fix previous commit of /.. and /. handling for GLOB_PERIOD. I will
write a regression test for this.
2008-02-01 23:29:54 +00:00
apb
9eaab5ee00 Mention use of /var/run/dev.db, and add .Xr dev_mkdb 8 .
Could somebody update the HISTORY?
2008-01-30 19:24:59 +00:00
rmind
b5e9addd22 sched_setparam: fix the case when incorrect (according to the class)
in-kernel priority is used.  Reported by <drochner>.

Minor fixes for scheduling calls to conform the POSIX:
- If pid is equal to zero, use the calling process;
- In case of permission problem, return EPERM instead of EACESS;
- sched_setscheduler() should return previously used policy;
- pthread_* calls should return the error code or zero;

Should fix the namespace problems (and builds of some packages):
- Move cpuset_t defintion from pset.h to sched.h;
- Remove the #include of pset.h in pthread.h;
2008-01-26 17:55:29 +00:00
christos
00f5cbb6dc From Richard M Kreuter: GLOB_PERIOD fix for trailing ./ or ../ 2008-01-18 16:20:00 +00:00
rmind
5c71a4d49f Implementation of processor-sets, affinity and POSIX real-time extensions.
Add schedctl(8) - a program to control scheduling of processes and threads.

Notes:
- This is supported only by SCHED_M2;
- Migration of LWP mechanism will be revisited;

Proposed on: <tech-kern>. Reviewed by: <ad>.
2008-01-15 03:37:10 +00:00
elad
e7f75b7de6 PR/35562: khorben at defora dot org: Potential denial of service when
listing files on an NFS share

Limit the number of retries as suggested in the PR.

Reviewed by and okay fvdl@.
2008-01-10 09:49:04 +00:00
simonb
d8de5b102b Remove support for NetBSD/pc532. 2008-01-09 11:25:58 +00:00
christos
aa33183605 Simplify and check for snprintf() error. 2008-01-03 04:26:27 +00:00
christos
8bb176858f block signals before playing with files. From Anon Ymous 2008-01-01 21:22:55 +00:00
yamt
b367d7f8b2 fix indentation. 2007-12-14 19:51:37 +00:00
xtraeme
5ee1eac43a Fix up a comment. 2007-12-14 17:32:47 +00:00
christos
6d28b23da6 - add dehumanize_number
- decls for humanize_number and dehumanize_number are in stdlib.h
2007-12-14 17:26:19 +00:00
xtraeme
486b2ff085 The humanize_number(3) proto will be available in stdlib.h, after
christos moves it to the correct place.
2007-12-14 16:31:20 +00:00
christos
14c8a52580 From Richard M Kreuter, add GLOB_PERIOD. 2007-12-05 20:25:54 +00:00
christos
7d0c83db72 make _FORTIFY_SOURCE play nicely with lint 2007-10-26 19:48:14 +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
rmind
2cecf9bbe9 Implementation of POSIX message queues.
Reviewed by: <ad>, <tech-kern>
2007-09-07 18:56:02 +00:00
wiz
e3d3393d01 Add xref to shquote(3), suggested by joerg. Bump date. 2007-08-02 23:45:10 +00:00
yamt
8a52d96235 add a comment. 2007-07-20 12:41:07 +00:00
christos
fede0a77fc kill MFSNAMELEN 2007-07-17 20:03:10 +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
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
1418345039 Make these work with _FORTIFY_SOURCE, by overriding the fortified definitions 2007-06-03 17:39:26 +00:00
christos
36a3340867 PR/36299: Greg Woods: Add namespace protection for sl_delete. 2007-05-09 17:10:29 +00:00
rmind
0994dd0691 - Create sysctl nodes for AIO.
- Add POSIX defined system variables and constants of AIO_LISTIO_MAX and
  AIO_MAX values.  Both with _POSIX_ASYNCHRONOUS_IO, provide them in
  sysconf(3) and getconf(1) interfaces.
- Clean up sysconf(3) for handling sysctl nodes dynamically.
2007-05-01 01:01:25 +00:00
enami
fab1fda977 Fix a bug that humanize_number() produces "1000" where it should be "1.0G"
or "1.0M".  The bug reported by Greg Troxel.
2007-03-13 02:52:10 +00:00
drochner
7161d089aa -get cabs() and cabsf() out of public view - these are historical and
conflict with C99 functions which are builtins in newer gcc
 (actually, the old cabs() is ABI compatible with the new _complex one
  on i386, but this is purely accidental)
 remove public prototypes and manpages, move the code into a compat
 subdirectory as libc does so that binary compatibility is kept
-add a manpage for the isgreater() etc macros, borrowed from FreeBSD
2007-02-22 22:08:17 +00:00
oster
5422c82afe Add "local" versions of getnetgrent() et al. and now call those for the NIS
versions.  Fix conditional compilation issues with YP and NSS_FILES.
2007-02-07 19:12:44 +00:00
oster
0271ab9db4 nsdispatch()-ify getnetgrent() and friends.
Approved by: christos
2007-02-06 15:17:54 +00:00
christos
3ab861054c make this compile with DIAGNOSTIC 2007-02-03 16:22:48 +00:00
christos
0e61db23eb Compile with DIAGNOSTIC 2007-02-03 16:17:15 +00:00
christos
b513fb7c0a make this compile with DIAGNOSTIC 2007-02-03 16:12:47 +00:00
wiz
9e27ce3c1f Sort sections. 2007-01-20 13:11:36 +00:00
cbiere
75289275f1 isascii() and toascii() are defined for all integers unlike the other
functions. Explicitely mention "undefined behavior".
2007-01-18 11:33:13 +00:00
rillig
4d81a78185 Added a reference to ctype.3. What's the value of having that page at
all if it isn't referenced by others?

Suggested by Slava Semushin via private mail.
2007-01-18 08:35:07 +00:00
rillig
8b4906df56 Added a warning about a wrong usage, which is nevertheless often found
in real code, and an example code that does it correctly.
2007-01-18 08:33:34 +00:00
hubertf
55ac93d329 Remove more duplicate #includes, and a few spurious whitespaces at EOL
From Slava Semushin <slava.semushin@gmail.com>
2007-01-17 23:24:22 +00:00
cbiere
f13e324ee5 Bail out on the first sysctl() error as suggested by Pierre Pronchery in
PR lib/35403. christos agreed it's cleaner.
2007-01-15 22:26:35 +00:00
wiz
168147d486 Sort sections. 2006-12-23 09:04:23 +00:00
wiz
5021afa87b Sort error descriptions. 2006-12-18 00:09:59 +00:00
mjf
c31a06a820 Update to reflect recent changes to confstr(3). 2006-12-08 15:57:07 +00:00
pavel
edab74570a Move the description of sysctl MIBs from sysctl.3 to a new manual page
sysctl.7. Remove the list of MIBs from sysctl.8 so we don't have to
maintain duplicate information, as proposed by YAMAMOTO Takashi on
tech-userlevel. Also remove references to header files from sysctl.8.

The numeric constants remain documented, they are still needed in some
cases. See the discussion on tech-userlevel. ("mib list in sysctl.8")

OK by YAMAMOTO Takashi.
2006-12-04 08:59:13 +00:00
christos
8b3eb79f93 PR/35170: Guy Harris: confstr() should return 0, not -1, on errors 2006-12-03 00:39:19 +00:00
christos
47fd231e41 ansi, minor knf, no functional change. 2006-12-01 18:57:29 +00:00
elad
174436830e Adapt to recent Veriexec sysctl(9) changes. 2006-11-27 17:55:12 +00:00
christos
52e2f11be9 PR/35129: David A. Holland: exit in utmpx code should be _exit 2006-11-26 17:33:23 +00:00
christos
df031f1edc PR/34837: Mindaguas: Add SysV SHM dynamic reallocation and locking to the
physical memory
2006-11-25 21:40:04 +00:00
christos
1665d5e960 fix spelling of accommodate; from Zapher. 2006-11-24 19:46:58 +00:00
elad
3dc874e6b2 Add note about Segvguard interface/implementation being experimental and
with the potential to change in future releases.
2006-11-23 17:24:36 +00:00
christos
4ca73ce810 Don't expose _ss functions for 4.0. Requested by core. 2006-11-22 17:23:24 +00:00
elad
a84fee7faf Initial implementation of PaX Segvguard (this is still work-in-progress,
it's just to get it out of my local tree).
2006-11-22 02:02:51 +00:00
christos
21b2d7e28c on non-x86 execl*.c needs alloca. 2006-11-11 21:16:00 +00:00
christos
0b1f5855c2 no stack protector warning for execvp 2006-11-09 04:00:11 +00:00
christos
4ba9b8cfbe undo the previous; we need alloca here, otherwise the parent will leak on
vfork.
2006-11-09 03:57:26 +00:00
christos
e0d6d71d76 use mmap instead of malloc because we may have vforked. pointed out by yamt. 2006-11-09 02:51:52 +00:00
christos
249933b899 if we are using ssp, use malloc instead of alloca. 2006-11-08 23:27:32 +00:00
christos
b442c7cdd1 weak for syslog_ss 2006-11-05 04:35:35 +00:00
christos
95c7627c87 use FD_CLOEXEC instead of 1. 2006-11-03 20:18:49 +00:00
christos
1083e07a50 - verify that the log file is usable, otherwise re-open it.
- if the file is re-opened, clear the connected flag.
- don't check that the file is opened before connecting, because the
  file will be opened then.
2006-11-02 20:36:29 +00:00
cbiere
4b14bb6309 Changed error message of ENOPROTOOPT to "Protocol option not available". 2006-10-31 00:38:06 +00:00
wiz
bb93eb1630 Remove trailing whitespace. Use .Bl -enum for an enumeration. 2006-10-28 22:50:16 +00:00
christos
5c60f22be5 need to negate before masking; from abp. 2006-10-27 21:36:50 +00:00
christos
d15d9f8a71 add async-signal-safe versions: syslog_ss and vsyslog_ss
multithread-safe syslog_r and vsyslog_r are not async-signal-safe.
2006-10-27 20:00:55 +00:00
uwe
b0f3335e9a Add syslog_r.3 link (hi christos). 2006-10-27 01:24:26 +00:00
wiz
d8f71c6e09 Various fixes. 2006-10-26 13:08:17 +00:00
christos
64c9721228 don't use strerror_r in the re-entrant case. 2006-10-26 10:00:38 +00:00
christos
77f9f63fa2 add _r functions for syslog from OpenBSD 2006-10-25 23:49:31 +00:00
uwe
87cd2874b2 G/c check() macro, b/c it's used only twice and the off < 0 test is
useless in the first case (off is 0), and causes error with new gcc
(comparison of unsigned expression < 0 is always false) in the
second.

While here fix a typo in a comment and use less indent to make BAD and
BADUNMAP definitions fit 80 columns.

XXX: The second check should probably be more elaborate to protect
against bogus/malicious COFF files.
2006-10-25 20:43:49 +00:00
he
b98baf7a62 Avoid "unsigned < 0" comparison by open-coding the remaining part
of the check() macro.
2006-10-23 15:27:41 +00:00
yamt
355bbc5cdf document tcp.abc. 2006-10-19 11:48:02 +00:00
christos
ce2c90c7c1 fix incomplete initializers 2006-10-15 16:14:46 +00:00
christos
3b77d4bc25 instead of using the (void)&foo kludge to avoid longjmp clobbering of variables
make the variables volatile as needed.
2006-10-15 16:12:02 +00:00
wiz
22b0689a70 Bump date for previous. 2006-10-13 21:12:51 +00:00
rpaulo
f3330397f0 Modular (I tried ;-) TCP congestion control API. Whenever certain conditions
happen in the TCP stack, this interface calls the specified callback to
handle the situation according to the currently selected congestion
control algorithm.
A new sysctl node was created: net.inet.tcp.congctl.{available,selected}
with obvious meanings.
The old net.inet.tcp.newreno MIB was removed.
The API is discussed in tcp_congctl(9).

In the near future, it will be possible to selected a congestion control
algorithm on a per-socket basis.

Discussed on tech-net and reviewed by <yamt>.
2006-10-09 16:27:07 +00:00
elad
e18b1bdd1d PR/27233: Arto Selonen: 'options BUFCACHE' vs. 'sysctl vm.bufcache'
documentation differs
2006-10-08 15:56:50 +00:00
elad
0dd96e541d PR/19444: IIMURA Takuji: usleep(0); seems to microsleep(1);
Patch applied, thanks!
2006-10-08 15:25:28 +00:00
rillig
30991c10e3 Fixed the wording of the <ctype.h> character classification functions by
always using "function" instead of "macro".

Changed "undefined result" into "undefined behavior" for argument values
outside the valid range. Since the character table is allocated via
malloc(), it _may_ happen that it starts at a page boundary, so that
negative values for the argument result in a segmentation fault. In that
case, there is no result at all.
2006-10-05 22:34:52 +00:00
elad
5c38108d28 Change the PaX mprotect(2) restrictions' "global_protection" knob to
just "global" -- it's shorter and more readable. Update documentation.
2006-09-26 14:48:40 +00:00
wiz
9934420870 Only mark up one word, not the whole sentence. 2006-09-06 18:59:21 +00:00
liamjfoy
ecc29b2222 document net.inet.ip.maxflows. dump date. 2006-09-06 18:56:21 +00:00
rpaulo
2fb2ae3251 Import of TCP ECN algorithm for congestion control.
Both available for IPv4 and IPv6.
Basic implementation test results are available at
http://netbsd-soc.sourceforge.net/projects/ecn/testresults.html.

Work sponsored by the Google Summer of Code project 2006.
Special thanks to Kentaro Kurahone, Allen Briggs and Matt Thomas for their
help, comments and support during the project.
2006-09-05 00:29:35 +00:00
liamjfoy
36661dd3cb Update for carp(4). Bump date.
from openbsd
2006-09-04 23:16:22 +00:00
christos
72c3baadfe Remove ad clause. Approved by board@ 2006-08-28 20:42:12 +00:00