Commit Graph

5344 Commits

Author SHA1 Message Date
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
peter
687aea4577 Mostly cosmetic. Use indentation that is reasonably close to other
ia64 *.S files in our tree (eg: locore.s).  Put the rest of the args
in the .section lines.

Reviewed by:	dfr
2001-10-29 10:18:58 +00:00
peter
f46b7aada4 Update for the new toolchain. ld doesn't provide _GLOBAL_OFFSET_TABLE_
in 2.11.2, so use a relocatable method of calculating gp.

Reviewed by:	dfr
2001-10-29 10:14:51 +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
obrien
59b24ec602 sparc64 verions of the crt initialization and finalization files required
by the ELF ABI.
2001-10-28 00:20:34 +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
115a09bd14 Add missing crti.S and crtn.S files. I have tested these with -static
linking only.  They may require some gp relative tweaks for dynamic use.
2001-10-27 10:10:45 +00:00
obrien
978013b005 Sync with other platforms. 2001-10-27 08:32:07 +00:00
obrien
1685daded0 minor style updating 2001-10-27 08:30:36 +00:00
obrien
95d3cdc936 Update for reality and syncing with other FreeBSD platforms. 2001-10-27 08:29:03 +00:00
obrien
3f6341e01c Feh, it helps to include a file other than yourself... wonder how
GCC cpp liked that.

Properly include the branding info.
2001-10-27 08:25:32 +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
peter
be540227ff Remove the -I../libc/${MACHINE_ARCH} that was there solely for
the #include "DEFS.h" that was only used on i386 (which has been fixed).
2001-10-26 21:20:23 +00:00
peter
20d15166e4 Make libc_r check the kern.usrstack sysctl instead of using internal
kernel #defines to figure out where the stack is located.  This stops
libc_r from exploding when the kernel is compiled with a different
KVM size.  IMHO this is all kinda bogus, it would be better to just
check %esp and work from that.
2001-10-26 21:19:22 +00:00
ru
7d0080d583 Style: sort __sys_foo() prototypes, tabs -> spaces, etc. 2001-10-26 18:45:02 +00:00
ru
7a9d92d6e3 Removed:
- uthread_signal.c; libc_r does not wrap signal() since 1998/04/29.

- uthread_attr_setprio.c; it was never connected to the build, and
  pthread_attr_setprio() does not exist in POSIX.

- uthread_sigblock.c and uthread_sigsetmask.c; these were no-ops
  bloating libc_r's space.

pthread_private.h:

- Removed prototypes of non-syscalls: send().

- Removed prototypes of unused syscalls: sigpending(), sigsuspend(),
  and select().

- Fixed prototype of fork().

- MFS: Fixed prototypes of <sys/socket.h> syscalls.

Reviewed by:	deischen
Approved by:	deischen, jasone
2001-10-26 17:46:36 +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
obrien
662b1c2f43 Fix nit in copyright. 2001-10-26 06:45:10 +00:00
obrien
bab04c9ad6 Use the new machine-independent versions of crtbegin and crtend
from the "common" directory.
2001-10-26 06:39:54 +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
sobomax
1cceb274c3 Don't put an extra space after password prompts, because it violates POLA,
makes FreeBSD inconsistent with previous releases and "other unices" as well
as with some internal password-asking services (e.g. ftp) within the same
release.
2001-10-25 15:51:50 +00:00
dfr
a6c75aa816 Implement va->pa translation for kernel virtual addresses. This is
untested - it only seems to be used for crashdumps.
2001-10-25 09:08:21 +00:00
archie
f7a2b8fb0b Fix bugs in NgSendMsg() and NgSendAsciiMsg() where the wrong token
value could be returned when the debug level was non-zero.

Submitted by:	Harti Brandt <brandt@fokus.gmd.de>
MFC after:	5 days
2001-10-25 04:02:25 +00:00
peter
45416fb0ae Change #include "DEFS.h" to <machine/asm.h>. 2001-10-25 01:30:54 +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
4a6f23e243 Add __FBSDID.
Change __assert() function to print failing function name.
This makes us C99 conforming.
2001-10-24 18:12:43 +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
dfr
1f56ee22a1 Partially port kvm to ia64 - virtual to physical translation is incomplete. 2001-10-23 11:05:35 +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
deischen
35bbf21e9f In the words of the submitter:
In libc_r, if _FDLOCKS_ENABLED is not defined, there is no guarantee
  in many of the sycall wrappers that _thread_fd_table[fd] is
  initialized.  This causes problems for programs that pass in file
  descriptors and execve() another program; when the exec'ed program
  tries to do an fcntl() or other syscall on the passed-in fd, it fails.

Add calls to initialize the FD table entry for _thread_fd_lock and
_thread_fd_lock_debug.

Submitted by:	Peter S. Housel <housel@acm.org>
2001-10-21 18:23:50 +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
des
940b0b81db Add NO_WERROR so the build won't die because of discarded qualifiers 2001-10-19 10:08:38 +00:00
des
90d3b3be8d Back out part of previous commit which was gcc-centric 2001-10-19 10:08:05 +00:00