Commit Graph

585 Commits

Author SHA1 Message Date
cgd bb7cdd7c0b don't bother initializing 'freelist' -- it can be bss 1999-05-28 19:31:51 +00:00
eeh 4f46ad62b9 Find the udivrem.m4 in the proper directory. 1999-05-09 18:51:36 +00:00
pk 502e9c5778 Add .PATH.m4 1999-05-09 09:16:15 +00:00
eeh 06e7ea9afe Allocating a byte-array and then accessing it as 32-bit integers just won't work
on any machine that has alignment restrictions.
1999-05-09 00:22:46 +00:00
drochner e6b49c7863 move intoa() from libsa:net.c to libkern, turn inet_ntoa() into a macro,
nuke ip_convertaddr()
1999-05-07 14:49:52 +00:00
drochner 192b3c733c Build libraries for kernel/standalone code from within their compilation
directories and use .PATH to lookup the source files.
(Formerly, the libs were built from the source dirs, with MAKEOBJDIR
set to the compilation directory.)
This solves 2 problems:
-"mkdep" and "make" are now consistent about the file lookup, this fixes
 bad interactions with amd reported in PR bin/7374 (Arne Juul) and
 lossage reported by Andrew Gillham ("obj" dirs and relative paths still
 don't work well together)
-kernel compile trees can be moved around without forcing a new
 "make depend" - fixing PR kern/4021 by Martin Husemann
1999-05-07 14:28:50 +00:00
tsubai a5bf1bf4a2 Copy from libc. 1999-05-05 12:36:40 +00:00
christos a2c49bf69e Nuke local prototype for closeall(). Add a new define LIBSA_NO_CLOSE so that
we don't try to close files, if we are not using any other I/O.
1999-04-28 13:24:12 +00:00
christos 2da63ed66f cosmetic printf change 1999-04-28 09:12:24 +00:00
christos 0fdd24ecdc MI loadfile (used by i386, pmax and sparc shortly) 1999-04-28 09:08:50 +00:00
christos cd9b06e204 Don't try to use <stdio.h> (when -DDEBUG) if we are -D_STANDALONE or -D_KERNEL
Now the boot blocks compile with -DDEBUG
1999-04-22 16:32:01 +00:00
cgd 227295dad5 set lflag when printing pointers with %p 1999-04-20 23:04:17 +00:00
simonb 955a0aba21 Until <bsd.lib.mk> is fixed, don't try to guess whether or not to
use abicalls in kernel source.
1999-04-20 00:45:24 +00:00
ws 5423093850 Modify syncicache on PowerPC from an inline to a real function.
Support different cache line sizes with the same object code in userland.
While here, move the function to implementation name space.
1999-04-17 21:16:45 +00:00
simonb 3395bf67b0 For the "update-sources" target, don't copy any src/lib/libz sources
that differ only in the first line (the NetBSD RCS header).
1999-04-15 02:28:36 +00:00
simonb 351120e29a Add uncompr.c to LIBZSRCS and zalloc.c to SRCS. 1999-04-15 00:52:58 +00:00
simonb 077cae2629 A simple implementation of zcalloc and zcfree in terms of the libsa
alloc and free.
1999-04-15 00:50:39 +00:00
simonb fe27047537 Add source file, copied from lib/libz/uncompr.c. 1999-04-15 00:48:03 +00:00
christos d15d073dcf add getopt prototype, and externs 1999-04-14 15:23:27 +00:00
drochner b7c510645f move "ls" utility from i386/stand/libsa here 1999-04-14 11:32:50 +00:00
drochner 2269d36c97 make libkern compile in userland - for testing purposes 1999-04-13 19:00:30 +00:00
drochner b6ab6f5dc1 This was an n_long, not u_long, so u_int32_t is correct. 1999-04-12 17:23:23 +00:00
ross 4634c0e3d4 libkern just got an inet_addr(), but it won't compile, no prototype. Cleanup...
* Add prototype to libkern.h.
* Remove the almost-identical-copy from libsa/net.[ch].
* Change its type back to the (wrong, but harmless) historical one. (u_long)
* Kill the XXX local prototype in nfs_bootparam.c
1999-04-12 01:05:01 +00:00
gwr c0300346be Add inet_addr.c (for nfs_bootparam.c) 1999-04-11 22:08:06 +00:00
simonb fa38a5236c The "found" label is not used if ALLOC_FIRST_FIT is defined. 1999-04-11 04:02:37 +00:00
simonb 6db650781c Don't compile in sanity checks for old file systems if
LIBSA_NO_COMPAT_UFS is defined.
1999-04-01 05:27:54 +00:00
simonb 8f8c1f41d9 It's no use having a memcmp() that calls bcmp() if there's no bcmp() in
the SA library.  Basically copied from ../libkern with a few less #if's
and #include's.
1999-04-01 05:12:20 +00:00
simonb e46b652af6 bestsize is unused if ALLOC_FIRST_FIT is defined. 1999-04-01 02:41:08 +00:00
simonb 6ce60662b5 Sync with src/lib/libc/string/bcmp.c 1999-04-01 00:30:39 +00:00
simonb ff2206f6df G/C UFS_NOSYMLINK, UFS_NOCLOSE and UFS_NOWRITE and use new LIBSA_NO_FS_*. 1999-03-31 07:43:39 +00:00
cgd 309213477a Make a bunch of backward-compatible changes to the boot blocks which allow
size to be reduced substantially.  (backward compatibility verified
by compiling one of the alpha boot blocks which uses all of the code
before and after, diffing the object files, and manually verifying that
the differences were 'correct'.  some differences were "unavoidable,"
it wanting to avoid a double-commit, because e.g. local variables which
were previously used were no longer used.)  a README which describes
supported options (or at least the ones mentioned below) is forthcoming.

add support for the preprocessor macro LIBSA_NO_TWIDDLE, which
  causes calls to twiddle() to be omitted if it's defined.
add support for the preprocessor macros:
	LIBSA_NO_FS_CLOSE
	LIBSA_NO_FS_WRITE
	LIBSA_NO_FS_SEEK
  which, if defined, cause the corresponding file system operations
  in the individual file system implementations to be omitted.  (note
  that all of those macros are not supported by all file systems at
  this point.  comments were added to individual file system files
  to indicate lack of support, and should be cleaned up later.  Backward
  compatibility options e.g. UFS_NOCLOSE, etc., are supported.)
add support for the preprocessor macro LIBSA_NO_FS_SYMLINK, which
  removes support for symbolic links from the file system support
  functions.  (same notes as for the macros above apply.)
add support for the preprocessor macro LIBSA_FS_SINGLECOMPONENT which
  removes all subdirectory and symlink support from the file system
  support functions.  (same notes as for the macros above apply.)
add support for the preprocessor macro LIBSA_NO_FD_CHECKING, which
  causes code relating to libsa file descriptor checks (e.g. range
  checking and checking that a file descriptor is valid) to be
  omitted if it's defined.
add support for the preprocessor macro LIBSA_NO_RAW_ACCESS, which
  causes code relating to raw device access to be omitted if it's
  defined.
change some structure copies to use bcopy() instead.  that way
  use of bcopy vs. memcpy() can easily be selected by
  LIBSA_USE_MEMCPY.  (without changes like these, you could end up
  having both bcopy() and memcpy() included.  eventually, all
  calls to bcopy should be changed to calls to memcpy() or memmove()
  as appropriate -- hopefully never the latter -- with an option to
  use bcopy instead.)
add support for the preprocessor macro LIBSA_NO_DISKLABEL_MSGS, which
  causes disklabel() to return '1' as msg rather than a string.  Can
  be used if the boot blocks don't care about the string, and need to
  save the space.
add support for the preprocessor macro LIBSA_SINGLE_FILESYSTEM, which
  if defined causes all of the file system switch code to be removed.
  Its value should be the name of the file system supported by the
  boot block, e.g. "ufs" for the FFS file system.  calls to the
  file system functions open, close, etc., which were previously
  done through a function switch are then done via direct invocation
  of <fs>_open, <fs>_close, etc. (e.g. ufs_open, ...).
add support for the preprocessor macro LIBSA_SINGLE_DEVICE, which
  does the equivalent of LIBSA_SINGLE_FILESYSTEM but for the device
  switch table.  Device entry pointes are expected to be named
  <dev>foo, e.g. the 'strategy' routine used when LIBSA_SINGLE_DEVICE
  is set to 'disk' is diskstrategy.
make ufs.c f_nindir array be unsigned ints.  the fact that it was signed
  caused ufs.c to require signed division routines (which were otherwise
  unnecessary for a small boot block).
1999-03-31 01:50:25 +00:00
cgd e5ce91e0f3 replace memcpy() implementation (which just called bcopy()) with
a small implementation of memcpy().  libsa memcpy() wouldn't
do the right thing if LIBSA_USE_MEMCPY was defined, and the whole
point of that define is to get rid of either bcopy() or memcpy().
(cloned from the bcopy() code.)
1999-03-31 01:39:16 +00:00
cgd 8aa0c52d66 #undef bcopy, so that this will still compile if LIBSA_USE_MEMCPY is defined 1999-03-30 22:03:47 +00:00
cgd 9d06bcdcfe Add bzero.c, errno.c, and memset.c to SRCS 1999-03-30 22:02:39 +00:00
cgd 9ce004e069 add simple (small) implementations of memset and bzero. the versions
in libkern are fine for the kernel, but the versions here are smaller
and in libsa the point is size.
1999-03-30 22:01:15 +00:00
cgd 1611da0c3c move errno to its own file; if you just need errno, you don't need dev.c's fns 1999-03-30 21:59:58 +00:00
dbj 82347ce33e Changes to compile the next68k bootblocks with
egcs -Wpointer-arith -Wstrict-prototypes
This closes pr 6653
1999-03-26 15:41:38 +00:00
simonb 5d23f12467 Don't call f_dev->dv_close if it's a null pointer when an open() call
fails.
1999-03-26 03:16:15 +00:00
simonb 9913b7202b Revert SA_NOPUTCHAR - the pmax was the only port using it and the new
pmax bootblocks provide a putchar().
1999-03-23 22:25:31 +00:00
simonb 5e5bf63bc1 Don't add .abicalls if NO_ABICALLS is defined even if ABICALLS is defined. 1999-03-17 13:31:43 +00:00
jonathan 4c6134d7c8 Use merged memcpy()/memset() based on old bcopy rather than C-coded memmove.
TODO: change register usage so memcpy()/memmove() is default, put test
for back-copy before memcpy() and back-copy loop after memcpy().
1999-03-15 07:04:04 +00:00
jonathan e22fd3b59d Fix bug in construction of word-length version of 'c'.
Preserve input string and return it as per userlevel spec.
1999-03-15 06:34:10 +00:00
pk fabda9a224 Sync with libc 1999-03-05 09:18:32 +00:00
drochner 66f3455141 make the mipse[lb]->mips translation really work
(the S/// doesn't work as I'm now telling the 3rd time),
put the translation onto a separate line to make it more understandable
1999-03-04 19:46:09 +00:00
jonathan 3eeb52dee0 Makefile ${MACHINE_ARCH} changes for mips{eb,el}, as suggested by
Izumi Tsutsui <tsutsui@ceres.dti.ne.jp>
1999-03-03 12:00:18 +00:00
kim cc6ca72465 Made this compile:
- fifth arg to recvtftp should be size_t (not ssize_t)
- the path is passed tftp_makereq as a part of the handle structure
1999-02-28 00:57:07 +00:00
christos dd247aa44e Add missing prototypes for static functions. 1999-02-26 22:46:32 +00:00
ross 91d91ef1b2 XXX include libkern.h for strlen() XXX 1999-02-25 20:21:08 +00:00
drochner 0633616d7a build tftp filesystem, rearrange .ifdef slightly so that network stuff
is not built if ${SA_INCLUDE_NET} is not set
1999-02-24 19:31:03 +00:00
drochner 03497d6478 move TFTP filesystem from i386/stand/libsa here, it is mi 1999-02-24 19:24:56 +00:00