Commit Graph

72 Commits

Author SHA1 Message Date
Bruce Evans
432889653c Added prototypes. 1995-12-26 13:25:13 +00:00
Nate Williams
637442dc62 Add-back strlen.c to the library in case a kernel is compiled without
optimization.  Gcc only in-lines calls to strlen with optimization
turned on.
1995-12-19 19:47:05 +00:00
Poul-Henning Kamp
d89a1b600f Add qsort() to libkern, taken from libc. 1995-11-08 08:40:11 +00:00
Poul-Henning Kamp
16657f0ba9 Comment out, but don't delete stuff we don't use.
Classify in "gcc stuff" and "legitimate stuff".
1995-10-05 14:46:07 +00:00
Bruce Evans
5182dcbec2 Rearrange the inner loop of scanc() to get better code on i*86's
(on an i486, 10 cycles (+ cache misses) instead of 15).  The
change should be a no-op if the compiler is any good.  The best
possible i*86 code for the same algorithm is only 1 more cycle
faster on i486's so I don't want to bother implementing an
assembler version.

scanc() is a bottleneck for OPOST processing.  It is naturally
about 4 times as slow as bcopy() on 32-bit systems.
1995-07-11 18:50:47 +00:00
Rodney W. Grimes
9b2e535452 Remove trailing whitespace. 1995-05-30 08:16:23 +00:00
Rodney W. Grimes
6c06b4e2aa Remove trailing whitespace. 1995-05-30 05:51:47 +00:00
Rodney W. Grimes
63bc0cc148 Do not install libkern into /usr/lib, blank target install: added. 1995-03-23 07:02:14 +00:00
Poul-Henning Kamp
5edd0e154f <libkern/libkern.h> has moved to <sys/libkern.h> (repository copy).
Since /usr/include/libkern doesn't and shouldn't exist, this is the
least evil way to handle this.
1995-03-17 06:15:40 +00:00
Bruce Evans
b5e8ce9f12 Add and move declarations to fix all of the warnings from `gcc -Wimplicit'
(except in netccitt, netiso and netns) and most of the warnings from
`gcc -Wnested-externs'.  Fix all the bugs found.  There were no serious
ones.
1995-03-16 18:17:34 +00:00
Garrett Wollman
ef0cdf3329 Add inet_ntoa() and replace ARP's private routine with same. 1995-03-16 17:32:27 +00:00
Ugen J.S. Antsilevich
be96c4f445 Add strncmp() function..I need it and
hope nobody will eat me alive for this..:)
1995-02-27 09:16:04 +00:00
Bruce Evans
fa724216f5 Always build libkern_p.a. `NOPROFILE' should only control user libraries. 1995-01-10 01:57:56 +00:00
Bruce Evans
1b099e1e02 Hide the declaration of ffs() if an inline ffs() is implemented.
I couldn't find a better way to avoid compiler warnings about
redundant and/or inconsistent declaration of ffs().  I'd like to
be able to declare prototypes in general headers without committing
to implementing them as `static inline' or `extern', but there
seems to be no way to do this with gcc-2.6.1.  E.g.,

	int foo(void);
	static __inline int foo(void) { return 1; }

causes a warning about the linkage mismatch, while the opposite
order causes a warning about the redundant declaration.
1994-11-14 14:56:46 +00:00
Jordan K. Hubbard
3af384bf88 I'm going to nuke strtol() for now. Now I need strncmp() and rather
that add it too, and end up fighting an unwanted battle right now,
I'm just going to back away from both and start including my own private
copies of everything.  I'm not going to use _anything_ from libkern
until we decide its fate.
1994-10-26 11:14:21 +00:00
Jordan K. Hubbard
f8a31dd2ac Add strtol() to libkern in support of some other work I'm doing.
I just know I'm going to get flamed for adding for the miserable
abortion that is libkern, but what am I supposed to do?  At least I
didn't drag in the ctype stuff! :-)
1994-10-25 14:57:57 +00:00
Bruce Evans
6485b5ff77 Use new-style declarations for min/max functions so that
"gcc -Wstrict-prototypes" doesn't emit warnings about them.

Write each min/max functions on a single line so that the similarity and
triviality of the functions is more obvious.

Put the quad min/max functions in the correct place (aphabetical order).

The u_quad min/max functions are missing.  Only 3 or 4 of the min/max
functions are actually used.  sys/socketvar.h ``should use "lmin" but
it doesn't exist now''.  lmin does exist now, but isn't used.  Since we
depend on gcc for `inline', perhaps we should depend on it for __typeof
and function-expressions and use only macros min() and max() that work
for any types (I'm not sure how to handle mixed types).
1994-09-18 23:04:25 +00:00
Paul Richards
03b6d659e5 Added -DKERNEL and added support for kernel profiling.
Reviewed by:	Bruce
1994-09-15 15:41:48 +00:00
David Greenman
147db1cbab Added qmin and qmax functions to deal with quad_t's. 1994-08-30 18:19:47 +00:00
David Greenman
3c4dd3568f Added $Id$ 1994-08-02 07:55:43 +00:00
Rodney W. Grimes
58f0484fa2 BSD 4.4 Lite Lib Sources 1994-05-27 05:00:24 +00:00
Rodney W. Grimes
df8bae1de4 BSD 4.4 Lite Kernel Sources 1994-05-24 10:09:53 +00:00