Xv6 with picoc & Linkage editor  v1.0
The project delineate mutual cohesion between c library, linkage editor ( linker), interpreter and operating system by porting the same on xv6 kernel
 All Data Structures
cdefs.h
00001 #ifndef _SYS_CDEFS_H
00002 #define _SYS_CDEFS_H
00003 
00004 #ifndef __cplusplus
00005 #define __THROW
00006 #define __BEGIN_DECLS
00007 #define __END_DECLS
00008 #else
00009 #define __THROW throw ()
00010 #define __BEGIN_DECLS extern "C" {
00011 #define __END_DECLS }
00012 #endif
00013 
00014 #ifndef __GNUC__
00015 #define __attribute__(xyz)
00016 #define __extension__
00017 #endif
00018 
00019 #if (__GNUC__ > 2) || ((__GNUC__ == 2) && (__GNUC_MINOR__ >= 96))
00020 #define __pure __attribute__ ((__pure__))
00021 #else
00022 #define __pure
00023 #endif
00024 
00025 #if (__GNUC__ == 2) && (__GNUC_MINOR__ < 95)
00026 #define __restrict__
00027 #endif
00028 
00029 #ifndef __STRICT_ANSI__
00030 #define restrict __restrict__
00031 #if __GNUC__ < 3
00032 #define __builtin_expect(foo,bar) (foo)
00033 #define __expect(foo,bar) (foo)
00034 #define __malloc__
00035 #else
00036 #define __expect(foo,bar) __builtin_expect((long)(foo),bar)
00037 #define __attribute_malloc__ __attribute__((__malloc__))
00038 #endif
00039 #endif
00040 
00041 /* idea for these macros taken from Linux kernel */
00042 #define __likely(foo) __expect((foo),1)
00043 #define __unlikely(foo) __expect((foo),0)
00044 
00045 #ifndef __attribute_malloc__
00046 #define __attribute_malloc__
00047 #endif
00048 
00049 #define __P(x) x
00050 
00051 #define __ptr_t void*
00052 
00053 #if defined(__STRICT_ANSI__) && __STDC_VERSION__ + 0 < 199900L
00054 #define inline
00055 #endif
00056 
00057 #ifndef __i386__
00058 #define __regparm__(x)
00059 #endif
00060 
00061 #if (__GNUC__ > 3) || ((__GNUC__ == 3) && (__GNUC_MINOR__ >= 2))
00062 #define __attribute_dontuse__ __attribute__((__deprecated__))
00063 #else
00064 #define __attribute_dontuse__
00065 #define __deprecated__
00066 #endif
00067 
00068 #if (__GNUC__ > 3) || ((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3))
00069 # define __nonnull(params) __attribute__ ((__nonnull__ params))
00070 #else
00071 # define __nonnull(params)
00072 #endif
00073 
00074 #if (__GNUC__ > 3) || ((__GNUC__ == 3) && (__GNUC_MINOR__ >= 4))
00075 # define __attribute_used __attribute__ ((__used__))
00076 #else
00077 # define __attribute_used
00078 # define __warn_unused_result__
00079 #endif
00080 
00081 #if (__GNUC__ >= 4)
00082 #define __needsNULL__(x) __sentinel__(x)
00083 #else
00084 #define __needsNULL__(x)
00085 #define __sentinel__
00086 #endif
00087 
00088 #if (__GNUC__ < 4) || ((__GNUC__ == 4) && (__GNUC_MINOR__ < 3))
00089 # define __cold__
00090 # define __hot__
00091 #endif
00092 
00093 #if (__GNUC__ < 4) || ((__GNUC__ == 4) && (__GNUC_MINOR__ < 3))
00094 #define __attribute_alloc__(x)
00095 #define __attribute_alloc2__(x,y)
00096 #else
00097 #define __attribute_alloc__(x) __attribute__((alloc_size(x))
00098 #define __attribute_alloc2__(x,y) __attribute__((alloc_size(x,y))
00099 #endif
00100 
00101 #if (__GNUC__ < 2) || ((__GNUC__ == 2) && (__GNUC_MINOR__ < 5))
00102 #define __attribute_const__
00103 #else
00104 #define __attribute_const__ __attribute__((const))
00105 #endif
00106 
00107 #if (__GNUC__ < 2) || ((__GNUC__ == 2) && (__GNUC_MINOR__ < 8))
00108 #define __attribute_formatarg__(x)
00109 #else
00110 #define __attribute_formatarg__(x) __attribute__((format_arg(x)))
00111 #endif
00112 
00113 #endif
 All Data Structures