Commit Graph

6627 Commits

Author SHA1 Message Date
robert
947e91552f Correct the regressive part of my last commit to these files:
use the .Fn macro instead of the .Fo ... .Fc combination to
format function prototypes.

Reminded by:	bde
2002-10-04 11:31:00 +00:00
phk
68c8dc8ee7 Ok, concensus was to install libexpat under a "private brandname", and after
some deliberation the name "libbsdxml" was chosen since it conveys the two
most important attributes:  "Private to FreeBSD" and "XML".

Add a skeleton man-page to give the credit and point for further
documentation.  (If somebody wants to write a true mdoc manpage for
this I am sure both the eXpat people and I will be grateful).

(Still not connected to the build)
2002-10-04 11:20:18 +00:00
tjr
f213f77cc2 Add a placeholder implementation of wcscoll() and wcsxfrm() which gives
locale-sensitive collation only in single-byte locales, and just does
binary comparison for the others with extended character sets.
2002-10-04 03:18:26 +00:00
peter
ddac698eac Drop login.c and logwtmp.c from the library build. None of the apps
that we build use it, and any that do should be using the official
login()/logwtmp() in libutil.
2002-10-04 00:24:31 +00:00
obrien
ae09b5969d Add stpcpy(3). 2002-10-03 19:39:20 +00:00
johan
b8f13ad643 Actually implement gzip's -c option. minigzip now also doubles
as zcat properly.

PR:		13043
Submitted by:	Toshihiko ARAI <toshi@jp.freebsd.org>
		Jonathan Towne <jontow@twcny.rr.com>

Approved by:	peter, sheldonh (mentor)
MFC After:	2 weeks
2002-10-03 19:30:22 +00:00
ume
6448ec6d62 Allocate 64K recieve buffer for DNS responses.
Though res_query.c also defines and refers MAXPACKET, it is not
related to ansbuf.  So, I didn't touch res_query.c.
2002-10-03 17:25:33 +00:00
tjr
064f96637b Improve three instances of questionable or confusing grammar. 2002-10-03 14:09:06 +00:00
tjr
89d813cf15 Add an example. 2002-10-03 14:07:26 +00:00
tjr
e3f15214bf Document towlower() and towupper() in separate manual pages instead of
trying to confusingly document both on the same page. The new manual pages
are based on tolower(3) and toupper(3) instead of the old towlower(3).
2002-10-03 11:23:06 +00:00
tjr
b9c5c09473 Point out that although toupper() and tolower() really accept rune_t's
and not just unsigned char's, callers should use towupper() and towlower()
instead when working with wide characters if portability is a concern.
2002-10-03 11:14:00 +00:00
ru
48afd8f904 HTTP authentication got broken in rev. 1.49. 2002-10-03 10:42:19 +00:00
tjr
915a8cf342 towlower() appeared twice in the synopsis; one of the occurrences should
have been towupper(). Add towupper() to the Name section while I'm at it.

Obtained from:	NetBSD (junyoung)
2002-10-03 10:40:01 +00:00
tjr
f18ee8bb40 Add an Examples section with an example of how to use the functions. 2002-10-03 08:49:29 +00:00
mike
00edc47a87 Add missing const qualifier in tfind(). 2002-10-03 06:33:33 +00:00
jhb
b79961de95 Catch up to SMTX -> SLOCK changes. 2002-10-02 20:33:52 +00:00
archie
f43114e2a8 Add a man page for the KSE system calls.
Reviewed by:	julian, ru
2002-10-02 18:01:51 +00:00
tjr
b4a2b3a815 Add an example showing how to use wcstok(). Fix ordering of See Also section. 2002-10-02 14:28:26 +00:00
robert
4ab3b5c0e7 Add the 'restrict' type qualifier to the prototypes of `sigaction',
`sigprocmask', `sigaltstack', and `sigwait' as well as to the
prototypes of the apparantly unimplemented functions `sigtimedwait'
and `sigwaitinfo'.  This complies with IEEE Std 1003.1-2001.
2002-10-02 10:53:44 +00:00
phk
eb28a1f905 #include the right thing for PC98
Sponsored by:	DARPA & NAI Labs.
2002-10-02 08:59:28 +00:00
mike
384c8f8fcd Add restrict type-qualifier. 2002-10-02 07:49:35 +00:00
phk
5ff1c2ca91 Build libexpat out of src/contrib/expat.
Not connected to the build yet.
2002-10-02 07:35:35 +00:00
maxim
28c70d648d Too strict error checking in rev. 1.22 broke pwd_mkdb(8) in NIS
environment. An empty UID and GID are valid there.

Spotted by:	rwatson
2002-10-02 07:02:46 +00:00
dd
187a6964e6 Remove the "special processes" section. It has rotted, and the idea
ceased to be useful when the number of "special processes" went from 3
to one per device.  I considered replacing it with a "kernel threads"
section, but this seemed like the wrong place for that.

PR:		40969
2002-10-02 00:09:24 +00:00
dd
552aeba29f Don't claim to return the fileid which we unloaded. The kernel
doesn't do this, and it wouldn't be very useful if it did, since the
caller supplies us with that number.

PR:		41329
Submitted by:	Michael Galassi <nerd@xyz.com>
2002-10-01 23:53:51 +00:00
alfred
912eab4465 make rstat(3) return an 'enum clnt_stat' rather than an 'int' to match
the prototype from rstat.x -> rstat.h.

MFC After: 1 day
2002-10-01 22:02:06 +00:00
jmallett
96c5ede7ef Ressurect libkvm use of the bitmasked signal list in the kernel, now that
reliable signal queues are gone.
2002-10-01 17:17:32 +00:00
bde
e4147dd2dc Fixed a last-minute editing error in previous commit. nfs and/or cvs
replaced a 14-byte change in the middle of the file with 14 NULs at EOF
despite or because of aborting the initial commit to pick up the change.
2002-10-01 11:44:35 +00:00
bde
bfd55981c7 Merged all interesting difference between the old math.h and the current
one into the latter and removed the former.

This works around the bug that some broken Makefiles add -I.../src/include
to CFLAGS, resulting in the old math.h being preferred and differences
between the headers possibly being fatal.

The merge mainly involves declaring some functions as __pure2 although
they are not yet all strictly free of side effects.

PR:		43544
2002-10-01 11:34:42 +00:00
phk
19150ba4f8 Split MBR and PC98 on-disk sliceformats out from disklabel.h, step 1:
Peter had repocopied sys/disklabel.h to sys/diskpc98.h and sys/diskmbr.h.

These two new copies are still intact copies of disklabel.h and
therefore protected by #ifndef _SYS_DISKLABEL_H_ so #including them
in programs which already include <sys.disklabel.h> is currently a
no-op.

This commit adds a number of such #includes.

Once I have verified that I have fixed all the places which need fixing,
I will commit the updated versions of the three #include files.

Sponsored by:   DARPA & NAI Labs.
2002-10-01 07:24:55 +00:00
jmallett
3117764200 Fix typo, should zero the kinfo_proc's siglist, not the real one's - the real
one doesn't have one.

Submitted by:	jake, scottl
Big pointed hat that lands one in the badcommitters box to:	jmallett
2002-10-01 00:28:14 +00:00
jmallett
3fbea8bffe The list of queued signals is not, can not, and will not be exported to the
userland.  If someone wants to implement a backup p_siglist in the kernel
for compatability and to export one could.  For now, just tell KVM to hand
an empty signal set off to the userland.
2002-09-30 21:40:33 +00:00
mdodd
8d50af2b05 bzero() allocations. 2002-09-30 09:18:54 +00:00
deischen
bd82e84c30 Install library-installed signal handlers with the SA_RESTART flag
set.
2002-09-30 08:47:42 +00:00
deischen
ae413d8b12 Add back the i386-specific hack to save and restore the FP state
to/from a ucontext when a thread is interrupted by a signal.
This will be removed when a proper fix is made in the kernel
to save/restore the FP state without breaking the ABI.
2002-09-30 08:45:38 +00:00
bde
61d4be4f4d Align the stack suitably for the version of gcc in FreeBSD-4 (provided
-fomit-frame-pointer is not used).  This is mostly moot for -current
because gcc-3 does the alignment (slightly incorrectly) in main().

This patch is intended for easy MFC'ing and should be backed out in
-current soon since it causes compiler warnings and better fixes are
possible in -current.  The best fix is to do nothing here and wait for
gcc to do stack alignment right.  gcc-3 aligns the stack in main(), but
does it too late for main()'s local variables and too late for anything
called before main().  A misaligned stack is now more than an efficiency
problem, since some SSE instructions in some or all (hardware)
implementations trap on misaligned operands even if alignment checking
is not enabled.

PR:		41528:
Submitted by:	NIIMI Satoshi <sa2c@sa2c.net> (original version)
MFC after:	3 days
2002-09-29 13:42:27 +00:00
eric
21a7c522c7 Add getopt_long(3).
Obtained from:	NetBSD
Sponsored by:	Apple
2002-09-29 04:14:37 +00:00
tjr
79f7c6df9a Remove masking macros for getwc(), putwc(), putwchar() and getwchar().
Although there was nothing wrong with getwc() and putwc(), getwchar()
and putwchar() assumed that <stdio.h> had been included before <wchar.h>,
which is not allowed by the standard.
2002-09-28 07:43:44 +00:00
peter
0a7f0ba37e Zap now-unused SHLIB_MINOR 2002-09-28 00:25:32 +00:00
rwatson
6ef83883d8 Use size_t instead of int for len variables passed in/out of sysctl.
Pointed out by:	jake
2002-09-27 16:35:19 +00:00
tjr
18a73315b6 Back out previous, free the buffer when __vfprintf() fails and don't bother
trying to shrink the buffer with realloc() before returning it.
2002-09-26 13:11:24 +00:00
tjr
7733fef36f Back out previous and solve the problems a different way: move va_start/
va_end closer to the __vfprintf() call, free the buffer when __vfprintf()
fails and don't bother trying to shrink the buffer with realloc() before
returning it.

Submitted by:	bde
2002-09-26 13:09:48 +00:00
tjr
9228738b8c Simplify by removing unneeded local variables and explicit null termination. 2002-09-26 09:28:55 +00:00
tjr
e0a783a538 Simplify by removing useless local variables and explicit null termination. 2002-09-26 09:23:07 +00:00
tjr
e9dc192372 Correctly handle the case where __vfwprintf() fails because it runs out
of memory.
2002-09-26 08:26:16 +00:00
tjr
aecdb4ddca Sync with OpenBSD: avoid memory leak when __vfprintf() fails because it
runs out of memory, always call va_end.
2002-09-26 07:55:18 +00:00
pst
91648a1554 Enhance TACACS+ library to fully support authorization requests in
addition to existing authentication.  No change to the existing
APIs to preseve both binary and API compatibility, so I am not
inclined to bump the library version number unless someone thinks
this is necessary.

Submitted by:	Paul Fraley <fraley@juniper.net>
MFC after:	2 weeks
2002-09-25 23:18:51 +00:00
knu
0c21f59db2 Update compat3x libc and libc_r from RELENG_3. This fixes the buffer
overflow in resolver described in FreeBSD-SA-02:28.resolv.

Binaries built and contributed by;	motoyuki
2002-09-25 19:47:54 +00:00
mike
3df40ef438 <sys/types.h> is no longer needed. 2002-09-25 16:49:09 +00:00
markm
ada687e3c4 Try not to lint(1) contrib'ed sources. This Is Very Messy. 2002-09-25 14:19:51 +00:00
maxim
f58719dbdb Disqualify UID/GID with non-numeric character.
PR:		bin/41721
Reviewed by:	tjr, silence on -audit
MFC after:	2 weeks
2002-09-25 08:49:19 +00:00
mike
86a758e51b Use the standardized CHAR_BIT constant instead of NBBY in userland. 2002-09-25 04:06:37 +00:00
ache
98b90cd850 Set _POSIX2_VERSION=199209 before calling MKkey_defs.sh as workaround of
obsolete +POS sort syntax.
2002-09-24 19:55:37 +00:00
tjr
2f81b61678 Warn when setinvalidrune() is referenced for consistency with the rest
of the rune functions (except sgetrune() and sputrune(), which are really
macros).
2002-09-24 09:25:37 +00:00
tjr
6e674f682e Add cross-references between wide character and single-byte character
versions of printf() and scanf().
2002-09-24 09:22:47 +00:00
tjr
92cc4a5bcb Remove an unneeded call to _sfrefill() that was missed in the conversion
from vfscanf() to vfwscanf(). It doesn't hurt to have it there, but it's
redundant since __fgetwc() will refill the buffer if it needs to.
2002-09-24 09:18:32 +00:00
tjr
530831782a Use the new va_copy macro to copy variable argument lists instead of
assignment. This is needed on powerpc but is also more correct for the
other ports.

Submitted by:	grehan
Tested on:	alpha, i386, sparc64
2002-09-24 00:47:27 +00:00
tjr
516923dd04 Add implementations of wscanf() and related functions: fwscanf(), swscanf(),
vfwscanf(), vswscanf(), vwscanf(). As the name suggests, these are wide-
character versions of the scanf() family of functions.
2002-09-23 12:40:06 +00:00
tjr
456a491da7 Implement the %lc, %ls and %[ conversions, which read sequences of wide
characters, non-whitespace wide character strings and wide character
strings in a scanset.
2002-09-23 11:35:50 +00:00
tjr
043dfd402f The character argument for __ungetwc() should be wint_t instead of wchar_t. 2002-09-23 11:31:18 +00:00
tjr
491569a0a7 Add the remaining C99 wide character string to integer conversion functions.
Restrict qualifiers were added to the existing prototypes in <inttypes.h>
and the typedef for wchar_t was removed.
2002-09-22 08:06:45 +00:00
tjr
66942d1619 Add an unlocked version of ungetwc(), __ungetwc(), that __vfwscanf()
will need to use.
2002-09-22 05:59:00 +00:00
mini
482de2f109 Style cleanup:
- Sort local variable declarations.
- Protect a hand-formatted comment from indent(1).
- Use portable casts, even though this is machine-dependant code.
- Remove extraneous blank lines.
- Remove trailing newline.
- Use sigdelset(3), not SIGDELSET(9).

Requested by:	bde
2002-09-21 23:54:32 +00:00
tjr
492a050fa2 Delete stray reference to vsnprintf(). 2002-09-21 14:25:58 +00:00
tjr
111c3b394a Add implementations of the wprintf() family of functions, which perform
formatted wide-character output.
2002-09-21 13:00:30 +00:00
wollman
0819dc5dbd Initiate deorbit burn sequence for sysctl CTL_USER MIB branch.
Use the correct constants directly from sysconf() rather than calling
sysctl() to tell us the (still compiled-in) value.  Leave the CTL_POSIX1B
stuff alone for now (but I'd like to see this replaced with a single
structure returning all of the relevant information).

Implement all of the keys from 1003.1-2001 that we can.  Ensure that
the build will break if someone redefines an option constant to zero
without implementing the necessary presence-detection logic here.

(4 of 5)
2002-09-21 02:14:04 +00:00
wollman
aa09d8b564 Make the threatened fts(3) ABI fix. FTSENT now avoids the use of the struct
hack, thereby allowing future extensions to the structure (e.g., for extended
attributes) without rebreaking the ABI.  FTSENT now contains a pointer to the
parent stream, which fts_compar() can then take advantage of, avoiding the
undefined behavior previously warned about.  As a consequence of this change,
the prototype of the comparison function passed to fts_open() has changed
to reflect the required amount of constness for its use.  All callers in the
tree are updated to use the correct prototype.

Comparison functions can now make use of the new parent pointer to access
the new stream-specific private data pointer, which is intended to assist
creation of reentrant library routines which use fts(3) internally.

Not objected to in spirit by: -arch
2002-09-21 01:28:41 +00:00
tjr
b1352d9ad4 Remove unnecessary #include <assert.h>; it was used to bring in the
_DIAGASSERT macro on NetBSD, but we don't need it.
2002-09-21 00:29:23 +00:00
markm
6e7995b000 Remove a prototype for a function that is no longer called. 2002-09-20 22:23:32 +00:00
alfred
4f92df742a Fix an infinite loop when _fetch_read() can return 0 (if the
connection is broken), take this into account and return at this
point.
2002-09-20 21:50:57 +00:00
archie
207fb06f80 Revert previous commit to unbreak world until we figure out the
right way to do it.
2002-09-20 15:43:26 +00:00
tjr
dbed35f068 Lock the file once per call and use the unlocked fgetwc()/fputwc() variants. 2002-09-20 13:25:40 +00:00
tjr
ff2a681918 Lock and unlock the file once per call and use the unlocked version of
ungetc() instead of having ungetc() recurse on the lock.
2002-09-20 13:23:26 +00:00
tjr
124e10a797 Introduce unlocked versions of fputwc() and fgetwc() called __fputwc()
and __fgetwc() which can be used when we know the file is locked.
2002-09-20 13:20:41 +00:00
mike
a33d7be6d9 Add restrict type-qualifier. 2002-09-20 08:24:01 +00:00
mini
691c400510 Don't peek into MD structures from MI code. The getcontext(3) and
setcontext(3) functions check the validify of the mcontext_t structs.
2002-09-20 08:13:21 +00:00
imp
a4260bf8f1 Expose the new kernel data structures to libdevinfo:
o Added dd_pnpinfo, dd_location, dd_devflags, dd_flags and dd_state
	o Copy/initialize these as necessary.
	o Document the changes to the interface in devinfo.3.
2002-09-20 02:16:33 +00:00
archie
59b24d359e Fix a problem with the definition of HUGE_VAL causing the gcc warning
"cast increases required alignment of target type" on some platforms.

Reviewed by:	bde
2002-09-19 19:47:27 +00:00
tjr
a7450cd28a Implement the %ls and %lc conversions for printing wide character strings
and wide characters. These were already documented in the manual page,
with an entry mentioning that they were not implemented yet. The XSI
%S and %C synoyms have not been added.
2002-09-19 12:50:28 +00:00
nectar
d3b3a2b79b Add forgotten newlines in debug messages. 2002-09-19 11:36:47 +00:00
julian
3935e48680 reconnect libc_r
Hint from: deischen@freebsd.org
2002-09-19 08:06:23 +00:00
julian
f1a7dd7261 Part of a bandaid to get libc_r on air again.
Submitted by: Dan Eischen (deischen@freebsd.org)
Pointy hat for breakage just before going offline: Mini@freebsd.org
2002-09-19 07:35:39 +00:00
wollman
a58c104a74 Return the correct environment name for 64-bit platforms in the
_CS_POSIX_V6_WIDTH_RESTRICTED_ENVS case.
2002-09-19 03:47:36 +00:00
alfred
d5e93c10ec Welcome the sem_ API to libc! 2002-09-19 01:14:08 +00:00
alfred
de55ee9753 add a stub for pthread_cond_destroy. 2002-09-19 01:09:49 +00:00
mux
f5582a64c0 Add a missing file into the CLEANFILES variable.
Approved by:	peter
2002-09-18 21:16:17 +00:00
tjr
aef6a01e62 Optimise the common case where no special encoding is in use (LC_CTYPE is "C"
or "POSIX", other European locales). Use __sgetc() and __sputc() where
possible to avoid a wasteful lock and unlock for each byte and to avoid
function call overhead.
2002-09-18 12:17:28 +00:00
tjr
bb655f01d3 Logic error in previous: don't exit the loop when an incomplete multibyte
sequence is detected.
2002-09-18 10:21:41 +00:00
tjr
397f4349cf Deprecate the rest of the rune interface. 2002-09-18 06:19:12 +00:00
tjr
7eb8c7cf9a Mark mbmb(), mbrune(), and mbrrune() as deprecated functions. We want to
get applications to move to the ISO C interfaces as well as have the
freedom to replace the rune interfaces with ones that support stateful
conversions some time in the future.
2002-09-18 06:11:21 +00:00
tjr
5bb288ec92 Reimplement the functionality of fgetrune(), fputrune(), and fungetrune()
here in terms of mbrtowc(), wcrtomb(), and the single-byte I/O functions.
The rune I/O functions are about to become deprecated in favour of the
ones provided by ISO C90 Amd. 1 and C99.
2002-09-18 05:58:11 +00:00
bde
4e1f277a4f Fixed editing error in previous commit (*blush*). 2002-09-17 19:43:53 +00:00
bde
e6b86f5f97 Fixed unsorting of SRCS. 2002-09-17 14:33:23 +00:00
maxim
af06b6a609 Fix vsnprintf(3) memory leak for size == 0.
PR:             bin/36175
Obtained from:  OpenBSD
Reviewed by:    silence on -audit
MFC after:      5 days
2002-09-17 11:28:24 +00:00
peter
773f571480 Add i386 to the list of architectures that libc_r is broken on. This
effectively removes pppctl from the build for now.  It only compiles on
alpha now (now ironic).
2002-09-17 07:32:36 +00:00
peter
4ccabc355a Bandaid to stop failing on non-i386 platforms.
Add a big ugly #warning as a reminder.
2002-09-17 06:22:51 +00:00
fenner
dd87f608a3 Make _fetch_connect() always set the error code.
Tell ftp that _fetch_connect() always sets the error code (http already knew)
2002-09-17 05:54:33 +00:00
mini
43aca29e70 Use a weak symbol for signalcontext(). 2002-09-17 03:15:47 +00:00
mini
4dbf5221af Add signalcontext(), which adds a signal frame to a ucontext_t. 2002-09-17 03:11:07 +00:00
peter
a51c9b6627 Initiate deorbit burn for the i386-only a.out related support. Moves are
under way to move the remnants of the a.out toolchain to ports.  As the
comment in src/Makefile said, this stuff is deprecated and one should not
expect this to remain beyond 4.0-REL.  It has already lasted WAY beyond
that.

Notable exceptions:
gcc - I have not touched the a.out generation stuff there.
ldd/ldconfig - still have some code to interface with a.out rtld.
old as/ld/etc - I have not removed these yet, pending their move to ports.
some includes - necessary for ldd/ldconfig for now.

Tested on: i386 (extensively), alpha
2002-09-17 01:49:00 +00:00