summaryrefslogtreecommitdiffstats
path: root/lib/libstand/stand.h
Commit message (Collapse)AuthorAgeFilesLines
* o Merge <machine/ansi.h> and <machine/types.h> into a new headermike2002-08-211-2/+2
| | | | | | | | | | | | | | | | | | | | | called <machine/_types.h>. o <machine/ansi.h> will continue to live so it can define MD clock macros, which are only MD because of gratuitous differences between architectures. o Change all headers to make use of this. This mainly involves changing: #ifdef _BSD_FOO_T_ typedef _BSD_FOO_T_ foo_t; #undef _BSD_FOO_T_ #endif to: #ifndef _FOO_T_DECLARED typedef __foo_t foo_t; #define _FOO_T_DECLARED #endif Concept by: bde Reviewed by: jake, obrien
* Fix a typo in #if 0 codescottl2002-08-211-1/+1
|
* Reimplement malloc/free debugging that includes the offending file:linepeter2002-07-201-22/+15
| | | | | | | | | | | | info. This turned out to be rather useful on ia64 for tracking down malloc/free problems. Detect duplicate free()'s - otherwise these show up as a guard1 failure and it looks like corruption instead of something simple like a second free() where there shouldn't be. Deal with libz using libc headers and not seeing the malloc/free stuff that we provide in libstand. Do similar nastiness to what is done for bzlib. Tested on: i386, ia64 (compile, run)
* Add __printflike() to printf() and sprintf() prototypes. -ffreestandingpeter2002-07-201-2/+2
| | | | | turns off gcc's builtin attributes for these functions and as a result -Wformat does no checking. (argh)
* Correct bswap64() prototype.sobomax2002-06-031-1/+1
| | | | | | Submitted by: glewis MFC after: 1 day (assuming that there is re's approval)
* Add splitfs vfs layer into libstand, which allows loading big kernels andsobomax2002-03-171-0/+1
| | | | | | | | | | | | | | | | | | | | | | modules split across several physical medias. Following is how it works: The splitfs code, when asked to open "foo" looks for a file "foo.split" which is a text file containing a list of filenames and media names, e.g. foo.aa "Kernel floppy 1" foo.ab "Kernel floppy 2" foo.ac "Kernel and modules floppy" For each file segment, the process is: - try to open the file - prompt "Insert the disk labelled <whatever> and press any key..." - try to open the file - return error if file could not be located RE team is free to use this feature in the upcoming 5.0-DP1. Reviewed by: msmith, dcs
* o Don't require long long support in bswap64() functions.mike2002-03-091-5/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | o In i386's <machine/endian.h>, macros have some advantages over inlines, so change some inlines to macros. o In i386's <machine/endian.h>, ungarbage collect word_swap_int() (previously __uint16_swap_uint32), it has some uses on i386's with PDP endianness. Submitted by: bde o Move a comment up in <machine/endian.h> that was accidentially moved down a few revisions ago. o Reenable userland's use of optimized inline-asm versions of byteorder(3) functions. o Fix ordering of prototypes vs. redefinition of byteorder(3) functions, so that the non-GCC (libc asm) case has proper prototypes. o Add proper prototypes for byteorder(3) functions in <sys/param.h>. o Prevent redundant duplicate prototypes by making use of the _BYTEORDER_PROTOTYPED define. o Move the bswap16(), bswap32(), bswap64() C functions into MD space for platforms in which asm versions don't exist. This significantly reduces the complexity of some things at the cost of duplicate code. Reviewed by: bde
* o Move NTOHL() and associated macros into <sys/param.h>. These aremike2002-02-181-0/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | deprecated in favor of the POSIX-defined lowercase variants. o Change all occurrences of NTOHL() and associated marcros in the source tree to use the lowercase function variants. o Add missing license bits to sparc64's <machine/endian.h>. Approved by: jake o Clean up <machine/endian.h> files. o Remove unused __uint16_swap_uint32() from i386's <machine/endian.h>. o Remove prototypes for non-existent bswapXX() functions. o Include <machine/endian.h> in <arpa/inet.h> to define the POSIX-required ntohl() family of functions. o Do similar things to expose the ntohl() family in libstand, <netinet/in.h>, and <sys/param.h>. o Prepend underscores to the ntohl() family to help deal with complexities associated with having MD (asm and inline) versions, and having to prevent exposure of these functions in other headers that happen to make use of endian-specific defines. o Create weak aliases to the canonical function name to help deal with third-party software forgetting to include an appropriate header. o Remove some now unneeded pollution from <sys/types.h>. o Add missing <arpa/inet.h> includes in userland. Tested on: alpha, i386 Reviewed by: bde, jake, tmm
* We support writing to at least one filesystem now.jhb2001-12-111-1/+1
| | | | | | PR: kern/32389 Submitted by: Jonathan Mini <mini@haikugeek.com> Sponsored by: ClickArray, Inc.
* Add support for loading bzip2-compressed filesystems. Among other thingssobomax2001-09-181-0/+1
| | | | | | | this would allow to load bzip2-compressed kernels/modules from the loader(8) (support for that will be committer separately). MFC after: 1 month
* Replace functional bugs of ctypish functions in libstand with styledcs2001-05-141-7/+35
| | | | | | | bugs. reviewed by: bde MFC after: 1 week
* Unbreak world by defining isalnum() for libstand consumers.msmith2001-04-291-0/+1
|
* Turn dkcksum() into an __inline function.phk2000-09-161-1/+0
| | | | Change its type to u_int_16_t.
* Implement readahead buffering for non-raw files. This drastically improvesmsmith2000-09-051-1/+5
| | | | | | | | | the efficiency of byte-by-byte read operations on filesystems not already supported by the block cache (especially NFS). This should be a welcome change for users booting via PXE, as the loader now reads its startup files almost instantly, instead of taking tens of seconds.
* Cleanup warnings by adding missint prototypes, removing unneeded duplicatejhb2000-08-031-8/+9
| | | | | | | prototypes, and adding in several 'const's. Also, add some missing $FreeBSD$'s. Found by: BDECFLAGS
* Add a readdir function to the loader fsops vector, and implement thejlemon2000-04-291-0/+11
| | | | functionality for some of the filesystesms.
* Add a cleanup function. This is needed for PXE where you shouldps2000-04-201-0/+1
| | | | shutdown the UNDI and unload the stack.
* Change #ifdef KERNEL to #ifdef _KERNEL in the public headers. "KERNEL"peter1999-12-291-2/+2
| | | | | | is an application space macro and the applications are supposed to be free to use it as they please (but cannot). This is consistant with the other BSD's who made this change quite some time ago. More commits to come.
* Use the ctype.h version of isascii() - it doesn't loose precision and thinkpeter1999-12-281-1/+1
| | | | | | that 0x100 (int) is an ascii character. Submitted by: bde
* Tidy up some loose ends. nullfs_read/write were returning the wrong value.peter1999-12-271-3/+3
| | | | | | Fix some ctype problems - isascii() caused a warning if fed an unsigned char - it's always > 0 and libstand is compiled with -Wall. Missing prototype/include in printf.c
* Change toupper/tolower so that they don't give a bogus answer if thedfr1999-09-111-2/+10
| | | | argument is already upper/lower.
* $Id$ -> $FreeBSD$peter1999-08-281-1/+1
|
* POSIX introduced optreset to deal with multiple invocationsmsmith1999-01-111-2/+2
| | | | | | | | | | of getopt (as in, multiple input lines :). This is documented in the man page and is used in the code, but unistd.h and stand.h do not declare it. Incidentally, it prevents me fixing a bug in loader's code... :-) PR: misc/9373 Submitted by: "Daniel C. Sobral" <dcs@newsguy.com>
* Well I never. Seems like _setjmp()/_longjmp() are just what the doctormsmith1998-11-041-1/+5
| | | | | | | ordered. This brings the Alpha back to parity, and should bring us BootForth on both platforms. Submitted by: John Birrell (jb@freebsd.org)
* Improve the quality of isspace() to match expectations. This should makemsmith1998-11-041-2/+2
| | | | the Ficl interpreter read its softwords array OK.
* Add:msmith1998-11-011-1/+2
| | | | | | assert() setjmp()/longjmp() vsprintf()
* Add a new field to the devsw structure; dv_print, to print all valid unitsmsmith1998-10-311-1/+2
| | | | | | | etc. associated with the device entry. Consider EOF an 'error' for fgetstr if we haven't read anything yet. You *MUST* recompile and reinstall libstand before rebuilding the bootstrap.
* Implement a hook to allow us to reclaim the memory used by the first stagedfr1998-10-191-1/+4
| | | | of the bootstrap (the bit which loads /boot/loader).
* Enable the DOS filesystem. This allows reading from various DOS filesystemsmsmith1998-10-061-3/+1
| | | | | | | (FAT12/16/32, VFAT). Make a private copy of strcasecmp, as the "real" one uses the system ctype header, which introduces locale poisoning.
* * Enable old UFS compatibility code for booting from Digital Unix formatteddfr1998-09-261-2/+26
| | | | | | | disks. * Fix a whole raft of warnings, printf and otherwise. * Make zalloc work for alpha (just a case of using the right typedef). * Add some (disabled) malloc debug printing to stand.h.
* Replace the old and extremely icky Mach/NetBSD allocator with a similarlymsmith1998-09-261-5/+16
| | | | | | | | | | | | | | | | | compact and much better one donated by Matt Dillon. Implement a simple sbrk() which uses the existing setheap() api. Remove the custom allocator from the UFS code. It wasn't working quite right, and it shouldn't be needed with the new allocator. Fix a serious problem with changing the value of already-existent environment variables. Don't attempt to modify the supposedly-const argument to putenv() Fix an off-by-one sizing error in the zipfs code detected by the new allocator. Submitted by: zmalloc from Matt Dillon <dillon@backplane.com>
* Nuke prototype for strerror, consumers get it from <string.h>msmith1998-09-181-3/+1
| | | | Fix overlooked nullopen() implementation.
* Path arguments to *_open functions should be const, but we were manglingmsmith1998-09-181-10/+7
| | | | | | them. Submitted by: write-protected text segment in BTX
* Fixed syntax errors (__dead should have gone away years ago, andbde1998-08-241-2/+2
| | | | __attribute__(()) is a gccism - we use __dead2).
* This is libstand; a support library for standalone executables (eg. bootstrapmsmith1998-08-201-0/+305
modules). Obtained from: NetBSD, with some architectural changes and many additions.
OpenPOWER on IntegriCloud