#ifndef GCC_4_FI_H
#define GCC_4_FI_H

#define __FD_ISSET(fd, fdsp) ((fd)!=0)

bool __sync_bool_compare_and_swap(int *, int, int);

typedef void * __builtin_va_list;
#define __builtin_va_start(ap, parmN)	((void)((ap)= &(parmN)))
#define __builtin_va_arg(ap, type)	(*(type*)(ap))
#define __builtin_va_end(ap)		((void)((ap)=0))
#define __builtin_va_copy(d,s)

double __builtin_acos(double);
float __builtin_acosf(float);
double __builtin_acosh(double);
float __builtin_acoshf(float);
double __builtin_acoshl(double);
double __builtin_acosl(double);
double __builtin_asin(double);
float __builtin_asinf(float);
double __builtin_asinh(double);
float __builtin_asinhf(float);
double __builtin_asinhl(double);
double __builtin_asinl(double);
double __builtin_atan(double);
double __builtin_atan2(double,double);
float __builtin_atan2f(float,float);
double __builtin_atan2l(double,double);
float __builtin_atanf(float);
double __builtin_atanh(double);
float __builtin_atanhf(float);
double __builtin_atanhl(double);
double __builtin_atanl(double);
double __builtin_cbrt(double);
float __builtin_cbrtf(float);
double __builtin_cbrtl(double);
double __builtin_ceil(double);
float __builtin_ceilf(float);
double __builtin_ceill(double);
double __builtin_copysign(double,double);
float __builtin_copysignf(float,float);
double __builtin_copysignl(double,double);
double __builtin_cos(double);
float __builtin_cosf(float);
double __builtin_cosh(double);
float __builtin_coshf(float);
long double __builtin_coshl(long double);
double __builtin_cosl(double);
double __builtin_drem(double,double);
float __builtin_dremf(float,float);
double __builtin_dreml(double,double);
double __builtin_erf(double);
double __builtin_erfc(double);
float __builtin_erfcf(float);
double __builtin_erfcl(double);
float __builtin_erff(float);
double __builtin_erfl(double);
void __builtin__exit(int);
void __builtin__Exit(int);
double __builtin_exp(double);
double __builtin_exp10(double);
float __builtin_exp10f(float);
double __builtin_exp10l(double);
double __builtin_exp2(double);
float __builtin_exp2f(float);
double __builtin_exp2l(double);
float __builtin_expf(float);
double __builtin_expl(double);
double __builtin_expm1(double);
float __builtin_expm1f(float);
double __builtin_expm1l(double);
double __builtin_fabs(double);
float __builtin_fabsf(float);
long double __builtin_fabsl(long double);
double __builtin_fdim(double,double);
float __builtin_fdimf(float,float);
double __builtin_fdiml(double,double);
double __builtin_floor(double);
float __builtin_floorf(float);
double __builtin_floorl(double);
double __builtin_fma(double,double,double);
float __builtin_fmaf(float,float,float);
double __builtin_fmal(double,double,double);
double __builtin_fmax(double,double);
float __builtin_fmaxf(float,float);
double __builtin_fmaxl(double,double);
double __builtin_fmin(double,double);
float __builtin_fminf(float,float);
double __builtin_fminl(double,double);
double __builtin_fmod(double,double);
float __builtin_fmodf(float,float);
double __builtin_fmodl(double,double);
double __builtin_frexp(double,int*);
float __builtin_frexpf(float,int*);
double __builtin_frexpl(double,int*);
double __builtin_gamma(double);
float __builtin_gammaf(float);
double __builtin_gammal(double);
double __builtin_huge_val();
float __builtin_huge_valf();
long double __builtin_huge_vall();
double __builtin_hypot(double,double);
float __builtin_hypotf(float,float);
double __builtin_hypotl(double,double);
int __builtin_ilogb(double);
int __builtin_ilogbf(float);
int __builtin_ilogbl(double);
double __builtin_inf();
float __builtin_inff();
double __builtin_infl();
double __builtin_j0(double);
float __builtin_j0f(float);
double __builtin_j0l(double);
double __builtin_j1(double);
float __builtin_j1f(float);
double __builtin_j1l(double);
double __builtin_jn(int,double);
float __builtin_jnf(int,float);
double __builtin_jnl(int,double);
double __builtin_ldexp(double,int);
float __builtin_ldexpf(float,int);
double __builtin_ldexpl(double,int);
double __builtin_lgamma(double);
float __builtin_lgammaf(float);
double __builtin_lgammal(double);
long __builtin_llrint(double);
long __builtin_llrintf(float);
long __builtin_llrintl(double);
long __builtin_llround(double);
long __builtin_llroundf(float);
long __builtin_llroundl(double);
double __builtin_log(double);
double __builtin_log10(double);
float __builtin_log10f(float);
double __builtin_log10l(double);
double __builtin_log1p(double);
float __builtin_log1pf(float);
double __builtin_log1pl(double);
double __builtin_log2(double);
float __builtin_log2f(float);
double __builtin_log2l(double);
double __builtin_logb(double);
float __builtin_logbf(float);
double __builtin_logbl(double);
float __builtin_logf(float);
double __builtin_logl(double);
double __builtin_clog(double);
float __builtin_clogf(float);
long double __builtin_clogl(long double);
int __builtin_lrint(double);
int __builtin_lrintf(float);
int __builtin_lrintl(double);
int __builtin_lround(double);
int __builtin_lroundf(float);
int __builtin_lroundl(double);
double __builtin_modf(double,double*);
float __builtin_modff(float,float*);
double __builtin_modfl(double,double*);
double __builtin_nan(const char*);
float __builtin_nanf(const char*);
long double __builtin_nanl(const char*);
double __builtin_nans(const char*);
float __builtin_nansf(const char*);
long double __builtin_nansl(const char*);
double __builtin_nearbyint(double);
float __builtin_nearbyintf(float);
double __builtin_nearbyintl(double);
double __builtin_nextafter(double,double);
float __builtin_nextafterf(float,float);
double __builtin_nextafterl(double,double);
double __builtin_nexttoward(double,double);
float __builtin_nexttowardf(float,double);
double __builtin_nexttowardl(double,double);
double __builtin_pow(double,double);
double __builtin_pow10(double);
float __builtin_pow10f(float);
double __builtin_pow10l(double);
float __builtin_powi(double,int);
float __builtin_powf(float,float);
float __builtin_powif(float,int);
double __builtin_powl(double,double);
long double __builtin_powil(long double,int);
double __builtin_remainder(double,double);
float __builtin_remainderf(float,float);
double __builtin_remainderl(double,double);
double __builtin_remquo(double,double,int*);
float __builtin_remquof(float,float,int*);
double __builtin_remquol(double,double,int*);
double __builtin_rint(double);
float __builtin_rintf(float);
double __builtin_rintl(double);
double __builtin_round(double);
float __builtin_roundf(float);
double __builtin_roundl(double);
double __builtin_scalb(double,double);
float __builtin_scalbf(float,float);
double __builtin_scalbl(double,double);
double __builtin_scalbln(double,int);
float __builtin_scalblnf(float,int);
double __builtin_scalblnl(double,int);
double __builtin_scalbn(double,int);
float __builtin_scalbnf(float,int);
double __builtin_scalbnl(double,int);
double __builtin_significand(double);
float __builtin_significandf(float);
double __builtin_significandl(double);
double __builtin_sin(double);
void __builtin_sincos(double,double*,double*);
void __builtin_sincosf(float,float*,float*);
void __builtin_sincosl(double,double*,double*);
float __builtin_sinf(float);
double __builtin_sinh(double);
float __builtin_sinhf(float);
double __builtin_sinhl(double);
long double __builtin_sinl(long double);
double __builtin_sqrt(double);
float __builtin_sqrtf(float);
long double __builtin_sqrtl(long double);
double __builtin_tan(double);
float __builtin_tanf(float);
double __builtin_tanh(double);
float __builtin_tanhf(float);
double __builtin_tanhl(double);
double __builtin_tanl(double);
double __builtin_tgamma(double);
float __builtin_tgammaf(float);
double __builtin_tgammal(double);
double __builtin_trunc(double);
float __builtin_truncf(float);
double __builtin_truncl(double);
double __builtin_y0(double);
float __builtin_y0f(float);
double __builtin_y0l(double);
double __builtin_y1(double);
float __builtin_y1f(float);
double __builtin_y1l(double);
double __builtin_yn(int,double);
float __builtin_ynf(int,float);
double __builtin_ynl(int,double);
double __builtin_cabs(double);
double __builtin_cabs(double,double);
float __builtin_cabsf(float);
float __builtin_cabsf(float,float);
long double __builtin_cabsl(long double);
long double __builtin_cabsl(long double,long double);
void __builtin_cacos(double*,double,double);
void __builtin_cacosf(float*,float,float);
void __builtin_cacosh(double*,double,double);
void __builtin_cacoshf(float*,float,float);
void __builtin_cacoshl(long double*,double,double);
void __builtin_cacosl(long double*,double,double);
double __builtin_carg(double);
float __builtin_cargf(float);
long double __builtin_cargl(long double);
double __builtin_carg(double,double);
float __builtin_cargf(float,float);
double __builtin_cargl(double,double);
void __builtin_casin(double*,double,double);
void __builtin_casinf(float*,float,float);
void __builtin_casinh(double*,double,double);
void __builtin_casinhf(float*,float,float);
void __builtin_casinhl(long double*,double,double);
void __builtin_casinl(long double*,double,double);
void __builtin_catan(double*,double,double);
void __builtin_catanf(float*,float,float);
void __builtin_catanh(double*,double,double);
void __builtin_catanhf(float*,float,float);
void __builtin_catanhl(long double*,double,double);
void __builtin_catanl(long double*,double,double);
void __builtin_ccos(double*,double,double);
void __builtin_ccosf(float*,float,float);
void __builtin_ccosh(double*,double,double);
void __builtin_ccoshf(float*,float,float);
void __builtin_ccoshl(long double*,double,double);
void __builtin_ccosl(long double*,double,double);
void __builtin_cexp(double*,double,double);
void __builtin_cexpf(float*,float,float);
void __builtin_cexpl(long double*,double,double);
double __builtin_cimag(double,double);
float __builtin_cimagf(float,float);
double __builtin_cimagl(double,double);
void __builtin_conj(double*,double,double);
void __builtin_conjf(float*,float,float);
void __builtin_conjl(long double*,double,double);
void __builtin_cpow(double*,double,double,double,double);
void __builtin_cpowf(float*,float,float,float,float);
void __builtin_cpowl(long double*,double,double,double,double);
void __builtin_cproj(double*,double,double);
void __builtin_cprojf(float*,float,float);
void __builtin_cprojl(long double*,double,double);
double __builtin_creal(double,double);
float __builtin_crealf(float,float);
double __builtin_creall(double,double);
void __builtin_csin(double*,double,double);
void __builtin_csinf(float*,float,float);
void __builtin_csinh(double*,double,double);
void __builtin_csinhf(float*,float,float);
void __builtin_csinhl(long double*,double,double);
void __builtin_csinl(long double*,double,double);
void __builtin_csqrt(double*,double,double);
void __builtin_csqrtf(float*,float,float);
void __builtin_csqrtl(long double*,double,double);
void __builtin_ctan(double*,double,double);
void __builtin_ctanf(float*,float,float);
void __builtin_ctanh(double*,double,double);
void __builtin_ctanhf(float*,float,float);
void __builtin_ctanhl(long double*,double,double);
void __builtin_ctanl(long double*,double,double);
int __builtin_bcmp(const char*,const char*,unsigned int);
void __builtin_bcopy(const char*,const char*,unsigned int);
void __builtin_bzero(const char*,unsigned int);
int __builtin_ffs(int);
int __builtin_ffsl(int);
int __builtin_ffsll(long);
const char* __builtin_index(const char*,int);
int __builtin_memcmp(const char*,const char*,unsigned int);
char* __builtin_memcpy(const char*,const char*,unsigned int);
char* __builtin_memmove(const char*,const char*,unsigned int);
char* __builtin_mempcpy(const char*,const char*,unsigned int);
char* __builtin_memset(const char*,int,unsigned int);
char* __builtin_rindex(const char*,int);
char* __builtin_stpcpy(const char*,const char*);
char* __builtin_strcat(const char*,const char*);
char* __builtin_strchr(const char*,int);
int __builtin_strcmp(const char*,const char*);
char* __builtin_strcpy(const char*,const char*);
unsigned int __builtin_strcspn(const char*,const char*);
char* __builtin_strdup(const char*);
unsigned int __builtin_strlen(const char*);
char* __builtin_strncat(const char*,const char*,unsigned int);
int __builtin_strncmp(const char*,const char*,unsigned int);
char* __builtin_strncpy(const char*,const char*,unsigned int);
char* __builtin_strpbrk(const char*,const char*);
char* __builtin_strrchr(const char*,int);
unsigned int __builtin_strspn(const char*,const char*);
char* __builtin_strstr(const char*,const char*);
int __builtin_fprintf(const char*,const char*, ...);
int __builtin_fprintf_unlocked(const char*,const char*, ...);
int __builtin_fputc(int,const char*);
int __builtin_fputc_unlocked(int,const char*);
int __builtin_fputs(const char*,const char*);
int __builtin_fputs_unlocked(const char*,const char*);
int __builtin_fscanf(const char*,const char*, ...);
unsigned int __builtin_fwrite(const char*,unsigned int,unsigned int,const char*);
unsigned int __builtin_fwrite_unlocked(const char*,unsigned int,unsigned int,const char*);
int __builtin_printf(const char*, ...);
int __builtin_printf_unlocked(const char*, ...);
int __builtin_putchar(int);
int __builtin_putchar_unlocked(int);
int __builtin_puts(const char*);
int __builtin_puts_unlocked(const char*);
int __builtin_scanf(const char*, ...);
int __builtin_snprintf(const char*,unsigned int,const char*, ...);
int __builtin_sprintf(const char*,const char*, ...);
int __builtin_sscanf(const char*,const char*, ...);
int __builtin_vfprintf(const char*,const char*,const char*);
int __builtin_vfscanf(const char*,const char*,const char*);
int __builtin_vprintf(const char*,const char*);
int __builtin_vscanf(const char*,const char*);
int __builtin_vsnprintf(const char*,unsigned int,const char*,const char*);
int __builtin_vsprintf(const char*,const char*,const char*);
int __builtin_vsscanf(const char*,const char*,const char*);
void __builtin_abort();
int __builtin_abs(int);
char* __builtin_aggregate_incoming_address(...);
char* __builtin_alloca(unsigned int);
char* __builtin_apply(void*,const char*,unsigned int);
char* __builtin_apply_args(...);
int __builtin_args_info(int);
char* __builtin_calloc(unsigned int,unsigned int);
int __builtin_classify_type(...);
int __builtin_clz(int);
int __builtin_clzl(int);
int __builtin_clzll(long);
int __builtin_constant_p(...);
int __builtin_ctz(int);
int __builtin_ctzl(int);
int __builtin_ctzll(long);
char* __builtin_dcgettext(const char*,const char*,int);
char* __builtin_dgettext(const char*,const char*);
char* __builtin_dwarf_cfa();
unsigned int __builtin_dwarf_sp_column();
void __builtin___builtin_eh_return(int,const char*);
int __builtin_eh_return_data_regno(int);
void __builtin_exit(int);
long __builtin_expect(long,long);
char* __builtin_extract_return_addr(const char*);
char* __builtin_frame_address(unsigned int);
char* __builtin_frob_return_addr(const char*);
char* __builtin_gettext(const char*);
long __builtin_imaxabs(long);
void __builtin_init_dwarf_reg_size_table(const char*);
int __builtin_isgreater(...);
int __builtin_isgreaterequal(...);
int __builtin_isless(...);
int __builtin_islessequal(...);
int __builtin_islessgreater(...);
int __builtin_isunordered(...);
int __builtin_labs(int);
long __builtin_llabs(long);
void __builtin_longjmp(const char*,int);
char* __builtin_malloc(unsigned int);
char* __builtin_next_arg(...);
int __builtin_parity(int);
int __builtin_parityl(int);
int __builtin_parityll(long);
int __builtin_popcount(int);
int __builtin_popcountl(int);
int __builtin_popcountll(long);
void __builtin_prefetch(const char*, ...);
void __builtin_return(const char*);
char* __builtin_return_address(unsigned int);
char* __builtin_saveregs(...);
int __builtin_setjmp(const char*);
int __builtin_strfmon(const char*,unsigned int,const char*, ...);
unsigned int __builtin_strftime(const char*,unsigned int,const char*,const char*);
void __builtin_trap();
void __builtin_unwind_init();

/* MINGW32 fix */
#ifdef __MINGW32__
#define _fileno(__F) ((__F)->_file)
#endif

#endif
