diff options
author | Niklas Hallqvist <niklas@cvs.openbsd.org> | 1996-04-19 16:10:53 +0000 |
---|---|---|
committer | Niklas Hallqvist <niklas@cvs.openbsd.org> | 1996-04-19 16:10:53 +0000 |
commit | 7c4cfc5c047725e6c4c20e9adaa1ef4e70ff68d1 (patch) | |
tree | d415490c429995abee8d4ce27fac8216028a989c /sys/lib/libkern/libkern.h | |
parent | 6b3902486151983e34413a0e5a4bead588217855 (diff) |
NetBSD 960317 merge
Diffstat (limited to 'sys/lib/libkern/libkern.h')
-rw-r--r-- | sys/lib/libkern/libkern.h | 50 |
1 files changed, 29 insertions, 21 deletions
diff --git a/sys/lib/libkern/libkern.h b/sys/lib/libkern/libkern.h index e292a3ca8b1..53a8600cd77 100644 --- a/sys/lib/libkern/libkern.h +++ b/sys/lib/libkern/libkern.h @@ -1,5 +1,5 @@ -/* $OpenBSD: libkern.h,v 1.2 1996/02/29 13:27:49 niklas Exp $ */ -/* $NetBSD: libkern.h,v 1.6 1996/02/13 23:48:26 christos Exp $ */ +/* $OpenBSD: libkern.h,v 1.3 1996/04/19 16:09:23 niklas Exp $ */ +/* $NetBSD: libkern.h,v 1.7 1996/03/14 18:52:08 christos Exp $ */ /*- * Copyright (c) 1992, 1993 @@ -38,71 +38,79 @@ #include <sys/types.h> -static __inline int imax __P((int, int)); -static __inline int imin __P((int, int)); -static __inline u_int max __P((u_int, u_int)); -static __inline u_int min __P((u_int, u_int)); -static __inline long lmax __P((long, long)); -static __inline long lmin __P((long, long)); -static __inline u_long ulmax __P((u_long, u_long)); -static __inline u_long ulmin __P((u_long, u_long)); -static __inline int abs __P((int)); +#ifndef LIBKERN_INLINE +#define LIBKERN_INLINE static __inline +#define LIBKERN_BODY +#endif -static __inline int + +LIBKERN_INLINE int imax __P((int, int)); +LIBKERN_INLINE int imin __P((int, int)); +LIBKERN_INLINE u_int max __P((u_int, u_int)); +LIBKERN_INLINE u_int min __P((u_int, u_int)); +LIBKERN_INLINE long lmax __P((long, long)); +LIBKERN_INLINE long lmin __P((long, long)); +LIBKERN_INLINE u_long ulmax __P((u_long, u_long)); +LIBKERN_INLINE u_long ulmin __P((u_long, u_long)); +LIBKERN_INLINE int abs __P((int)); + +#ifdef LIBKERN_BODY +LIBKERN_INLINE int imax(a, b) int a, b; { return (a > b ? a : b); } -static __inline int +LIBKERN_INLINE int imin(a, b) int a, b; { return (a < b ? a : b); } -static __inline long +LIBKERN_INLINE long lmax(a, b) long a, b; { return (a > b ? a : b); } -static __inline long +LIBKERN_INLINE long lmin(a, b) long a, b; { return (a < b ? a : b); } -static __inline u_int +LIBKERN_INLINE u_int max(a, b) u_int a, b; { return (a > b ? a : b); } -static __inline u_int +LIBKERN_INLINE u_int min(a, b) u_int a, b; { return (a < b ? a : b); } -static __inline u_long +LIBKERN_INLINE u_long ulmax(a, b) u_long a, b; { return (a > b ? a : b); } -static __inline u_long +LIBKERN_INLINE u_long ulmin(a, b) u_long a, b; { return (a < b ? a : b); } -static __inline int +LIBKERN_INLINE int abs(j) int j; { return(j < 0 ? -j : j); } +#endif /* Prototypes for non-quad routines. */ int bcmp __P((const void *, const void *, size_t)); @@ -111,7 +119,7 @@ int locc __P((int, char *, u_int)); u_long random __P((void)); char *rindex __P((const char *, int)); int scanc __P((u_int, u_char *, u_char *, int)); -int skpc __P((int, int, char *)); +int skpc __P((int, size_t, u_char *)); size_t strlen __P((const char *)); char *strcat __P((char *, const char *)); char *strcpy __P((char *, const char *)); |