Commit Graph

2876 Commits

Author SHA1 Message Date
jhb
5de781a6e1 - There is no such thing as a socket structure. sockets are integers.
I'm assuming that the comment was regarding socket address structures, so
  correct the comment about pre-zero'ing socket structures to recommend
  pre-zero'ing socket address structures.
- Fix some minor grammar nits.
- This isn't directly submitted by the PR below but is related to it and was
  inspired by it.

PR:		31704
2001-11-05 18:05:56 +00:00
dd
34e612e7bc Document ENETDOWN.
PR:		31436
Submitted by:	Milon Papezik <milon.papezik@oskarmobil.cz>
2001-11-05 00:44:38 +00:00
dd
d7894dcef6 malloc and calloc do not free memory.
PR:		31365
Submitted by:	SUZUKI Koichi <koich@cac.co.jp>
2001-11-05 00:39:27 +00:00
peter
e99496b69b Make strtod.c work on Alpha as well. strtod.c has got locale support,
the netbsd_strtod.c file we have does not.  More still should be done
here, but this works happily on my Alpha.  I have not (yet?) changed
the Makefile.inc to use this.
2001-11-04 21:30:12 +00:00
peter
b77df30c32 Slightly closer to netbsd_strtod.c:
s/IEEE_8087/IEEE_LITTLE_ENDIAN/
s/IEEE_MC68k/IEEE_BIG_ENDIAN/
2001-11-04 18:04:00 +00:00
dfr
2808db915d Implement fpsetmask() and fpgetmask(). 2001-11-03 15:52:18 +00:00
phk
0aeb564985 phkmalloc->evilchecks++;
If zero bytes are allocated, return pointer to the middle of page-zero
(which is protected) so that the program will crash if it dereferences
this illgotten pointer.

Inspired & Urged by:	Theo de Raadt <deraadt@cvs.openbsd.org>
2001-11-02 11:32:28 +00:00
phk
8fe9b8ed96 Add notice about early use from malloc.c forbidding malloc use from
this function.
2001-11-02 11:30:42 +00:00
markm
73fa39dbf7 Add a long-overdue nail to the deprecated /dev/urandom interface
by asking some things that need unpredictable numbers to read
/dev/random instead.
2001-10-30 21:26:50 +00:00
mike
a535f37a5c Make the output from assert() look more like the example in the C99
standard.

Requested by:	bde
2001-10-29 07:07:25 +00:00
dillon
720e70cb89 Add time_to_int(), int_to_time(), time_to_long(), long_to_time(). 2001-10-28 20:13:16 +00:00
dillon
cdfce93ee2 Add routines to convert time_t to/from fixed-bit fields. These routines
serve two purposes: (1) so we can maintain backwards compatibility with
protocols (rwhod, dump, etc...) that either assume time_t is 32 bits or
assume sizeof(time_t) == sizeof(int), or make other similar assumptions.
(2) To tag such routines (by the presence of these calls) for future
cleanup/extension work.

The 32->64 routine, time32_to_time() (when time_t is 64 bits, that is),
is defined specifically to implement temporal locality to properly set the
msb bits of a 64 bit time_t quantity, using the 50 year rule.  The locality
code has not been implemented yet (and doesn't need to be for a while),
but that is the intent.   This will allow us to maintain backwards protocol
compatibility past 2038.

These routines are intended to be platform and time_t agnostic.

MFC after:	1 week
2001-10-28 19:54:49 +00:00
mike
114c18db6c Only provide function information in compile environments that support
the C99 variable __func__ and never for C++.  Provide a more meaningful
example in the assert(3) manual.

Reviewed by:	asmodai, bde
2001-10-27 20:11:10 +00:00
mike
d7630935f8 Restore K&R prototype. Fix other style bugs.
Reviewed by:	asmodai, bde
2001-10-27 19:37:20 +00:00
peter
b9a1c3eee0 Explicitly use int32_t for on-disk records for pw_change and pw_expire,
since that is what we use now and this insulates us from any time_t
tweaks here.  We can define a record format that uses 64 bit times if/when
we need to.
2001-10-27 02:13:41 +00:00
ru
8593f28775 Remove the internal implementation details of wrapping syscalls,
which do not match the reality anyway.

Approved by:	deischen, bde
2001-10-26 17:38:20 +00:00
dfr
5d8c745d81 Compensate for the way that _setjmp aligns the start of jmp_buf. 2001-10-26 08:26:45 +00:00
jake
dd25f1fe17 Minimal libc for sparc64.
Reviewed by:	obrien
2001-10-26 05:40:07 +00:00
ache
b9bd6afb1e In > LONG_MAX test use sseek return value and not _offset which can be not
active.
2001-10-25 22:56:04 +00:00
peter
8f3f1620f0 De-orbit DEFS.h - the other arches do not use it, and it got replaced
with <machine/asm.h>.

Reviewed by:	bde
2001-10-24 20:29:14 +00:00
asmodai
c3318c8912 Add __FBSDID.
Change __assert() function to print failing function name.
#if 0 the sccsid block.
This makes us C99 conforming.
2001-10-24 18:12:18 +00:00
ache
7f81291a50 Help to recover from bad seek (i.e. negative or too big) happens beyond
our pre-check control. Do the same way as refill.c does when it set __SERR,
i.e. clear read and ungetc buffers. Clear EOF flag too.
2001-10-24 17:25:49 +00:00
ache
3f2299fc0e Back out read buffer invalidating via __SMOD.
It was correct, but not needed because internal buffer cleared on each seek
outside of it.
2001-10-23 23:52:11 +00:00
ache
1b500e26e3 Change comment explaining another usage of __SMOD 2001-10-23 23:05:15 +00:00
ache
097d5a5b6e Disallow fseek() optimization in internal read buffer, if pointer is moved by
seek. It means that beginning of read buffer becomes not the same as current
file position.
2001-10-23 22:48:00 +00:00
imp
1e4b417f66 Allow users to specify a command to use as remote command instead of
using rcmd directly.  This has been in my tree for a long time, but we
may need to sync with OpenBSD before MFC.

Obtained from: openbsd
PR: 15830

MFC after: 2 months
2001-10-23 06:22:15 +00:00
dd
97c4dcf543 Refer to chflags(2) instead of chflags(1) (since we're a section 2
manual page), fix capitalization, and remove chflags reference from
SEE ALSO since the only time it's referenced is with an .Xr, anyway.

Submitted by:	bde
2001-10-23 00:54:58 +00:00
peter
f765de5a8e Fix WAW dependency. p6 is written in the syscall epilogue. 2001-10-22 09:17:14 +00:00
dfr
5c371836c3 Fix a few more dependancy violations. 2001-10-22 08:48:11 +00:00
dfr
f87cf4b8a5 Implement setjmp, longjmp, sigsetjmp and siglongjmp. 2001-10-20 15:19:08 +00:00
dfr
a1b35749c4 Add __divdf3(), __divsf3() and __infinity[].
Obtained from:	Intel (for the divide code)
2001-10-20 15:17:31 +00:00
ru
a74c7de632 mdoc(7) police: join OS version with the corresponding macro. 2001-10-19 14:44:13 +00:00
ru
99ecf9781a Just use RSYSCALL. 2001-10-19 13:32:24 +00:00
ru
536f27b5db signanosleep(2) hasn't existed since 1998. 2001-10-19 13:01:57 +00:00
alfred
bc1db61967 s/kernal/kernel 2001-10-19 07:52:11 +00:00
jlemon
53432bcb66 Use the new SIOCGIFINDEX ioctl to efficiently map a name to an index.
If the syscall fails, fall back on the old method as a compatability
measure.
2001-10-17 20:08:15 +00:00
alfred
1ac0094263 Fix reference to aio_read, should be aio_write 2001-10-16 00:49:19 +00:00
bde
8988e6343d Fixed style bugs in previous commit. 2001-10-15 04:29:06 +00:00
dd
6f9331d224 link(2) may fail with EPERM if name1 is immutable or append-only.
PR:		31025
Submitted by:	Tim Singletary <tsingle@vetinsite.com>
2001-10-14 22:40:19 +00:00
dfr
0fb5ae6020 Make this compile on ia64. 2001-10-14 13:45:33 +00:00
dillon
a248f5943a Add warning about zeroing-out the socket structure before populating it. 2001-10-13 17:20:51 +00:00
mike
6fb85fc830 Note that strncmp() will not compare characters after a NUL character.
Add a missing word.  Bump document date.

Inspired by:	IEEE Std 1003.1-200x (Draft 7)
MFC after:	3 days
2001-10-11 17:02:44 +00:00
mike
5a6af77527 Clarify that strnstr() will stop searching after in encounters a NUL
character.  Bump document date.  Add a missing comma.
2001-10-11 15:49:06 +00:00
ru
fc8fa0b910 - Bump document date for eaccess(2) addition.
- Mention ``eaccess'' in the NAME section.
- Use intro(2) terminology.
- Markup fixes.

Reviewed by:	rwatson
2001-10-11 15:27:53 +00:00
mr
22cefbf470 Fix SysV Semaphore Handling.
Updated by peter following KSE and Giant pushdown.
I've running with this patch for two week with no ill side effects.

PR:		kern/12014: Fix SysV Semaphore handling
Submitted by:	Peter Jeremy <peter.jeremy@alcatel.com.au>
2001-10-11 08:15:14 +00:00
bde
94220967cf Compensate for "Compensate for header dethreading" by backing it out. 2001-10-10 17:48:44 +00:00
ru
293c95419d getnetbyaddr() should be serviced by the "networks" database. 2001-10-10 12:49:53 +00:00
dfr
d6e961ff95 Adjust so that we don't use relocations which can't exist in a shared
library.
2001-10-10 10:35:01 +00:00
dfr
05752fa7a3 Shorter versions of the byte swapping code. 2001-10-10 10:34:08 +00:00
ache
cb74a0f9dc Implement strcasestr() which many others (f.e. Linux) already have. 2001-10-10 02:17:35 +00:00