Commit Graph

1590 Commits

Author SHA1 Message Date
lukem 2ffe6b72ba Use _GETGR_R_SIZE_MAX from <limits.h> rather than defining a private version. 2004-11-10 06:10:03 +00:00
lukem cdfecd6b76 whitespace cleanup 2004-11-10 04:57:17 +00:00
lukem 9c82800a69 Add: getgrgid_r(3) getgrnam_r(3) getpwnam_r(3) getpwuid_r(3) 2004-11-10 04:52:30 +00:00
lukem 364ede827b need <limits.h> for _SC_GET{GR,PW}_SIZE_MAX 2004-11-10 04:46:01 +00:00
lukem 97dddd4f3a Document _SC_GETGR_R_SIZE_MAX and _SC_GETPW_R_SIZE_MAX 2004-11-10 04:21:25 +00:00
lukem 663b3e58e0 Use _GETPW_R_SIZE_MAX from <limits.h> rather than defining a private version. 2004-11-10 04:11:34 +00:00
lukem 246f6fd919 Implement sysconf(3) _SC_GETGR_R_SIZE_MAX and _SC_GETPW_R_SIZE_MAX for
the 1003.1-2001 Thread Safe Functions (TSF) getgrnam_r(3) and getpwnam_r(3).

These are not implemented in sysctl(3) "user.*", since that adds a lot
of complexity in the implementation for no real benefit.
2004-11-10 04:02:52 +00:00
lukem 103626c6a0 default to "compat" not "files" 2004-11-01 08:21:34 +00:00
lukem c49e808721 #include "reentrant.h" instead of <threadlib.h> 2004-10-29 06:32:08 +00:00
dsl 1793b7dd69 Use (unsigned char) cast to sanitise arguments to ctype functions. 2004-10-28 21:14:52 +00:00
dsl d349cd6749 Fix a load of international alphabet problems with isxxx() and toupper()
Change isspace(*char_ptr) to isspace(*char_ptr & 0xff) so that the correct
piece of memory is looked at for the bit mask.
gcc optimises out the '& 0xff' (on i386 at least).
Fixes problems found by gcc when the splurious (int) cast is removed
from the #defines in ctype.h
2004-10-27 19:59:24 +00:00
lukem feb92219d9 Protect access to all public functions via a mutex as some of the backends are
not reentrant (such as compat getgr*_r, because it uses the non reentrant
_{dns,nis}_getgrent() backends to implement `+group').
2004-10-24 14:52:46 +00:00
lukem a48f586379 Protect access to all public functions via a mutex as some of the backends are
not reentrant (such as compat, because it uses the non reentrant getnetgrent(3)
to implement `+@netgrp' & `-@netgrp').
2004-10-24 14:46:23 +00:00
lukem 893983131b minor KNF, making it easier to find where fork() is implemented 2004-10-21 06:46:36 +00:00
enami 461001f32f Fix some typos. 2004-10-15 15:19:02 +00:00
enami b07577d748 Don't break line at the space since it is not a word separator but
an example of space character.
2004-10-15 15:07:54 +00:00
daniel 84a34aedec Add vm.bufcache, vm.bufmem, vm.bufmem_lowater, m.bufmem_hiwater (PR misc/27247, misc/27233). 2004-10-15 08:47:16 +00:00
lukem b7fcf76aa6 Fix MKYP=no MKHESIOD=no build.
Rename an internal function to a more appropriate name.
2004-10-11 09:42:06 +00:00
lukem dd9512e81e Ensure that _nis_start(&state) has been called before using PASSWD_BYNAME()
or PASSWD_BYUID(), otherwise state.maptype won't be correct and the wrong
map may be selected (e.g., "passwd.by*" instead of "master.passwd.by*").

Set _PASSWORD_NOWARN in flags to __pw_scan(), so libc won't display parse
errors to stderr.  (This was the behaviour before my recent rototill.)

Fixes PR 27168 from Markus W Kilbinger.
2004-10-07 06:11:24 +00:00
wiz f74a3e4c4e Add missing function types for getpwnam_r and getpwuid_r. 2004-10-05 13:52:09 +00:00
lukem 0a87664e7c Use PASSWD_BYxxx(state) macros instead of "passwd.byxxx" to refer to
the NIS "passwd.by*" maps.
Fixes problem with "passwd_compat: nis" noted by Matthias Scheler.
2004-10-05 12:09:23 +00:00
lukem 45a7a69275 Overhaul the use of nsdispatch(3) by public APIs so that the back-end
methods use va_list in a manner that is directly related to the public API.
This makes it much easier to write dynamic nsswitch backends for getpwent(3).
Per my proposal on tech-userlevel.

Implement getpwgid_r() and getpwnam_r() APIs per the POSIX 1003.1, 2004 Ed.
These aren't fully reentrant or threadsafe yet, because the compat stuff
currently uses non-reentrant data sources (getnetgrent(3), getpwent(3)),
and there is probably some locking to be improved in the backends.
This will be fixed in the near future.
We also need to add _SC_GETPW_R_SIZE_MAX to sysconf(3).

Fix the compat `+' prototype override so getpwnam(3) and getpwuid(3) DTRT.

Improve the description of pw_class and pw_gecos.
2004-10-05 04:45:54 +00:00
lukem a18b46b6e9 Correct order of description of getgr{nam,gid}{,_r}() functions. 2004-10-05 03:03:24 +00:00
lukem c54f283e46 Overhaul the use of nsdispatch(3) by public APIs so that the back-end
methods use va_list in a manner that is directly related to the public API.
This makes it much easier to write dynamic nsswitch backends for getgrent(3).
Per my proposal on tech-userlevel.

Implement getgrgid_r() and getgrnam_r() APIs per the POSIX 1003.1, 2004 Ed.
These aren't fully reentrant or threadsafe yet, because the compat stuff
currently uses non-reentrant data sources (getnetgrent(3), getgrent(3)),
and there is probably some locking to be improved in the backends.
This will be fixed in the near future.
We also need to add _SC_GETGR_R_SIZE_MAX to sysconf(3).
2004-10-04 04:11:33 +00:00
wiz b772ed97cf Drop space at EOL and dot at end of SEE ALSO. 2004-09-28 13:59:48 +00:00
lukem 159aa790f6 Expand description of return value.
Remove bug about incorrect sizing calculation; it seems to DTRT for me.
Also reference group(5).
2004-09-28 10:49:22 +00:00
lukem 3608f5c3e9 'gid_t *groups' may be NULL if we're just sizing the list by calling
getgrouplist(3) with *grpcnt==0, so don't _DIAGASSERT(groups != NULL).

Tweak API used between getgrouplist(3) and the back-end nsswitch methods;
move the public return value to the start of the va_list and reserve the
'void *retval' for "internal use" (e.g, errno passing or some other need).
2004-09-28 10:46:19 +00:00
lukem 7184648d82 Try nsdispatch "getgrouplist" before iterating the getgrent() list.
Implement a dns (hesiod) backend which tries a grplist hesiod lookup.
Convert back to using getgrent() similar to rev 1.15, instead of
using the private _getgrent_user() from getgrent.c.
2004-09-25 12:27:35 +00:00
lukem 0b757c12fd ANSI KNF 2004-09-25 02:55:25 +00:00
hubertf 2fa09966de Change copyright to 2-clause BSD-copyright.
Changed with explicit permission of Thorsten Lockert (tholo sigmasoft com)
2004-09-15 19:45:17 +00:00
jrf 190b2e4c51 Replaced strncpy with strlcpy. Thanks to Peter Postma who
pointed them our in PR #25762. Approved by christos@NetBSD.org.
2004-09-07 13:20:39 +00:00
jmmv eb6866861c s/password databases/group databases/ 2004-09-02 11:43:18 +00:00
wiz 484705032c Bump date for removal of net.key.random_int. 2004-08-27 14:35:11 +00:00
itojun 8ba8c58e74 remove net.key.random_int 2004-08-27 04:58:10 +00:00
enami 0520e17087 - Honor the HN_NOSPACE flag (i.e., don't put a space if specified,
and put space if not specified).
- There was a test which didn't count the suffixlen.  Fix it.
- Make the code a bit easier to read.
2004-07-27 01:56:24 +00:00
wiz 5102b97303 Bump date for previous. 2004-07-14 20:10:14 +00:00
kleink ea50e13fa9 Add a STANDARDS section; noted by Peter Bex in PR standards/25957. 2004-07-14 19:12:26 +00:00
seb 2f8bbc118e Add wordexp(3). The wordexp function performs shell-style word expansions.
This implementation is wrapper around the undocumented wordexp sh(1)
built-in command.

From FreeBSD.
Provided in PR lib/26123.
Approved by kleink@.
2004-07-13 15:42:03 +00:00
enami c991543af7 Print 10450000 as 10M instead of 10.0M (more greater value such as
10500000 is printed as 10M).
2004-07-12 09:21:20 +00:00
enami 1b94ae7df7 No need to set divisor twice. 2004-07-12 09:14:07 +00:00
cube 2e61c89539 KERN_CP_TIME returns an arry of uint64_ts, not longs, as noted by Adam
Sampson in PR 23190.  Also, tell about ``kern.cp_time.#CPU''.
2004-07-05 11:45:12 +00:00
heas 2cc74cfa3e UDP checksums are always checked (RFC1122 S4.1.3.4), it is not controllable
by net.inet.udp.checksum.
2004-07-02 18:17:45 +00:00
atatat eaa9fc4cc3 Reverse arguments to fcntl(2). 2004-06-22 13:49:43 +00:00
jmc b2f782612f Completely rework how tools/compat is done. Purge all uses/references to
_NETBSD_SOURCE as this makes cross building from older/newer versions of
NetBSD harder, not easier (and also makes the resulting tools 'different')

Wrap all required code with the inclusion of nbtool_config.h, attempt to
only use POSIX code in all places (or when reasonable test w. configure and
provide definitions: ala u_int, etc).

Reviewed by lukem. Tested on FreeBSD 4.9, Redhat Linux ES3, NetBSD 1.6.2 x86
NetBSD current (x86 and amd64) and Solaris 9.

Fixes PR's: PR#17762 PR#25944
2004-06-20 22:20:14 +00:00
thorpej a6ae8a84ac Slight hack to get this building on OS X again: Undo the renaming before
including the host's <pwd.h> to avoid renaming the host's versions of
these functions (which causes a prototype conflict).  After <pwd.h> has
been included, then re-apply the renaming.
2004-06-18 20:34:58 +00:00
lha cc333b3dd7 Add list of async-signal-safe functions
Approved by wiz
2004-06-13 19:17:06 +00:00
kleink d355352b08 Don't refer to errno as "global integer variable". 2004-06-01 16:12:51 +00:00
kleink e78a58d8d7 Sync section number with reality. 2004-06-01 16:06:43 +00:00
wiz ce20e7ac30 Use "In" instead of "Fd #include <...>". 2004-06-01 10:57:48 +00:00
itojun 347bbb94d3 oops, i've committed BSD auth stuff by mistake. 2004-05-31 06:51:59 +00:00
itojun 9e40b59093 EBADF is returned when fd < 0, so change text to tell the truth 2004-05-31 05:32:27 +00:00
itojun 34f8d0e9df closefrom(3) 2004-05-31 05:25:40 +00:00
itojun 56c1b44159 implement closefrom(3). 2004-05-31 05:06:51 +00:00
sjg 5d1af908f6 Apply patch from OGAWA Takaya to fix FreeBSD hosted builds.
The trick is to force use of the NetBSD versions of user_from_{uid,gid}().

PR: 24843
2004-05-18 22:14:35 +00:00
kleink f379d2c8ac There are two instances of getsubopt.c, one in gen, which came by the
ways of 386BSD, and one in stdlib, which is from Lite-2.  The former was
picked up by the build process and has seen a little more maintenance
while the latter's location is "right", so bring the latter up to par
with the former and dispose of the (now) latter.

Reported by David A. Holland in PR lib/25160, which is worded in a
far less mind-boggling fashion than the above.
2004-05-09 19:34:11 +00:00
kleink 6352cc4399 Need namespace.h for internal names of fseeko, strlcpy. 2004-05-09 11:25:52 +00:00
jdolecek 55c776851d fix reference Nx 2.1 to Nx 3.0 2004-05-05 08:48:36 +00:00
atatat f5a0e81454 That's "endutxent", not "entutxent". Hi, wiz! 2004-05-04 02:38:35 +00:00
christos 0b1d0cb383 Add -DSMALL so that this can be used in libhack. 2004-04-25 06:45:29 +00:00
atatat 990f278f7a Remove dynamic sysctl node version 0 from the tree. It seemed okay at
first, but quickly showed its shortcomings.  The version 1 node we're
now using should be good for a while.
2004-04-25 05:47:52 +00:00
wiz af1b524517 Bump date for previous. 2004-04-23 14:52:42 +00:00
christos b3a5c6932f Adjust to constification of db_name vector. 2004-04-23 14:48:07 +00:00
christos 2bab61681c Ansify and add change db_name vector from char ** to const char * const * 2004-04-23 14:47:52 +00:00
christos 75f2f1640d adjust to constification. 2004-04-23 14:47:23 +00:00
simonb 9bc855a931 s/the the/the/ (only in sources that aren't regularly imported from
elsewhere).
2004-04-23 02:58:27 +00:00
christos 6bd1d6d4db Replace the statfs() family of system calls with statvfs().
Retain binary compatibility.
2004-04-21 01:05:31 +00:00
he 30f13a8751 Avoid using preprocessing conditionals in a macro argument list at least
as long as all ports have not yet been converted to using gcc 3.3.3.

Build bug discovered when building for vax.
2004-04-11 09:10:58 +00:00
atatat 8d5507a13f Weak aliases for sysctlfoobar() functions. 2004-04-08 05:45:26 +00:00
atatat 11d2a71805 Descriptions for user.* sysctl nodes. Mostly copied from sysctl(3). 2004-04-08 04:10:44 +00:00
wiz 2569049f22 Add comma after "i.e.". 2004-04-04 23:41:23 +00:00
perry 9b863e179d make this man page explain what the calls do somewhat better. 2004-04-04 17:10:48 +00:00
snj 0e9a95f62e Simplify a clunky multi-line Fn, correct Nm usage, use Dq for quotes, add
some commas.
2004-03-31 01:25:46 +00:00
snj c747b3ab1b Bump date for last. 2004-03-31 00:14:30 +00:00
heas d9287af8b5 Add bits about FTS_WHITEOUT & FTS_W. 2004-03-31 00:01:47 +00:00
wiz 029ff5c848 Some wording improvements and other minor fixes from OpenBSD. 2004-03-30 13:28:13 +00:00
he 9e1e88e1c4 Introduce sysc_init_field() and use it to make the code a little less ugly.
Also, fix another gcc2-unfriendly initialization.
2004-03-26 22:54:42 +00:00
he 2f47eb75f7 Modify this so that it actually compiles with gcc2. 2004-03-26 12:53:58 +00:00
wiz 073b7ea121 Bump date for previous; new sentence, new line;
remove duplicate word and fix a punctuation typo.
2004-03-25 20:02:04 +00:00
atatat 29e15c7932 Move sysctlbyname(), sysctlnametomib(), and sysctlgetmibinfo() from
sysctl(8) into libc, making the minor number jump.  Add prototypes to
sys/sysctl.h, fix sets, modify man pages, etc.  That oughta cover it.
2004-03-25 19:36:26 +00:00
atatat 44afe14cb6 Unwind the nested designators for fields within structs within structs
(or unions).  This should really be put back once we're all using gcc3
for everything, since that makes it look a *lot* cleaner.
2004-03-25 18:36:49 +00:00
atatat ce0d7254d4 Description framework for user-level sysctl nodes. Still haven't
written the descriptions.
2004-03-24 19:31:46 +00:00
snj 27d4257287 Bump date for last; avoid direct use of &, < and >; drop trailing space. 2004-03-24 19:10:46 +00:00
atatat 4723bb21ba Bring sysctl man pages up to date (wrt new query interface, the
versioning, and descriptions).
2004-03-24 18:22:30 +00:00
atatat c6abd47f96 New node version and layout. This should take care of the netbsd32
emulation problem, formalizes the versioning (should it ever be needed
again), and provides a slot for descriptions.
2004-03-24 17:21:02 +00:00
atatat d42aae36c0 The new sysctl query interface returns the same information as the old
one, but you must pass in an empty node that indicates the version
you're using.
2004-03-24 16:34:34 +00:00
atatat 9b4aa5d493 Remove my private hack for watching how sysctl works. That's not
supposed to be there.
2004-03-24 16:29:10 +00:00
atatat 19af35fd0d Tango on sysctl_createv() and flags. The flags have all been renamed,
and sysctl_createv() now uses more arguments.
2004-03-24 15:34:46 +00:00
wiz 06588a00dd Sort SEE ALSO, drop trailing space. 2004-03-04 23:49:31 +00:00
wiz 61e64d47d4 Sort SEE ALSO. 2004-03-04 23:47:56 +00:00
kleink 8e54f10bf7 * Turn isinf(3) and isnan(3) into C99-style macros.
* Make it possible for ports to override these (i.e., VAX).
* Remove isnanl(), which was internal to libc only.
2004-03-04 23:42:38 +00:00
enami 5a257984e5 Fix indent and other whitespace usage. 2004-02-26 23:01:15 +00:00
wiz 3ce85dd47a inifities are probably infinities. 2004-01-15 20:31:40 +00:00
wiz 51008fe87a I guess ture means true. 2004-01-15 20:30:46 +00:00
kleink d82e732345 Add C99 fpclassify(), isfinite(), isnormal(), and signbit() macros. 2004-01-15 19:43:44 +00:00
wiz 70cfe67d9f There is no sysctl(9) (yet?), comment it out;
fix a typo.
2004-01-08 09:21:35 +00:00
atatat 76f7bb35fd Add descriptions of flags. 2004-01-07 21:25:14 +00:00
wiz a004e52a39 Uppercase CPU; mark up NULL; remove superfluous word; simplify macro usage. 2004-01-03 13:09:44 +00:00
atatat 9cfe841137 At long last, add descriptions of new "dynamic" operations. 2004-01-03 06:06:36 +00:00
jmmv 2fec59e8d0 Fix typo; from Aidan Kehoe in PR lib/23950. 2004-01-02 17:04:52 +00:00
martin 47923e6bf5 In case of underflow, return -0.0 or +0.0, depending on the sign of
the argument.
This makes sparc64 pass regress/lib/libc/ldexp.
2003-12-30 23:19:07 +00:00
wiz d46bc94200 Niels Provos kindly agreed to drop clauses 3 and 4 from the
license -- thanks.
Based on OpenBSD commit and hints by itojun.
2003-12-26 19:04:55 +00:00
simonb f9f4341a9f Don't ever add a ".0" to a single digit number.
XXX: Should (for example) 1024 be 1.0K or 1K when the HN_DECIMAL flag
     is passed?  Should there be a separate option that says "use the
     HN_DECIMAL behaviour unless we are exactly equal to the suffix"?
2003-12-26 11:30:36 +00:00
itojun c81f32fe6c comment from niels provos;
- seed2 is necessary, but use it as "seed2 + x" not "seed2 ^ x".
- skipping number is not needed, so disable it for 16bit generator (makes
  the repetition period to 30000)
2003-12-10 05:22:18 +00:00
wiz 02f06f3790 Bump date for previous (hi andrew!). 2003-12-09 16:00:40 +00:00
atatat 31f1dc4a27 Update man page to correct PROC_* names (addresses PR lib/23645) and
also describe the new PROC_PID_STOPEXIT variable.

Man page still not updated to include new features.  I'm still working
on that.
2003-12-09 01:39:03 +00:00
grant 1492b0bcb0 "int flags" is correct in the prototype, but not in the English
language. s/int/in/
2003-12-08 00:55:57 +00:00
keihan 39d96c1f34 netbsd.org -> NetBSD.org
NetBSD.ORG -> NetBSD.org

Now src/lib is done.
2003-12-04 23:39:18 +00:00
atatat 6fc962bc06 oops 2003-12-04 19:45:19 +00:00
atatat fcc5d1a731 Adapt userland sysctl goop to new world order, permitting dynamic
discovery.
2003-12-04 19:40:55 +00:00
lukem 18239b5b77 Fix compile problem if -UYP -DHESIOD.
Noted on current-users by Srinivasa Kanduru.
2003-11-26 00:48:59 +00:00
wiz 492a994a19 Bump date for previous. 2003-11-25 23:28:31 +00:00
itojun fd02e804dd take "Skip a random number of ids" into consideration, correct the rotation
period number.  simonb
2003-11-25 23:11:54 +00:00
itojun b6a2cef9dc "seed2" was ruining the non-repeating property of this function; remove it.
discussed on tech-net for ip_id.c (thanks for all the analysis).
2003-11-25 18:13:06 +00:00
wiz 6b3d472b3a New sentence, new line. Remove trailing spaces. 2003-11-23 07:22:19 +00:00
jhawk e54d574bd0 Bump Dd.
better explain the interactions between ip.mtudisc and tcp.mssdflt,
with regards to the TCP segment size.
ip.mtudisc is not read-only, as was implied by "returns"
XXX: this ("returns") should be corrected for other parameters, too.
Xr tcp(4)
2003-11-23 07:11:04 +00:00
uwe 9b7e93e2c6 s/modified/modifies/ in the description of makecontext(). 2003-11-18 23:03:26 +00:00
wiz ee1b406595 Spell address with two d's. Inspired by similar changes in OpenBSD,
originating from Jonathon Gray and forwarded by jmc@openbsd.
2003-11-10 08:51:51 +00:00
kleink 2ddae9dc8a Add manual pages for fpclassify and isfinite. 2003-10-29 22:59:23 +00:00
kleink 0a97d0875b C99 7.12.3.2: add library portions of isfinite, but don't build these just
yet.
2003-10-29 20:03:51 +00:00
kleink 3991bf60bc Fix the exponent value we're comparing with. 2003-10-29 19:34:11 +00:00
kleink 6bffe7fb50 Upon rereading the implementation suggestions in the standard, rename the
double-precision version to __fpclassifyd().  No need to diverge, here.
2003-10-28 22:50:42 +00:00
kleink 75327729a2 C99 7.12.3.1: add IEEE library portions of fpclassify. Don't build these
yet as the VAX implementation is still subject to discussion.
2003-10-28 22:05:37 +00:00
skrll f81f06350d One ';' is enough. 2003-10-27 09:27:03 +00:00
mrg dcce429e93 fix a typo that caused the build to fail. mmm commit before compile 2003-10-27 03:09:43 +00:00
lukem 477697b1f2 Overhaul how `build.sh tools' are used:
*	Rename "config.h" to "nbtool_config.h" and
	HAVE_CONFIG_H to HAVE_NBTOOL_CONFIG_H.
	This makes in more obvious in the source when we're using
	tools/compat/config.h versus "standard autoconf" config.h

    *	Consistently move the inclusion of nbtool_config.h to before
    	<sys/cdefs.h> so that the former can provide __RCSID() (et al),
    	and there's no need to protect those macros any more.

These changes should make it easier to "tool-ify" a program by adding:
	#if HAVE_NBTOOL_CONFIG_H
	#include "nbtool_config.h"
	#endif
to the top of the source files (for the general case).
2003-10-27 02:17:18 +00:00
lukem 171d653219 Overhaul how `build.sh tools' are used:
*	Rename "config.h" to "nbtool_config.h" and
	HAVE_CONFIG_H to HAVE_NBTOOL_CONFIG_H.
	This makes in more obvious in the source when we're using
	tools/compat/config.h versus "standard autoconf" config.h

    *	Consistently move the inclusion of nbtool_config.h to before
    	<sys/cdefs.h> so that the former can provide __RCSID() (et al),
    	and there's no need to protect those macros any more.

These changes should make it easier to "tool-ify" a program by adding:
	#if HAVE_NBTOOL_CONFIG_H
	#include "nbtool_config.h"
	#endif
to the top of the source files (for the general case).
2003-10-27 00:12:41 +00:00
kleink 5976f8aa56 Retire local union { floating-type; struct ieee_prec; } in favor of those
available from <machine/ieee.h>
2003-10-27 00:05:46 +00:00
kleink e9788d63be Whitespace cosmetics. 2003-10-25 22:43:26 +00:00
kleink 9f3dbee22c Add __infinityf and __infinityl, float respectively long double analogs
of __infinity.
2003-10-25 22:31:20 +00:00
kleink 4ca4f9f41a Add an error check to ensure these are used on platforms without a
distinct long doble type only.
2003-10-24 10:30:36 +00:00
kleink 712c8de209 * Since there is no single portable IEEE 754 format for a long double,
keep a common implementation of isinfl() and isnanl() to be used by
  platforms where `long double' == `double'; move others into
  machine-dependent code.
* In due course, consider __VFP_FP__ on arm.
2003-10-24 00:58:01 +00:00
kleink 6cded84c4b Fix an RCS Id botch that occured when renaming. 2003-10-23 00:04:57 +00:00
kleink 22396ac6f7 G/c __nanf2, which is neither being used nor the representation of a NaN. 2003-10-22 23:50:47 +00:00
kleink 77e57be326 For a double-extended NaN, the exponent must be EXT_EXP_INFNAN, not
DBL_EXP_INFNAN.
2003-10-22 21:37:34 +00:00
wiz 58cc8234ca Slight improvements. 2003-10-15 20:04:48 +00:00
wiz 538e6e3e1e Move siginfo(5) and ucontext(5) to siginfo(2) and ucontext(2) resp.,
and fix references.
Per a discussion on source-changes around Sep 14 2003.
2003-10-14 14:59:03 +00:00
agc 9f1aac5bb3 Move Jason Downs's code from a 4-clause to a 3-clause licence by
removing the advertising clause.  Diffs provided in PR 22410 by Joel
Baker, confirmed to the board by Jason Downs.

With additional thanks to Jason Thorpe.
2003-10-13 15:36:33 +00:00
agc ed6ed8e698 Move Keith Muller's code from a 4-clause to a 3-clause licence by removing
the advertising clause. Diffs provided in PR 22397 by Joel Baker, confirmed
to the board by Keith Muller.
2003-10-13 07:41:22 +00:00
bouyer 7b066791c8 Remove references to University of California from my copyright notices. 2003-10-05 17:48:49 +00:00
dsl 2f28cd113e Simon has persuaded me to remove the 'sizeof (struct kinfo_drivers)' field. 2003-09-28 13:18:41 +00:00
dsl fde7103b90 Add KERN_ROOT_PARTITION and KERN_DRIVERS 2003-09-27 19:09:10 +00:00
jdolecek 430f0af1db remove pw_dup(3), for now at least
follows discussion on mailing lists, discussed in private e-mail with Itojun
2003-09-18 09:13:14 +00:00
simonb 49b0281b33 Shut lint up. 2003-09-16 07:56:51 +00:00
itojun 94da0d16ac avoid overflow during multiply. David Laight 2003-09-15 23:38:20 +00:00
cl 64408794ea make popen/pclose thread safe 2003-09-15 22:30:38 +00:00
itojun f6da4d89f2 weak alias for pw_dup 2003-09-13 22:28:12 +00:00
itojun 220a141637 correct setup of ru_b/a for 16/20 bit case 2003-09-13 21:29:57 +00:00
itojun 1ecc9b581c use internal names for randomid() 2003-09-13 21:27:43 +00:00
itojun 07f2a2a309 check malloc failure. yamt 2003-09-11 11:24:33 +00:00
wiz 0e9a92473d Fix Nd; use In instead of Fd; grammar fixes. 2003-09-10 09:16:45 +00:00
tls ef0a2c06dc Another gcc3 problem: "exp" shadows a builtin. Rename it to "expo". 2003-09-10 07:20:13 +00:00
tls 732fa344d5 This didn't build with gcc3 because it was missing <string.h> for memset. 2003-09-10 07:12:33 +00:00
wiz 89d02ff30e Use In instead of Fd for header files. 2003-09-10 05:51:06 +00:00
itojun 00552ebbd7 add randomid(3). 2003-09-09 22:10:33 +00:00
itojun 24a3a1d964 have pw_dup(3). from openbsd 2003-09-09 22:01:56 +00:00
wiz 47190e80b8 Consistently use 'RFC 1234' instead of 'RFC1234' or 'RFC-1234'.
From jmc@openbsd.
2003-09-07 16:22:20 +00:00
kleink 9f18c21c61 Add Xref to dirname(1). 2003-09-06 20:58:39 +00:00
kleink d27a834c8e Add Xref to basename(1). 2003-09-06 20:58:11 +00:00
wiz 4bfb9a4429 Add __warn_references for deprecated lastlogxname. Okayed by christos. 2003-09-06 16:42:10 +00:00
wiz 7666801285 Add man page for getlastlogx and friends. 2003-08-26 17:37:48 +00:00
wiz 31fd31ccf7 Make getlastlogx have the pathname to the lastlogx database as first
argument, to be consistent with updlastlogx.

Approved by christos, reviewed by kleink.

[The lastlogxname function should not be used any longer.]
2003-08-26 16:48:32 +00:00
matt f847c1a7f3 When updating wtmpx, if the write fails make sure to close the file (to
release the lock held on it).  Use O_SHLOCK when adding just one record
since O_APPEND will enforce the atomicity that is required.
2003-08-25 23:09:37 +00:00
kleink 45cc3e349e Need namespace.h to generate references to internal names. 2003-08-24 15:14:18 +00:00
dsl 79b2073eea Significantly reduce the non-monotonicity of this function.
The way time is apportioned to interrupt/system/user makes it impossible
to guarantee monotonicity except by saving the previous value!
2003-08-19 08:31:18 +00:00
wiz 51471a0f3b Be more explicit about the difference between the err and errx (and
similar) functions. Based on wording from Jeremy C. Reed.
Closes PR 22424.
2003-08-10 10:45:33 +00:00
mrg 151375e124 avoid some lint errors in the previous 2003-08-10 08:24:52 +00:00
martin eaa9779f55 Split into a 64 bit version (straight forward shifting and masking) and
a 32 bit one with two 32 bit operations with two temporaries later
combined.

This avoids the strict alias violating magic used before, thereby
probably fixing PR bin/22313.
2003-08-09 22:37:49 +00:00
agc eb7c1594f1 Move UCB-licensed code from 4-clause to 3-clause licence.
Patches provided by Joel Baker in PR 22280, verified by myself.
2003-08-07 16:42:00 +00:00
itojun 2e48312004 be more pedantic to strlcpy/strcat errors 2003-08-03 04:35:50 +00:00
itojun 785d6ef678 use strlcat for safety 2003-08-03 04:14:00 +00:00
itojun d6220d9ca5 fix off-by-one error in realpath() 2003-08-03 04:12:01 +00:00
salo 99410184e7 netbsd.org->NetBSD.org 2003-07-26 19:24:24 +00:00
dsl 5dbcc1e019 If VIS_CSTYLE is specified, use \ to escape any printable characters
(especially \ itself, and anything else in 'extra').
Fix strvis() and strvisx() to pass 0..255 to isgraph() etc.
2003-07-16 22:34:34 +00:00
kleink 4e043afc74 Fix pasto in 1.26; spotted by Thomas Klausner. 2003-07-09 15:38:20 +00:00
wiz 60c9febddd Drop trailing spaces. 2003-07-09 14:12:31 +00:00
kleink 9789cc2d45 Mention related kernel options where applicable. 2003-07-09 13:35:08 +00:00
wiz 1fabdcd1fb Drop whitespace. 2003-07-04 08:20:31 +00:00
wiz b93a29cdaa Fixes to make these man page look nice with groff-1.19. 2003-06-30 19:12:31 +00:00
wiz b50ca43043 Pa Aq -> Aq Pa; Sy Pa -> Sy. 2003-06-27 17:59:33 +00:00
wiz 2b8b2a8b6f Quote question mark and brace. 2003-06-27 14:24:16 +00:00
wiz 2e906114a3 Remove superfluous "". 2003-06-27 14:23:24 +00:00
wiz 2a0c101d51 Remove superfluous semicolon. 2003-06-27 13:23:11 +00:00
christos d695477b73 PR/21963: MAEKAWA Masahide: Don't free(dirp) before its last use. 2003-06-23 14:35:38 +00:00
simonb dbf00ebd13 Use the date I committed this, not the date I originally came up with
the changes.
2003-05-30 02:22:23 +00:00
simonb 20a5af5edd Allow either parameter to the getbsize(3) function to be a NULL, in
which case it is ignored.
2003-05-30 00:12:09 +00:00
nathanw 4ee0df68f2 Allocate and initialize dirp->dd_lock before calling telldir(), which
will try to lock it.

Addresses PR lib/21712.
2003-05-29 18:29:59 +00:00
kleink 45586dc2f9 Need <string.h> for memcpy(). 2003-05-28 21:08:23 +00:00
kleink 9a398ec067 Add restrict qualifiers to previous. 2003-05-28 20:28:37 +00:00
christos 9af7135771 add mutex locking for directories and readdir_r(3). Influenced by FreeBSD. 2003-05-28 20:03:37 +00:00
christos c8042cb209 no need to declare __isthreaded. 2003-05-28 19:57:22 +00:00
kleink 9d85c4a5f8 Add ETIME, per POSIX-2001. 2003-05-27 22:37:33 +00:00
thorpej f9345ff71e Add _isinfl() and _isnanl() routines, currently for internal use only. 2003-05-17 14:51:24 +00:00
nathanw 59520b66cd Fix a comment delimeter 2003-05-12 20:10:22 +00:00
kleink db907cb577 Rename ieee754_function.c to function_ieee754.c, following the convention
used in exec_format.c, loadfile_format.c, subsys_machdep.c etc.
Per discussion with Christos.
2003-05-12 15:15:11 +00:00
christos 2f0d746849 make this compile again. 2003-05-11 20:56:51 +00:00
ragge f28d8c841a Teach nlist to retrieve symbols from /dev/ksyms (using the quick-search
ioctl's).
2003-05-11 12:47:42 +00:00
wiz fade7b55f5 New sentence, new line. 2003-05-06 08:28:38 +00:00
wiz 737de9f803 Misc. fixes from jmc@openbsd. 2003-05-03 19:43:00 +00:00
gmcgarry 1f3b9df049 Clarify output. From PR#14290. 2003-05-02 08:26:46 +00:00
wiz 38107bb637 Grammar and mdoc fixes from jmc@openbsd. 2003-05-01 13:58:03 +00:00
christos e8c0c9df50 PR/6156: Stefan Grefen: nlist returns bogus value if symbol is multiply
defined in object
2003-04-20 21:08:11 +00:00
christos 622e897fdb PR/5265: John Buller: ttyflags does not report syntax errors or unknown
tty options in /etc/ttys
Make this use fparseln and use warn and warnx to report problems.
2003-04-20 03:03:18 +00:00
christos a5b5f849f2 add ident. 2003-04-19 21:56:49 +00:00
wiz 472351e13d Use
.In header.h
instead of
.Fd #include \*[Lt]header.h\*[Gt]
Much easier to read and write, and supported by groff for ages.
Okayed by ross.
2003-04-16 13:34:34 +00:00
wiz 5af328316a Bump date for last. 2003-04-14 12:06:26 +00:00
simonb 4604766a89 Remove CAVEATS section and note that isascii() works on all integer
values.

From PR standards/21179 from Christian Biere.  Verified against SUSv3 too.
2003-04-14 12:04:18 +00:00
dogcow dc650bfb56 Document ip.checkinterface 2003-04-12 07:41:12 +00:00
salo f939ebddeb Document HW_CNMAGIC, fix HW_PHYSMEM64 and HW_USERMEM64 format in the table,
describe HW_MACHINE_ARCH and HW_ALIGNBYTES in the same order as listed in the
table.
2003-04-11 08:44:16 +00:00
kleink 27d8588746 Change the strerror() string for ERANGE consistently to "Result too
large or too small" and reword its intro(2) description to reflect
the present use for non-numerical out-of-range errors; resolves
Andrew Brown's PR standards/21004, the discussion of which was
dramatically sped up by repeated whipping from Perry Metzger. :-)
2003-04-09 21:36:28 +00:00
nathanw cffc057ae2 Oops, make the atfork queues static so they don't pollute the
namespace.
2003-04-07 21:09:57 +00:00
fvdl 42614ed3f3 Add support for UFS2. UFS2 is an enhanced FFS, adding support for
64 bit block pointers, extended attribute storage, and a few
other things.

This commit does not yet include the code to manipulate the extended
storage (for e.g. ACLs), this will be done later.

Originally written by Kirk McKusick and Network Associates Laboratories for
FreeBSD.
2003-04-02 10:39:19 +00:00
wiz a798d4ff8e Consistent tab usage. 2003-03-17 07:45:04 +00:00
christos 75fdb547df PR/13242: John Heasley: ENOTDIR is not fatal 2003-03-15 04:41:17 +00:00
thorpej 65d8e7315e HW_PHYSPAGES -> HW_PHYSMEM64, HW_USERPAGES -> HW_USERMEM64. 2003-03-06 20:39:08 +00:00
nathanw f60f35f3ab Don't acquire __environ_lock around exec*() calls; nothing requires
that these calls be thread-safe with respect to the environment, and it
causes serious problems for threaded applications which call vfork() and
exec*() (including indirectly, via popen() or system()).

Acquire and release __environ_lock in the parent in popen() and system() to
play safe and provide the child with a stable environment.

__environ_lock should also have an atfork() handler; still under development.
2003-03-04 19:44:09 +00:00
wiz 2b942861aa Drop trailing space, mark up NULL with .Dv, break
lines and add section to an xref.
2003-03-03 06:45:18 +00:00
enami eafd20b336 Fix realloc usage. 2003-03-02 14:17:07 +00:00
enami 70f9e35f63 s/indentifier/identifier/ 2003-03-02 14:10:49 +00:00
jmmv 5d93e695b8 Grammar fix in return values section. 2003-03-02 14:08:24 +00:00
enami 1b1f503d7a Cosmetic changes in sample code. 2003-03-02 14:02:35 +00:00
thorpej 3cdf0a27ee Document net.inet.tcp.init_win_local. 2003-03-01 04:43:42 +00:00
thorpej b4271997ce Document hw.physpages and hw.userpages. 2003-02-27 01:42:10 +00:00
christos ea5d0d4403 keep track if we have the file opened as readonly or readwrite, so that
we don't need to call update_utmp, if our euid has changed, but we still
have a write reference to the file. Solves problem with chrooting processes.
2003-02-26 19:23:25 +00:00
simonb 118763056a Fix a tyop in a comment. 2003-02-17 00:11:54 +00:00
elric 16c5a7dd8d Reorganise the getting of grouplists for a user so that Hesiod (and
potentially other name services) can directly query for a user's
grouplist rather than needing to iterate over the group map.  This
is required for correct operation of Hesiod.

Reviewed by: lukem, christos
Addresses PR lib/20183
2003-02-16 01:22:44 +00:00
nathanw 817925442c Add pthread_atfork() man page. 2003-02-13 03:00:51 +00:00
nathanw 4fb740b8de Implement pthread_atfork() (in libc, because the required threadlib
stub behavior is exactly the same as the usual behavior).
2003-02-13 02:50:48 +00:00
wiz 5693d445c1 Drop trailing whitespace. 2003-02-10 15:31:08 +00:00
elric 1b4eceb53f When looking up gids with hesiod, use the gid map and fall back to the
group map.

Addresses PR lib/20145
2003-02-03 04:22:20 +00:00
kleink 71d7654509 Add sysconf(3) knobs for recent additions. 2003-02-02 20:33:05 +00:00
uwe 4eb408dcd9 Avoid cgetcap &co prototypes conflicting with those provided by the host.
With this change we can cross-compile on FreeBSD 4.x.
2003-01-31 20:50:29 +00:00
wiz 9b5abffe9d Add makecontext(3) from Klaus Klein. 2003-01-21 12:39:08 +00:00
dsl fa36c8783f Ignore groups beyond _SC_NGROUPS_MAX (as man page)
Ensure kernel doesn't pick up random numbers (would happen if _SC_NGROUPS_MAX
> NGROUPS)
(change agreed by christos)
2003-01-19 18:26:16 +00:00
thorpej 3fdac2b8c5 Merge the nathanw_sa branch. 2003-01-18 10:52:16 +00:00
kleink f18fe39c3f Pasto; from Thomas Klausner. 2003-01-16 00:46:58 +00:00
wiz ec87827023 typo fixes. 2003-01-16 00:33:12 +00:00
kleink 140dae96a7 Rename auto variable shading global sigset(). 2003-01-15 23:58:03 +00:00
kleink 30a90a73b4 Add sighold(3), sigignore(3), sigrelse(3) and sigset(3) to libc.
Fixes PR lib/19212, now redesignated standards/19212, from David Laight.
2003-01-15 23:55:41 +00:00
mjl 71b7c0b242 Fix typos (from PR 19650) 2003-01-03 21:41:28 +00:00
jschauma 432d470724 Fix typos pointed out by Igor Sobrado in PR misc/19621. 2003-01-02 00:22:29 +00:00
kleink ac7290d7c2 Add a sysconf(3) knob for {ATEXIT_MAX}. 2002-12-19 23:31:54 +00:00
wiz 09f7a7aee7 new sentence, new line. 2002-12-18 20:17:43 +00:00
wiz 90ad988049 exec lives in section 3, not 2. 2002-12-18 20:13:06 +00:00
jdolecek 5fd22809a5 Add kern.forkfsleep sysctl - set/get time (in miliseconds) for which
process would be forced to sleep in fork() if it hits either global
or user maxproc limit. Default is zero (no forced sleep).
Maximum is 20 seconds.
2002-12-11 19:14:34 +00:00
scw 39a5a9dc76 Add two sysctls: kern.labelsector and kern.labeloffset.
These are of use to userland code which previously depended on the
hard-coded values of LABELSECTOR and LABELOFFSET to figure out the
location of the disklabel for a particular platform.

With the introduction of umbrella ports such as evbarm, evbmips, etc,
the location of the disklabel may vary between kernels for the same
MACHINE. This sysctl will allow userland programs to remain independent
of the particular flavour of MACHINE in such cases.
2002-12-11 12:59:29 +00:00
grant 5872a250a6 fix typo in comment. 2002-12-04 13:08:35 +00:00
christos 39f2f97867 lib/19176: Onno van der Linden: execl is called with too few arguments. 2002-11-26 16:52:07 +00:00
fvdl 370e22c9fd Enable ELF32 nlist (as well as ELF64) for x86-64. 2002-11-23 19:28:45 +00:00
itojun 233424cdc2 make sure to bound string operation by strlcpy
(there are bunch of "strcpy is safe" comments, i think we should change them
to strlcpy as much as possible)
2002-11-17 20:49:33 +00:00
itojun 9134efabd0 use strlcpy where it is more appropriate. 2002-11-17 01:51:24 +00:00