diff options
Diffstat (limited to 'sys/ia64')
-rw-r--r-- | sys/ia64/include/_types.h | 11 | ||||
-rw-r--r-- | sys/ia64/include/cpufunc.h | 10 | ||||
-rw-r--r-- | sys/ia64/include/critical.h | 6 | ||||
-rw-r--r-- | sys/ia64/include/endian.h | 6 | ||||
-rw-r--r-- | sys/ia64/include/in_cksum.h | 2 | ||||
-rw-r--r-- | sys/ia64/include/limits.h | 4 | ||||
-rw-r--r-- | sys/ia64/include/stdarg.h | 2 |
7 files changed, 26 insertions, 15 deletions
diff --git a/sys/ia64/include/_types.h b/sys/ia64/include/_types.h index 5809f63..8fc1be2 100644 --- a/sys/ia64/include/_types.h +++ b/sys/ia64/include/_types.h @@ -39,6 +39,10 @@ #ifndef _MACHINE__TYPES_H_ #define _MACHINE__TYPES_H_ +#ifndef _SYS_CDEFS_H_ +#error this file needs sys/cdefs.h as a prerequisite +#endif + /* * Basic types upon which most other types are built. */ @@ -97,9 +101,10 @@ typedef __uint64_t __vm_size_t; /* * Unusual type definitions. */ -#ifdef __GNUC__ +#ifdef __GNUCLIKE_BUILTIN_VARARGS typedef __builtin_va_list __va_list; /* internally known to gcc */ -#if !defined(__GNUC_VA_LIST) && !defined(__NO_GNUC_VA_LIST) +#if defined(__GNUC_VA_LIST_COMPATIBILITY) && !defined(__GNUC_VA_LIST) \ + && !defined(__NO_GNUC_VA_LIST) #define __GNUC_VA_LIST typedef __va_list __gnuc_va_list; /* compat. with GNU headers */ #endif @@ -109,6 +114,6 @@ typedef char * __va_list; /* non-functional */ #else #error Must add va_list support for this non-GCC compiler. #endif /* lint */ -#endif /* __GNUC__ */ +#endif /* __GNUCLIKE_BUILTIN_VARARGS */ #endif /* !_MACHINE__TYPES_H_ */ diff --git a/sys/ia64/include/cpufunc.h b/sys/ia64/include/cpufunc.h index 29563fe..27d66ef 100644 --- a/sys/ia64/include/cpufunc.h +++ b/sys/ia64/include/cpufunc.h @@ -35,11 +35,15 @@ #include <machine/ia64_cpu.h> #include <machine/vmparam.h> +#ifndef _SYS_CDEFS_H_ +#error this file needs sys/cdefs.h as a prerequisite +#endif + struct thread; #define IA64_FIXED_BREAK 0x84B5D -#ifdef __GNUC__ +#ifdef __GNUCLIKE_ASM static __inline void breakpoint(void) @@ -50,8 +54,6 @@ breakpoint(void) #define HAVE_INLINE_FFS #define ffs(x) __builtin_ffs(x) -#endif - extern uint64_t ia64_port_base; #define __MEMIO_ADDR(x) (__volatile void*)(IA64_PHYS_TO_RR6(x)) #define __PIO_ADDR(x) (__volatile void*)(ia64_port_base | \ @@ -208,6 +210,8 @@ intr_restore(register_t ie) enable_intr(); } +#endif /* __GNUCLIKE_ASM */ + #endif /* _KERNEL */ #endif /* !_MACHINE_CPUFUNC_H_ */ diff --git a/sys/ia64/include/critical.h b/sys/ia64/include/critical.h index 08c7d61..26f2edd 100644 --- a/sys/ia64/include/critical.h +++ b/sys/ia64/include/critical.h @@ -46,7 +46,7 @@ __BEGIN_DECLS */ void cpu_critical_fork_exit(void); -#ifdef __GNUC__ +#ifdef __CC_SUPPORTS___INLINE /* * cpu_critical_enter: @@ -76,12 +76,12 @@ cpu_critical_exit(struct thread *td) } -#else /* !__GNUC__ */ +#else /* !__CC_SUPPORTS___INLINE */ void cpu_critical_enter(struct thread *td) void cpu_critical_exit(struct thread *td) -#endif /* __GNUC__ */ +#endif /* __CC_SUPPORTS___INLINE */ __END_DECLS diff --git a/sys/ia64/include/endian.h b/sys/ia64/include/endian.h index 2293dde..5b3d978 100644 --- a/sys/ia64/include/endian.h +++ b/sys/ia64/include/endian.h @@ -64,7 +64,7 @@ #define BYTE_ORDER _BYTE_ORDER #endif -#ifdef __GNUC__ +#if defined(__CC_SUPPORTS___INLINE) && defined(__GNUCLIKE_ASM) static __inline __uint64_t __bswap64(__uint64_t _x) @@ -95,7 +95,7 @@ __bswap16(__uint16_t _x) #define __ntohl(x) __bswap32(x) #define __ntohs(x) __bswap16(x) -#else /* !__GNUC__ */ +#else /* !(__CC_SUPPORTS___INLINE && __GNUCLIKE_ASM) */ /* * No optimizations are available for this compiler. Fall back to @@ -104,6 +104,6 @@ __bswap16(__uint16_t _x) */ #define _BYTEORDER_FUNC_DEFINED -#endif /* __GNUC__ */ +#endif /* __CC_SUPPORTS___INLINE && __GNUCLIKE_ASM */ #endif /* !_MACHINE_ENDIAN_H_ */ diff --git a/sys/ia64/include/in_cksum.h b/sys/ia64/include/in_cksum.h index a899ef0..0992006 100644 --- a/sys/ia64/include/in_cksum.h +++ b/sys/ia64/include/in_cksum.h @@ -45,7 +45,7 @@ * in the normal case (where there are no options and the header length is * therefore always exactly five 32-bit words. */ -#ifdef __GNUC__ +#ifdef __CC_SUPPORTS___INLINE static __inline void in_cksum_update(struct ip *ip) diff --git a/sys/ia64/include/limits.h b/sys/ia64/include/limits.h index c26df92..62772bc 100644 --- a/sys/ia64/include/limits.h +++ b/sys/ia64/include/limits.h @@ -35,7 +35,9 @@ #ifndef _MACHINE_LIMITS_H_ #define _MACHINE_LIMITS_H_ -#if __GNUC__ +#include <sys/cdefs.h> + +#ifdef __CC_SUPPORTS_WARNING #warning "machine/limits.h is deprecated. Include sys/limits.h instead." #endif diff --git a/sys/ia64/include/stdarg.h b/sys/ia64/include/stdarg.h index 51dde80..9ab18b8 100644 --- a/sys/ia64/include/stdarg.h +++ b/sys/ia64/include/stdarg.h @@ -46,7 +46,7 @@ typedef __va_list va_list; #endif -#if defined(__GNUC__) && (__GNUC__ == 2 && __GNUC_MINOR__ > 95 || __GNUC__ >= 3) +#if defined(__GNUCLIKE_BUILTIN_STDARG) #define va_start(ap, last) \ __builtin_stdarg_start((ap), (last)) |