klibc-bot for H. Peter Anvin
2012-May-24 23:48 UTC
[klibc] [klibc:master] sys/sysmacros.h: use __static_inline
Commit-ID: 709e0261caf798d3813228ffeef08e460b4c03a1 Gitweb: http://git.kernel.org/?p=libs/klibc/klibc.git;a=commit;h=709e0261caf798d3813228ffeef08e460b4c03a1 Author: H. Peter Anvin <hpa at zytor.com> AuthorDate: Thu, 24 May 2012 16:43:49 -0700 Committer: H. Peter Anvin <hpa at zytor.com> CommitDate: Thu, 24 May 2012 16:43:49 -0700 [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 at zytor.com> --- 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 c344339..ab2b2d4 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); }