Commit Graph

6481 Commits

Author SHA1 Message Date
dsl
8386db0625 Change some integral types, long => clock_t.
IIRC this stops some warnings on 64bit systems
2005-04-09 12:52:54 +00:00
dsl
6d9a96dfb2 KNF 2005-04-09 12:48:58 +00:00
atatat
7f2367785b Mention that the number after CTL_NET is "usually the protocol", but
may not be (see net.bpf).
2005-04-09 02:03:36 +00:00
christos
fad5d2cf7a statvfs is both a function name and a struct tag. Defining it to _statvfs
causes lint to complain because it sees both struct statvfs and struct
_statvfs. Fix by changing the macro to have arguments.
XXX[1]: Probably this should be done for the rest of the functions that have
        the same names as struct tags.
XXX[2]: Is there a better way?
2005-04-07 16:26:35 +00:00
christos
67d11513a6 PR/29919: Evaldo Gardenali: getmntinfo() calling deprecated function getfsstat()
Fixed by defining an _getfsstat() internal function and calling that instead.
2005-04-07 16:24:18 +00:00
kleink
fb4f51453b Add some pedantry to exceptions from being equivalent to strftime. 2005-04-06 21:39:17 +00:00
kleink
fb03db1761 Fix typo in previous. 2005-04-05 15:46:18 +00:00
christos
23f760bbb6 mlinks for get{gr,pw}ent_r.3 2005-04-04 20:35:31 +00:00
wiz
aed63b5317 Use Dq macro; end sentence with a dot; break line
differently so that abbreviation dot is not interpreted as line-ending dot.
2005-04-04 18:26:19 +00:00
wiz
e9c5ce35a3 Remove superfluous comma. 2005-04-04 18:24:21 +00:00
christos
f6d9547d6f Describe get{pw,gr}ent_r. XXX: Are they in any standards? 2005-04-04 14:19:55 +00:00
wiz
c2fd74dc8e Remove duplicate words; grammar fix. 2005-04-04 08:19:00 +00:00
wiz
11f7061e02 Drop trailing whitespace. 2005-04-04 08:14:49 +00:00
christos
ada3b096d0 Add FreeBSD's strfmon(3). From Rui Paulo. No bump this time. Take advantage
of the getpwent_r bump.
2005-04-03 20:09:29 +00:00
christos
184974e05a PR/29849, PR/29850: Add getpwent_r and getgrent_r 2005-04-02 04:53:53 +00:00
lukem
7f46de1e4e tweak comment reminding us about lack of reentrancy 2005-03-31 23:58:28 +00:00
christos
096c521c10 Remove the bugs section. It has been fixed. 2005-03-31 15:45:53 +00:00
wiz
0ef0d9cbc7 Drop trailing whitespace. 2005-03-31 11:44:26 +00:00
christos
a075f0f32c Document the return values of the _r functions. 2005-03-31 04:17:05 +00:00
christos
ae82b1bd49 detect when this is used as a tool and don't use the _r getpw functions. 2005-03-31 00:05:02 +00:00
christos
1880024ade mention that SIG_IGN on SIGCHLD does not produce zombies. 2005-03-30 17:09:28 +00:00
christos
5d3d04b484 use re-entrant versions of getpw*(). In libc only pwcache remains and this
cannot be changed easily because it involves an API change.
2005-03-30 16:12:58 +00:00
yamt
73a5d8f913 s of sack is selective, not selection. pointed by Michael Eriksson. 2005-03-30 11:09:16 +00:00
wiz
215d79769a Add man page for wcsftime from FreeBSD. 2005-03-30 10:15:12 +00:00
christos
eb808713b7 PR/29826: J. T. Conklin: Add wcsftime(3) (from FreeBSD) 2005-03-30 03:47:11 +00:00
christos
c4e3c4d493 Don't refuse to create a hash database on 0 length files. Treat
them as new files the same way that the btree code does.  Note that
we do the fstat() after the open() instead of re-using the previous
result of the stat() to avoid races (we open with O_EXLOCK when we care).
2005-03-29 23:37:15 +00:00
tnozaki
a3b248100e add csmapper:CNS11643-1,2 and esdb:ISO-2022-CN,
integrate esdb:EUC-TW, locale:zh_TW.eucTW.
2005-03-27 22:30:05 +00:00
christos
bc0c808b3b Don't sign extend characters when they get converted to wide characters in
mbtowc. Otherwise you are not going to be able to wctomb them. Added
regression test. From kim, many thanks.
2005-03-27 18:51:19 +00:00
kleink
a6636f0f7b Avoid lint warning after previous. 2005-03-23 08:16:53 +00:00
kleink
b9a719ae1e Add restrict qualifiers to remaining <signal.h> function arguments. 2005-03-22 20:25:31 +00:00
kleink
98061f1fca * Add restrict qualifiers to tdelete() function arguments.
* Const-poison tfind()'s rootp argument, per SVID Issue 1 and later.
2005-03-22 20:13:42 +00:00
wiz
1c3ab7213e Wording improvements, from yamt@ 2005-03-22 01:43:31 +00:00
kleink
172675479e Only name <netdb.h> in the synopsis, like the old manual page used to. 2005-03-21 13:35:04 +00:00
kleink
53b42c4e52 Add restrict qualifiers to getaddrinfo() and getnameinfo() arguments. 2005-03-21 13:30:50 +00:00
yamt
38083a97f4 update tcp.sack. noted by Hubert Feyrer. 2005-03-21 08:51:40 +00:00
kleink
363c26d4ba Interpose cancellation points in pollts() and pselect(), bringing us
to libc.so.12.127 and libpthread.so.0.6.
2005-03-18 11:23:44 +00:00
kleink
54e5574ccd We have pselect(2) now; the local wrapper is no longer necessary. 2005-03-17 20:48:50 +00:00
kleink
e9705ca517 Rename select argument to selectfn to avoid a shadowing warning. 2005-03-17 10:18:22 +00:00
christos
1c6d713c7d New strcpy.S from jtc. This should have been committed together with the
rest of the string changes before.
2005-03-15 15:16:59 +00:00
wiz
88a7e2e28f Remove one of two nearly duplicate words. 2005-03-14 10:36:51 +00:00
tnozaki
6e2609d649 anonymous union between chlen and _UTF7StatePrive has
compilation problem with gcc295.
this union attempt to make mbsinit(3) handle multibyte state correctly,
but it's useless as far as we use utf-7 only iconv interface.
so i eliminate ctype feature.

patch contributed by Joerg Sonnenberg(who porting Citrus to DragonFlyBSD).
and yamt-san gave me advice, thanks a lot.
2005-03-14 03:43:10 +00:00
perry
1968911436 Fix stupid typo. I added memmem, not memmove. 2005-03-14 03:13:53 +00:00
perry
f4cc0f6ed6 bump for memmem(3) 2005-03-13 15:16:47 +00:00
perry
ff41832f1c add memmem 2005-03-13 15:15:13 +00:00
perry
f7be5521ff Add memmem(3), compatible with version in Linux 2005-03-13 14:47:02 +00:00
christos
068081ef36 Fix another _DIAGASSERT issue (Joerg Sonnenberger) 2005-03-12 04:20:30 +00:00
christos
61e7a23268 UTF8EncodingInfo is an empty struct; remove noop code and DIAGASSERT.
From Joerg Sonnenberger
2005-03-11 23:32:03 +00:00
ginsbach
27ff389ba6 Update standards section; add X/Open XNS and X/Open - IEEE POSIX.
RFC 2553 made obsolete by RFC 3493.  Approved by wiz.
2005-03-11 16:13:13 +00:00
kleink
79b311d547 Crank the copyright year. 2005-03-10 19:53:22 +00:00
wiz
892987d654 End sentence with a dot. Remove trailing whitespace. 2005-03-10 16:51:42 +00:00
kleink
7dfdae2368 s/nil pointer/null pointer/ 2005-03-10 00:31:38 +00:00
kleink
6fe0a614b5 Add pollts() prototype to <poll.h>, and update manual page synopsis for
pollts() header use.
2005-03-10 00:29:37 +00:00
kleink
7ef4223e7d nil pointer -> null pointer 2005-03-09 22:28:52 +00:00
wiz
be7db22fff Bump date for previous. 2005-03-07 13:21:24 +00:00
christos
bab13a9d96 Revert previous commit at 1.17. a maximum BSIZE of 65536 ends up stored
as a 0 in the page, but it is supported and it does work.
2005-03-06 03:42:14 +00:00
kleink
1c7e2b47c4 Provide select() and pselect() prototypes in <sys/select.h>, per
1003.1-2001, and leave the select() prototype in <unistd.h> for
compatibility.  To allow for transition, reorganization of this is
deferred until netbsd-3 gets branched.
2005-03-05 19:48:38 +00:00
tnozaki
fe05f588fb add new citrus iconv module UTF-7.
thanks advice, yamt-san.
2005-03-05 18:05:14 +00:00
tnozaki
97264db5f1 correct uninitialized value `err'. 2005-03-05 17:31:03 +00:00
dsl
8476342d19 Some more optimisations - I must stop looking at this file!
Update copyright to include 2005
(I have a compleetly different version, but it is only a few 100 bytes
smaller due to a 560 byte data area.)
2005-03-05 14:07:15 +00:00
dsl
3fa8666b4f A going-over with the optimiser, save over 500 bytes.
I think this is enough to get rescue_tiny to fit again.
While there fix some bugs:
- %y failed to subtract 1900 from tm_year
- %p (am/pm) only worked at the end of the string
- %E% was treated at %% (ie match a % character)
regression test being added....
2005-03-04 21:41:42 +00:00
dsl
7f90294800 Re-implement in terms of fseek0() 2005-03-04 16:25:20 +00:00
dsl
28c48df97b de __P 2005-03-04 16:04:58 +00:00
kleink
25bfafbaf1 Normalize the declarations of the FD_* "functions". 2005-03-03 20:49:47 +00:00
wiz
598792bd15 Bump date for pselect. 2005-02-28 10:42:19 +00:00
wiz
7564ea71d1 Bump date for pollts. 2005-02-28 10:42:10 +00:00
lukem
a30452355d 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 the
getusershell(3) (et al) functions.

Per my proposal on tech-userlevel in September 2004.
2005-02-28 02:56:28 +00:00
lukem
efd08c7b4f Prevent NULL deref upon malloc failure. 2005-02-28 01:25:24 +00:00
lukem
6596888aee Restore getpwent() behaviour prior to rev 1.57; skip dodgy NIS & DNS entries
rather than failing with NS_UNAVAIL when encountering them.
Fixes PR 29272 by Antoine Reilles.
2005-02-28 00:40:05 +00:00
matt
79c744210f Build syscalls stubs for pselect and pollts. Update man pages. 2005-02-26 18:04:19 +00:00
matt
ab963ad04b Alphabetize main list of sources. 2005-02-25 21:51:10 +00:00
tsutsui
1b4b48e1ea Add (missed) fabs.c to SRCS. 2005-02-19 18:18:53 +00:00
christos
1a940a96f9 remove extraneous `*' that caused a core-dump. 2005-02-17 21:22:25 +00:00
christos
3f899b0a98 do some manual CSE. 2005-02-17 19:58:21 +00:00
tron
f82977b51c Fix lint warning caused by last change. 2005-02-17 19:15:38 +00:00
enami
aa6d8c7778 Jump to just before the copy instead of after it. Saves 8 byte on i386. 2005-02-17 04:30:23 +00:00
enami
d02f179fc6 Simplify, KNF and plug leaks. Compile test only. 2005-02-17 04:16:09 +00:00
christos
81a2ba5600 Simplify and KNF. Instead of keeping track if the pointer was allocated,
keep a copy of the pointer itself and only re-use it if the current
environment is equal to the saved pointer. Idea from OpenBSD. Avoids
problem of re-allocing a non-allocated pointer if a program resets the
environment after it has been grown.
2005-02-17 02:17:43 +00:00
simonb
3cebd9325e White space nit- don't put a space before/after increment/decrement
operators.
2005-02-11 06:21:21 +00:00
tnozaki
7aab8c378d considering huge character set(ucs, gb18030),
use not linear but binary search.
this change derrived from recent FreeBSD's rune.
2005-02-10 19:19:57 +00:00
tnozaki
476f0d92a1 fix typo in _DIAGASSERT 2005-02-10 19:03:51 +00:00
kleink
fd5cb0acea A little libc namespace housekeeping exercise:
* Make vfprintf_unlocked() an internal function, c.f. __svfscanf_unlocked().
* Add internal names for arc4random(), endnetpath(), fhstatvfs(),
  fstatvfs(), mkstemp(), shquote(), statvfs(), taddr2uaddr(), uaddr2taddr(),
  uuid_create_nil(), uuid_is_nil(), and wcwidth().
* Include namespace.h where supposed to.
2005-02-09 21:35:46 +00:00
kleink
23cad56e0c Use strtoimax(), incidentally removing the only libc-internal use of
strtoq().
2005-02-09 19:32:36 +00:00
christos
e816a03a29 Bring back the head versions. Apparently the problem is a pkgsrc issue
unrelated to strings.
2005-02-09 18:15:16 +00:00
kleink
4d58969864 Declare rs_initialized static. 2005-02-09 12:09:08 +00:00
christos
122f93c73b Revert everything to 2005-02-03 until the code is properly tested. Building
kde3 breaks with the head code.
2005-02-07 05:22:51 +00:00
christos
dbbaa0dafa PR/29248: Geoff C. Wing: memchr broken after latest commit.
Apply fix submitted by jtc: The problem was that his regression tests
never checked for characters with the high bit set. Change movl to movzbl
where it was not done yet. In addition strrchr.S missed a jump to Lzero.
2005-02-06 18:36:32 +00:00
drochner
dfc9e068c7 switch to J.T.Conklin's optimized str* functions
(submitted per PR i386/25263)
2005-02-04 18:12:52 +00:00
dsl
3fd6225eec Pull optimised code from memcpy.S
Maybe bcopy can be killed one day...
2005-02-03 22:35:11 +00:00
dsl
2c19ca7c2b Bring code in from obsolesent bcopy.S
Optimise to avoid mis-predicted braches and 'rep movsb' for small %cx.
2005-02-03 22:31:44 +00:00
dsl
781e1351cd A faster implementation.
'rep stos' is slow to setup on modern processors, so don't use it to
align the transfer.
Also not that 8 byte alignment is faster on Intel processors
2005-02-03 22:05:01 +00:00
christos
691a62246e Avoid passing in the actual pw field in gettime because it might not
be the type that we think it is. Fixes cross builds.
2005-02-01 23:47:38 +00:00
drochner
d6e66e178c fix pasto from sigignore.3 2005-02-01 13:55:19 +00:00
enami
22e3442eb2 - Modify realpath() not to alter process wide state current working
directory.  Strategy from FreeBSD.  Addess PR#28986.
- Make realpath() to return an error when null string is passed or
  the last component is symlink to null string.  The kernel lookup
  routine returns an error if such path are passed.
2005-01-30 22:37:32 +00:00
jwise
1161efa5da Comment back in cross-references to other man pages, was looking at a non-recent
DESTDIR.  Other half of last change was correct.

Pointed out by wizd.
2005-01-30 18:13:04 +00:00
jwise
449bc64125 <sys/types.h> must be included before <sys/uuid.h>.
Also, while here, remove `SEE ALSO' section which referenced only man pages
which we do not have.
2005-01-30 03:20:17 +00:00
wiz
b2d185782d Use In instead of Fd; use \*[Am]\*[Lt]\*[Gt] for html output. Uppercase FREENIX. 2005-01-28 11:04:52 +00:00
itojun
cc1dea55c3 title was backwards. djm@openbsd 2005-01-28 01:36:17 +00:00
wrstuden
e384a44e9d Extend fsync_range(2) to support the FDISKSYNC flag, which requests
that the sync be propogated out through the disk drive caches.
2005-01-25 23:55:20 +00:00
wiz
93f4ac130d Fix a double word, and improve mark up in FILES section. From jmc@openbsd. 2005-01-25 01:39:57 +00:00
enami
b2ed183e5b - Remove macros used only by old getcwd() implementation.
- Fix memory leak on error. (I guess the loop isn't necessary but
  it is different matter).
- Remove knowledge about old malloc implementation.
2005-01-23 01:00:51 +00:00
christos
a10b4794fd change long -> unsigned long 2005-01-20 21:53:23 +00:00
christos
8817e95118 remove debugging printf. 2005-01-20 21:11:56 +00:00
kleink
774c973096 Note ENOATTR; from FreeBSD. 2005-01-20 13:23:57 +00:00
kleink
b2f3ea1a33 Add ENOATTR (and a missing comma); noted by Takehiko NOZAKI. 2005-01-20 13:14:09 +00:00
christos
b1c3c94911 Improve error messages. 2005-01-19 22:59:24 +00:00
christos
b51e7f1581 - fix initialization of dowarn [use before set, thanks luke]
- always initialize flags so that we don't have to check for it.
- use the consistent variable names in functions.
2005-01-19 22:40:37 +00:00
christos
a31e08fdfc - test for too long username (from Greg Woods)
- centralize id and time_t parsing, providing better error checking of
  numeric values; previously the code would accept 12foo as an expiration
  or change time.
- fix issue with dereferencing null flags in compat code.
- ansify, KNF
2005-01-19 19:13:38 +00:00
mycroft
e638979d5c Use FD_CLOEXEC. 2005-01-19 00:59:48 +00:00
mycroft
ffa0d5e7ac Also set FD_CLOEXEC in the union re-open case. 2005-01-19 00:53:33 +00:00
mycroft
ffcb3c5a45 Use FD_CLOEXEC. 2005-01-19 00:52:37 +00:00
mycroft
b7e6351cc4 hash already uses FD_CLOEXEC -- pay attention to the return value and make it
a hard failure.

Also make btree and recno uses FD_CLOEXEC.
2005-01-19 00:23:44 +00:00
lukem
58804647b6 Reference RFC1738 instead of RFC1808 for '%xx' encoding. 2005-01-15 21:02:51 +00:00
wiz
379e07e3ac Use \*[Am] and \*[Gt], like before the previous revision; use .In; minor other changes. 2005-01-12 14:44:11 +00:00
wiz
c3005f5671 Use .In for including header files, remove some unnecessary quotes. 2005-01-12 14:35:55 +00:00
itojun
f6b6f2cd66 written-from-scratch manpage (fixes ISOC copyright violation) 2005-01-11 07:26:57 +00:00
itojun
2537b08b16 replace with written-from-scratch manpage. (fixes ISOC copyright issue) 2005-01-11 06:01:41 +00:00
lukem
7157011597 Only compile in IPv6 support if ${USE_INET6} != "no"
MKINET6 is for providing IPv6 infrastructure.
USE_INET6 is for compiling IPv6 support into the programs (needs MKINET6).
2005-01-10 02:58:58 +00:00
lukem
9505ced464 minor whitespace consistency 2005-01-10 02:32:46 +00:00
christos
8ef68a6575 document PT_DUMPCORE. 2005-01-09 17:41:19 +00:00
christos
b725a0a1fa add a cast and remove another. 2005-01-09 05:04:02 +00:00
lukem
b91c938d5f delint -UINET6 2005-01-08 22:48:42 +00:00
mycroft
f38bfebb8e Throw in mutex stubs to serialize access to the legacy global structures. 2005-01-07 22:22:49 +00:00
simonb
f2cd0bb8b0 Remove the old userland version of getcwd(): it's been #ifdef'd out
since 1999 when we switched to a (faster) system call based getcwd(),
and as shown recently has had some buffer size problems anyway (although
they have since been fixed).
2005-01-06 23:43:32 +00:00
jmmv
3b31a140fa Fix a typo and add a missing blank line. 2005-01-06 20:31:12 +00:00
ginsbach
9d30c15dda Add EPERM to fchmod() failure list. 2005-01-06 16:30:52 +00:00
lukem
b351350a6f document getgroupmembership(3) 2005-01-06 15:29:35 +00:00
lukem
a3665ef9cf Implement getgroupmembership(3). This is similar to getgrouplist(3), except
that the "int maxgroups" and "int *ngroups" parameters are separated into
two separate parameters which makes it possible to call multiple nsswitch
back-ends and have the results correctly merged.
getgrouplist(3) is now implemented using getgroupmembership(3).

Proposed on tech-userlevel on December 1, 2004.
2005-01-06 15:10:45 +00:00
lukem
337d8d731d Rename various "internal" variables and functions and make non-static so other
internal libc source files can use these (including getgroupmembership(3)).

Be more consistent in the API that the __grscan_<source>() methods use.

In __grscan_compat() support an optional custom 'search' function used when a
"+" lookup is required.  Normally this will be getgrent() from group_compat,
but getgroupmembership(3) will use a tailored compat search routine for
efficiency.
2005-01-06 15:00:45 +00:00
christos
59f1050586 Fix handling of memory allocation. From OpenBSD. 2005-01-06 00:07:41 +00:00
bouyer
2acdd6193e Translate messages 86 -> 93. Thanks to Marc Baudoin for review. 2005-01-03 22:00:37 +00:00
salo
f1b6ac43ff Add ENOATTR translation. 2005-01-03 19:52:35 +00:00
peter
4e256ea1c5 Translate errors 80 to 93 in set 1. Fix typo's and improve some messages.
Reviewed by daniel.
2005-01-03 15:21:48 +00:00
jmmv
8f037de0f8 Remove a trailing dot to match all other items in the same list. 2005-01-02 19:39:43 +00:00
jmmv
0d9171e5fe Add ETIME and ENOATTR translations. 2005-01-02 19:38:49 +00:00
wiz
f95f6051ed Add German ENOATTR translation. 2005-01-02 19:08:35 +00:00
jdolecek
be801db792 add czech ENOATTR translation 2005-01-02 19:03:41 +00:00
thorpej
6593d72e33 Add ENOATTR ("Attribute not found"). From FreeBSD. 2005-01-02 18:54:51 +00:00
wiz
f5c79d74cd Sort sections and SEE ALSO. Remove superfluous comma. 2005-01-02 18:28:48 +00:00
wiz
4e8eec4d14 Sort SEE ALSO. 2005-01-02 18:25:09 +00:00
wiz
7d9d90dc9d Fix date string. 2005-01-02 18:23:25 +00:00
thorpej
4cc9b402ea Remove VOP_*() references. 2005-01-02 16:48:18 +00:00
thorpej
c165c2b31d System calls and support routines for file system extended attributes. Libc
version is bumped to 12.125.

From FreeBSD.
2005-01-02 16:43:26 +00:00
christos
1466914ff3 add size_t casts. 2004-12-30 05:11:50 +00:00
christos
bd66ab4a14 cast to size_t
remove unneeded casts.
2004-12-30 05:08:37 +00:00
christos
1c5c5f5ad5 cast to size_t/socklen_t 2004-12-30 05:07:43 +00:00
christos
1b235e3efc cast to socklen_t/size_t 2004-12-30 05:06:33 +00:00
christos
3fd676b16c cast to size_t 2004-12-30 05:01:50 +00:00
christos
1f3a2bf23d sz should be size_t 2004-12-30 05:01:19 +00:00
christos
70c807f499 - cast to size_t
- sz should be size_t
2004-12-30 05:00:42 +00:00
thorpej
8fca42fd9c More ELF_ST_BIND()/ELF_ST_TYPE() cleanup. 2004-12-28 00:08:08 +00:00
thorpej
fe14527c00 Use ELF_ST_BIND() and ELF_ST_TYPE(). 2004-12-27 20:07:09 +00:00
christos
12fc8404b0 RTC_OFFSET is writable; sync with sysctl.8 2004-12-27 13:35:47 +00:00
wiz
6362e2f527 Add CAVEATS section similar to is*(3) ones. Bump date.
Fix typo in toascii.3 while here.
kleink says "ok".
2004-12-24 02:47:16 +00:00
yamt
5b3d234201 constify. 2004-12-21 11:25:43 +00:00
yamt
acdc3d1e0f constify. 2004-12-21 09:29:04 +00:00
yamt
824b77d67e _citrus_find_getops: use _C_LABEL_STRING. 2004-12-21 09:00:01 +00:00
yamt
8a0e62d02d open_shared: correct a buffer size. 2004-12-21 08:07:41 +00:00
christos
da6f1ded1d revert previous change while discussion is in progress. 2004-12-20 18:30:26 +00:00
itojun
2fdfeb359f RFC cannot be used as manpage regarding to the ISOC copyright boilerplate.
remove it until someone writes it up from scratch/freely-redistributable
text is found.
2004-12-20 03:50:04 +00:00
wiz
c54f10d8b4 Use more markup. Sort sections. 2004-12-16 17:29:55 +00:00
kleink
9508efa066 Internally rename getdevmajor(); noted by Geoff Wing. 2004-12-16 12:30:04 +00:00
atatat
817b002242 Fix a whitespace nit and make this compile again. So there. 2004-12-16 04:37:25 +00:00
atatat
d91a4a5990 Put caching back on the pts major number. It's worth the code
overhead not to go look it up a zillion times when running fstat or ps
on a machine with a billion people logged in.  fstat mostly.
2004-12-16 04:33:03 +00:00
atatat
4e04a6f62d Get rid of the private getptsname() function and use getdevmajor()
instead.  It's really much better that way, you'll see.
2004-12-16 04:15:19 +00:00
christos
29fb313de0 document properly the return value and the errno settings. 2004-12-16 04:07:22 +00:00
christos
d15ecb98a9 knf fixes. 2004-12-16 04:07:01 +00:00
atatat
fe13117c07 Bump to minor 124 since getdevmajor(3) was added 2004-12-16 04:05:51 +00:00
atatat
2803cf768c Add a function called getdevmajor().
It tells you the major device number for whatever character or block
device you ask it.  This is sort of the inverse of devname(3) but not
quite, since it's backed by the kernel (sysctl's kern.drivers
information) and not a database cobbled together from the contents of
the filesystem.
2004-12-16 03:54:56 +00:00
simonb
43cfce7a27 Remove trailing blank lines. 2004-12-14 11:14:45 +00:00
atatat
1cb09b336b Properly return the constructed name for ptyfs nodes. Otherwise we
accidentally return NULL on the first call and find it in the cache on
all subsequent calls.
2004-12-14 03:08:01 +00:00
nathanw
5229c9f993 Nuke threadlib.h. Library defensive threading is now provided through the
normal pthread.h interface.
Move stubs for libc back into a libc-internal header.
2004-12-14 00:23:19 +00:00
nathanw
9ae878eb94 Fix the __libc_thr_yield_stub() signature. 2004-12-14 00:21:40 +00:00
nathanw
50df45f4e5 The __libc_thr_yield_stub() for scched_yield() should return int (and
a 0), not void.
2004-12-13 16:07:13 +00:00
snj
316a956c56 Bump date for last. 2004-12-12 05:56:45 +00:00
yamt
ebf187e60c document correct return value. PR/28571 from ITOH Yasufumi. 2004-12-12 01:09:44 +00:00
christos
7462bd3e7c fix cast-qual issue. 2004-12-11 06:41:40 +00:00
simonb
23a85fb5b0 libgcc has __fixunsdfsi and __fixunssfsi, so don't build
the softfloat versions of these.

Fixes PR toolchain/24509 from Masao Uebayashi.
2004-12-09 00:39:41 +00:00
martin
528e949b20 Replace the stack unwinding by a much simpler solution taken from
../../arch/sparc/gen/_setjmp.S rev. 1.6. This ended up to be ~identical
to the OpenBSD change triggered by the same sparc change.
Thanks to Stoned Elipot for pointing out the problem.
2004-12-07 08:20:07 +00:00
nathanw
08c663a3c0 Implement __libc_thr_sigsetmask_stub() in terms of sigprocmask(),
instead of having a dummy function.
2004-12-06 18:58:12 +00:00
dsl
4eaada98f4 Change a returned value of -1 (NO_PGID) to (uint)(pid_t)~0u >> 1 (0x7fffffff)
to satisfy the SuSv3/POSIX-2004/etc requirement that "If there is no
foreground process group, tcgetpgrp() shall return a value greater than 1
that does not match the process group ID of any existing process group."
Should fix PR standards/28493 and zsh.
2004-12-01 21:37:15 +00:00
ws
4aa5370862 Use correct stack offsets after pushing values onto it. 2004-12-01 01:08:18 +00:00
ginsbach
e9042901ff rresvport_af() should return -1 when the address family is unsupported
and set errno accordingly.
2004-11-29 17:00:06 +00:00
jmc
9da9dc64b7 Add heapsort to libnbcompat 2004-11-28 06:57:14 +00:00
kleink
504ab89f25 Remove references to the header SIG_* are located in altogether;
<sys/signal.h> exposed too much implementation detail, and <signal.h>
remains the sole header referenced by this page.
2004-11-23 09:38:45 +00:00
lukem
53d1c6b12e document which #include file to use 2004-11-23 04:38:19 +00:00
lukem
98a47ed075 Fix gethostent(3) (which was reenabled in rev 1.63) so that it actually
works by allowing _gethtent() to treat host.h_addrtype==0 && host.h_length==0
as "any address family" when parsing.
2004-11-23 03:42:13 +00:00
jmmv
86ebfff7b8 Minor grammar fixes. 2004-11-21 10:45:08 +00:00
itojun
da88342476 NI_WITHSCOPEID was not picked up by IETF standardization process 2004-11-16 06:04:12 +00:00
christos
13c63648cb PR/28324: Takayoshi Kochi: localtime_r(3) returns GMT
Add missing tzset_unlocked(); as suggested.
2004-11-16 04:15:28 +00:00
christos
d8edf257eb Don't create the lastlogx file with 0 mode. 2004-11-11 22:14:20 +00:00
christos
5120bd8da8 More error checking. 2004-11-11 04:03:23 +00:00
christos
a2a8a7d6ce Recognize ptyfs ptys. 2004-11-11 03:22:30 +00:00
wiz
74e1eaa411 Fix some nits, and bump date for previous. 2004-11-11 00:57:57 +00:00
christos
3c3eb5801d It is silly to have to enumerate all the ptys in /etc/ttys in order to
get a valid ttyslot for them. Instead if and entry is not found and we
are a pty, allocate the n + 1 + minor(pty) slot.
2004-11-11 00:01:38 +00:00
christos
a8f3eacf76 Use ioctl to find the pty name directly instead of looking it up in
the database; it is much faster, and the common case these days.
2004-11-11 00:00:15 +00:00
christos
ba98473568 PR/28183: Brian Marcotte: Getty eats the last character of the last field.
As Brian reports the bug is in skip(). The logic on end of line is broken.

- fix the bug which can cause buf[-1] to be written.
- don't leave the line buffer allocated on end of file.
- KNF
- use __func__ instead of hard-coding the function name.
- don't use needlessly global variables
2004-11-10 23:59:06 +00:00
lukem
c873ad0d2e Use the common __nsdefaultFOO rather than private defaultFOO duplicates. 2004-11-10 12:57:32 +00:00
lukem
5994f053ec * Improve the comments in <nsswitch.h>
* Provide some more useful default ns_src arrays.
2004-11-10 07:23:32 +00:00
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
wiz
3f1cd2faeb Bump date for FIONWRITE and FIONSPACE. 2004-11-08 16:15:42 +00:00
christos
0766545fc7 resolve conflicts. 2004-11-07 02:25:01 +00:00
christos
cd4012e9b2 Merge conflicts 2004-11-07 02:19:49 +00:00
wrstuden
16029d56b5 Add support for FIONWRITE and FIONSPACE ioctls. FIONWRITE reports
the number of bytes in the send queue, and FIONSPACE reports the
number of free bytes in the send queue. These ioctls permit applications
to monitor file descriptor transmission dynamics.

In examining prior art, FIONWRITE exists with the semantics given
here. FIONSPACE is provided so that programs may easily determine how
much space is left in the send queue; they do not need to know the
send queue size.

The fact that a write may block even if there is enough space in the
send queue for it is noted in the documentation.

FIONWRITE functionality may be used to implement TIOCOUTQ for Linux
emulation - Linux extended this ioctl to sockets, even though they are
not ttys.
2004-11-06 02:03:20 +00:00
jmmv
fda2840eea Add missing colon symbol after sentence. 2004-11-03 13:11:41 +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
dsl
d6329c55cd Implement strtok() in terms of strtok_r() 2004-10-27 19:12:31 +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
christos
366176888a PR/27283: Onno van der Linden: incorrect check for mmap return value
While I am here, clean up the error path, KNF and use the proper stat
macro.
2004-10-17 22:21:43 +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
dsl
04e7fe1971 Remove sentence about the inability to simultaenously tokenise multiple
strings - should have been removes then strtok_r() was added.
2004-10-11 14:22:04 +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
perry
653de456c5 Note that MAP_ANON memory is zero filled. 2004-10-04 18:14:48 +00:00
lukem
71532e5cb8 crank copyright 2004-10-04 04:16:26 +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
lukem
25d91a60fb * Re-number NS_FORCEALL from 1<<7 to 1<<8, moving it out of the "public"
bitrange for nsdispatch(3) return values.
* Tweak documentation comments in nsswitch.h
* Ensure the result from the back-end method is masked with
  NS_STATUSMASK before nsdispatch(3) returns it.
2004-10-04 04:02:27 +00:00
wiz
29ac95abc3 Fix a typo, fix an xref, an drop a space at EOL. 2004-09-29 09:20:19 +00:00
lukem
e775b9e35a Implement NS_FORCEALL, which may be set in defaults[0].flags by a caller of
nsdispatch(3) to indicate that all available database methods for a source
will be invoked.  This is useful for functions such as endgrent(3).
2004-09-29 02:47:32 +00:00
lukem
22e72f089d slight formatting tweaks 2004-09-28 14:44:05 +00:00
wiz
b772ed97cf Drop space at EOL and dot at end of SEE ALSO. 2004-09-28 13:59:48 +00:00
lukem
3d2c2adc4d also ensure defaults != NULL 2004-09-28 11:51:42 +00:00
lukem
adea87aed9 s/foe/for/ 2004-09-28 11:37:26 +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
he
9ac3a85e48 Only compile the floatx80-using functions if the arch in question
defines the FLOATX80 macro.  Fixes build problem for arm ports.
2004-09-27 10:16:24 +00:00
yamt
f659b39d81 correct a function prototype. 2004-09-27 07:07:04 +00:00
lukem
115b984fd6 correct the va_list arg for nss_method 2004-09-27 07:00:52 +00:00
jmmv
8a1eb34d66 Add support to build the mac68k port with soft-float enabled (i.e., setting
MKSOFTFLOAT=yes).  The main purpose of this feature is to let NetBSD work
in machines with the 68040LC chip (those that have the FPU bug).

All the work has been done by Bruce O'Neel <edoneel AT sdf.lonestar.org>,
with some very minor changes by me; the patches were being posted to the
port-mac68k mailing list.  It has been tested for a long time by several
users, including me.

I have just verified that regular releases, as well as soft-float ones,
continue to build.

There have been no objections to this patch since I asked for them in July
in the port-mac68k list.
2004-09-26 21:13:27 +00:00
yamt
d94faebdc7 wctomb isn't supposed to set errno. 2004-09-26 00:51:39 +00:00
soda
89d5b6ffb2 forgot to replace #else with #endif, thanks yamt again. 2004-09-26 00:35:51 +00:00
yamt
8eaa138d56 _FUNCNAME(ctype_wcrtomb):
set *nresult on error rather than using stack garbage.
2004-09-26 00:17:15 +00:00
soda
63504487d1 oops, forgot to add "else" 2004-09-25 23:56:44 +00:00
soda
879ba02666 corrent an error in previous commit:
don't corrupt return value on error case, pointed out by yamt
2004-09-25 23:51:31 +00:00