Commit Graph

14 Commits

Author SHA1 Message Date
mycroft 897a8a7f29 Mark [hn]to[nh][ls]() with __const__, so they are subject to CSE. 1999-01-24 12:55:01 +00:00
bouyer dc306354b0 Move the bswap functions from libutil to libc (this bups the
minor of libc and the major of libutil). For little-endian architectures
merge the bnswap() assembly versions with nto* and hton* using symbols
aliasing. Use symbol renaming for the bswap function in this case to avoid
namespace pollution.
Declare bswap* in machine/bswap.h, not machine/endian.h. For little-endian
machines, common code for inline macros go in machine/byte_swap.h
Sync libkern with libc.
Adjust #include in kernel sources for machine/bswap.h.
1999-01-15 13:31:15 +00:00
kleink 1b6a24c1d4 Support for compound statements enclosed in parenthes to appear as
expressions is a GNU C extension; mark as such them with __extension__ to
suppress portability warnings.  Addresses kern/3562 and misc/6185, as suggested
by Dave Sainty <dave@dtsp.co.nz>.
1998-12-16 11:11:02 +00:00
ragge b6158fa5e3 EGCS fixes. Implement htons as a C macro instead of asm; generates as
good code as the asm implementation _and_ can be optimized.
1998-11-07 17:22:58 +00:00
ragge 8fdb1c8ebe Lots of kernlib functions rewritten as inline macros. 1998-08-08 11:18:32 +00:00
bouyer 6ab3092b11 Add byte-swapping functions (bswap16, bswap32, bswap64) to libkern.
Only assembly version for i386 bswap16 and bswap32 for now (bswap64 uses
bswap32). Contribution of assembly versions of these are welcome.
Add byte-swapping of ext2fs metadata for big-endian systems.
Tested on i386 and sparc.
1997-10-09 15:42:19 +00:00
christos 16b74d2c00 use in_addr_t and in_port_t 1996-10-13 03:28:00 +00:00
ragge a24af7a7c2 Added prototypes to everything. Made all files compile with -Wall. 1996-04-08 18:32:26 +00:00
ragge ce63fbf5f1 Bug fix in byte_swap_word(); didn't always make it. 1995-08-21 16:36:32 +00:00
ragge 5ad69f2c9d nton?/ntoh? moved to endian.h. 1995-07-05 08:22:21 +00:00
jtc 71ab4ed9dc KERNEL -> _KERNEL 1995-03-28 18:13:48 +00:00
ragge 4fb1817e07 Lots of fixes... 1995-02-13 00:43:20 +00:00
cgd d62187c043 new RCS ID format. 1994-10-26 08:01:33 +00:00
ragge 8026fb53f2 Initial VAX port merging. 1994-08-02 20:18:46 +00:00