diff options
author | H. Peter Anvin <hpa@zytor.com> | 2012-05-24 16:43:49 -0700 |
---|---|---|
committer | H. Peter Anvin <hpa@zytor.com> | 2012-05-24 16:43:49 -0700 |
commit | 709e0261caf798d3813228ffeef08e460b4c03a1 (patch) | |
tree | 38a26166812c35eafe0c5526a765ffe9f0757873 | |
parent | da701137f6eb9d7b05bcf27115999cf82832154a (diff) | |
download | klibc-709e0261caf798d3813228ffeef08e460b4c03a1.tar.gz |
[klibc] sys/sysmacros.h: use __static_inline
In sys/sysmacros.h use __static_inline to deal with the various forms
of inline functions. Also remove #ifndef around #include
<sys/types.h>; that is just clutter.
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
-rw-r--r-- | usr/include/sys/sysmacros.h | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/usr/include/sys/sysmacros.h b/usr/include/sys/sysmacros.h index c3443394857eb..ab2b2d4077b7a 100644 --- a/usr/include/sys/sysmacros.h +++ b/usr/include/sys/sysmacros.h @@ -8,25 +8,24 @@ #ifndef _SYS_SYSMACROS_H #define _SYS_SYSMACROS_H -#ifndef _SYS_TYPES_H -# include <sys/types.h> -#endif +#include <klibc/compiler.h> +#include <sys/types.h> #define __major(__d) (((__d) >> 8) & 0xfff) -static __inline__ int major(dev_t __d) +__static_inline int major(dev_t __d) { return __major(__d); } #define __minor(__d) (((__d) & 0xff)|(((__d) >> 12) & 0xfff00)) -static __inline__ int minor(dev_t __d) +__static_inline int minor(dev_t __d) { return __minor(__d); } #define __makedev(__ma, __mi) \ ((((__ma) & 0xfff) << 8)|((__mi) & 0xff)|(((__mi) & 0xfff00) << 12)) -static __inline__ dev_t makedev(int __ma, int __mi) +__static_inline dev_t makedev(int __ma, int __mi) { return __makedev(__ma, __mi); } |