xref: /titanic_51/usr/src/cmd/ast/libast/sparcv9/FEATURE/common (revision b4dd7d09880f14016feece03929a224eca1cf39a)
1/* : : generated from contrib/ast/src/lib/libast/features/common by iffe version 2012-07-17 : : */
2#ifndef _AST_COMMON_H
3#define _AST_COMMON_H	1
4#define _sys_types	1	/* #include <sys/types.h> ok */
5#define _hdr_pthread	1	/* #include <pthread.h> ok */
6#define _hdr_stdarg	1	/* #include <stdarg.h> ok */
7#define _hdr_stddef	1	/* #include <stddef.h> ok */
8#define _hdr_stdint	1	/* #include <stdint.h> ok */
9#define _hdr_inttypes	1	/* #include <inttypes.h> ok */
10#define _hdr_unistd	1	/* #include <unistd.h> ok */
11#define _hdr_time	1	/* #include <time.h> ok */
12#define _sys_time	1	/* #include <sys/time.h> ok */
13#define _sys_times	1	/* #include <sys/times.h> ok */
14#define _hdr_stdlib	1	/* #include <stdlib.h> ok */
15#define _typ_long_double	1	/* long double is a type */
16#define _typ_size_t	1	/* size_t is a type */
17#define _typ_ssize_t	1	/* ssize_t is a type */
18#define _hdr_stdio	1	/* #include <stdio.h> ok */
19#define _typ___va_list	1	/* __va_list is a type */
20#define _sys_stat	1	/* #include <sys/stat.h> ok */
21#define _sys_socket	1	/* #include <sys/socket.h> ok */
22#define _std_proto	1	/* standard C prototypes ok */
23#define _ptr_void	1	/* standard C void* ok */
24/* disable non-standard linux/gnu inlines */
25#ifdef __GNUC__
26#	undef	__OPTIMIZE_SIZE__
27#	define	__OPTIMIZE_SIZE__	1
28#endif
29
30/* __STD_C indicates that the language is ANSI-C or C++ */
31#if !defined(__STD_C) && __STDC__
32#	define	__STD_C		1
33#endif
34#if !defined(__STD_C) && (__cplusplus || c_plusplus)
35#	define __STD_C		1
36#endif
37#if !defined(__STD_C) && _std_proto
38#	define __STD_C		1
39#endif
40#if !defined(__STD_C)
41#	define __STD_C		0
42#endif
43
44/* extern symbols must be protected against C++ name mangling */
45#ifndef _BEGIN_EXTERNS_
46#	if __cplusplus || c_plusplus
47#		define _BEGIN_EXTERNS_	extern "C" {
48#		define _END_EXTERNS_	}
49#	else
50#		define _BEGIN_EXTERNS_
51#		define _END_EXTERNS_
52#	endif
53#endif
54
55/* _ARG_ simplifies function prototyping among flavors of C */
56#ifndef _ARG_
57#	if __STD_C
58#		define _ARG_(x)	x
59#	else
60#		define _ARG_(x)	()
61#	endif
62#endif
63
64/* _NIL_ simplifies defining nil pointers to a given type */
65#ifndef _NIL_
66#	define _NIL_(x)	((x)0)
67#endif
68
69/* __INLINE__, if defined, is the inline keyword */
70#if !defined(__INLINE__) && defined(__cplusplus)
71#	define __INLINE__	inline
72#endif
73#if !defined(__INLINE__) && defined(_WIN32) && !defined(__GNUC__)
74#	define __INLINE__	__inline
75#endif
76
77/* Void_t is defined so that Void_t* can address any type */
78#ifndef Void_t
79#	if __STD_C
80#		define Void_t		void
81#	else
82#		define Void_t		char
83#	endif
84#endif
85
86/* windows variants and veneers */
87#if !defined(_WINIX) && (_UWIN || __CYGWIN__ || __EMX__)
88#	define _WINIX		1
89#endif
90
91/* dynamic linked library external scope handling */
92#ifdef __DYNAMIC__
93#	undef	__DYNAMIC__
94#	ifndef _DLL
95#		define _DLL		1
96#	endif
97#endif
98#if _dll_import
99#	if _BLD_STATIC && !_BLD_DLL
100#		undef	_DLL
101#	else
102#		if !_UWIN && !defined(_DLL)
103#			define _DLL		1
104#		endif
105#	endif
106#	if !defined(__EXPORT__) && _BLD_DLL
107#		define __EXPORT__	__declspec(dllexport)
108#	endif
109#	if !defined(__IMPORT__) && ( _BLD_DLL || defined(_DLL) )
110#		define __IMPORT__	__declspec(dllimport)
111#	endif
112#	if _BLD_DLL && _UWIN
113#	define __DYNAMIC__(v)		(_ast_getdll()->_ast_ ## v)
114#	endif
115#endif
116#if !defined(_astimport)
117#	if defined(__IMPORT__) && defined(_DLL)
118#		define _astimport	__IMPORT__
119#	else
120#		define _astimport	extern
121#	endif
122#endif
123#if _dll_import && ( !_BLD_DLL || _WINIX && !_UWIN )
124#	ifdef __STDC__
125#	define __EXTERN__(T,obj)	extern T obj; T* _imp__ ## obj = &obj
126#	define __DEFINE__(T,obj,val)	T obj = val; T* _imp__ ## obj = &obj
127#	else
128#	define __EXTERN__(T,obj)	extern T obj; T* _imp__/**/obj = &obj
129#	define __DEFINE__(T,obj,val)	T obj = val; T* _imp__/**/obj = &obj
130#	endif
131#else
132#	define __EXTERN__(T,obj)	extern T obj
133#	define __DEFINE__(T,obj,val)	T obj = val
134#endif
135
136#define _ast_LL	1	/* LL numeric suffix supported */
137#define _ast_int1_t		char
138#define _ast_int2_t		short
139#define _ast_int4_t		int
140#define _ast_int8_t		long
141#define _ast_intmax_t		_ast_int8_t
142#define _ast_intmax_long		1
143#define _ast_intswap		0
144
145#define _ast_sizeof_short	2	/* sizeof(short) */
146#define _ast_sizeof_int		4	/* sizeof(int) */
147#define _ast_sizeof_long	8	/* sizeof(long) */
148#define _ast_sizeof_size_t	8	/* sizeof(size_t) */
149#define _ast_sizeof_pointer	8	/* sizeof(pointer) */
150#define _ast_sizeof_float	4	/* sizeof(float) */
151#define _ast_sizeof_double	8	/* sizeof(double) */
152#define _ast_sizeof_long_double	16	/* sizeof(long_double) */
153
154#define _ast_flt4_t		float
155#define _ast_flt8_t		double
156#define _ast_flt16_t		long double
157#define _ast_fltmax_t		_ast_flt16_t
158#define _typ_int8_t	1	/* int8_t is a type */
159#define _typ_uint8_t	1	/* uint8_t is a type */
160#define _typ_int16_t	1	/* int16_t is a type */
161#define _typ_uint16_t	1	/* uint16_t is a type */
162#define _typ_int32_t	1	/* int32_t is a type */
163#define _typ_uint32_t	1	/* uint32_t is a type */
164#define _typ_int64_t	1	/* int64_t is a type */
165#define _typ_uint64_t	1	/* uint64_t is a type */
166#define _typ_intmax_t	1	/* intmax_t is a type */
167#define _typ_uintmax_t	1	/* uintmax_t is a type */
168#define _typ_uintptr_t	1	/* uintptr_t is a type */
169
170#ifndef va_listref
171#ifndef	va_start
172#if __STD_C
173#include <stdarg.h>
174#else
175#include <varargs.h>
176#endif
177#endif
178#define va_listref(p) (p)	/* pass va_list to varargs function */
179#define va_listval(p) (p)	/* retrieve va_list from va_arg(ap,va_listarg) */
180#define va_listarg va_list	/* va_arg() va_list type */
181#endif
182#ifndef _AST_STD_H
183#	if __STD_C && _hdr_stddef
184#	include	<stddef.h>
185#	endif
186#	if _sys_types
187#	include	<sys/types.h>
188#	endif
189#	if _hdr_stdint
190#	include	<stdint.h>
191#	else
192#		if _hdr_inttypes
193#		include	<inttypes.h>
194#		endif
195#	endif
196#endif
197#if !_typ_size_t
198#	define _typ_size_t	1
199	typedef int size_t;
200#endif
201#if !_typ_ssize_t
202#	define _typ_ssize_t	1
203	typedef int ssize_t;
204#endif
205#ifndef _AST_STD_H
206#	define _def_map_ast	1
207#	if !_def_map_ast
208#		include <ast_map.h>
209#	endif
210#endif
211
212#endif
213