--------------------

for mysql.h... -------------------- yes

checked program was:
/* begin */
 1: #include "ruby.h"
 2:  3:  4:  5:  6:  7:  8:  9: 10: 11: 12: 13: 14: 15: 16: 17: 18: 19: 
20: #include <mysql.h>
/* end */

3 -O2 -fPIC -O2 -pipe  conftest.c "
# 1 "conftest.c"
# 1 "/usr/ports/pobj/mysql-2.8.1-rbx/gem-tmp/.gem/rbx/1.8/gems/mysql-2.8.1/ext/mysql_api//"
# 1 "<built-in>"
# 1 "<command-line>"
# 1 "conftest.c"
# 1 "/usr/local/lib/rubinius/include/ruby.h" 1
# 16 "/usr/local/lib/rubinius/include/ruby.h"
# 1 "/usr/include/stddef.h" 1 3 4
# 38 "/usr/include/stddef.h" 3 4
# 1 "/usr/include/sys/cdefs.h" 1 3 4
# 41 "/usr/include/sys/cdefs.h" 3 4
# 1 "/usr/include/machine/cdefs.h" 1 3 4


# 1 "/usr/include/powerpc/cdefs.h" 1 3 4
# 3 "/usr/include/machine/cdefs.h" 2 3 4
# 42 "/usr/include/sys/cdefs.h" 2 3 4
# 39 "/usr/include/stddef.h" 2 3 4
# 1 "/usr/include/sys/_types.h" 1 3 4
# 37 "/usr/include/sys/_types.h" 3 4
# 1 "/usr/include/machine/_types.h" 1 3 4



# 1 "/usr/include/powerpc/_types.h" 1 3 4
# 59 "/usr/include/powerpc/_types.h" 3 4
typedef signed char __int8_t;
typedef unsigned char __uint8_t;
typedef short __int16_t;
typedef unsigned short __uint16_t;
typedef int __int32_t;
typedef unsigned int __uint32_t;

typedef long long __int64_t;

typedef unsigned long long __uint64_t;


typedef __int8_t __int_least8_t;
typedef __uint8_t __uint_least8_t;
typedef __int16_t __int_least16_t;
typedef __uint16_t __uint_least16_t;
typedef __int32_t __int_least32_t;
typedef __uint32_t __uint_least32_t;
typedef __int64_t __int_least64_t;
typedef __uint64_t __uint_least64_t;


typedef __int32_t __int_fast8_t;
typedef __uint32_t __uint_fast8_t;
typedef __int32_t __int_fast16_t;
typedef __uint32_t __uint_fast16_t;
typedef __int32_t __int_fast32_t;
typedef __uint32_t __uint_fast32_t;
typedef __int64_t __int_fast64_t;
typedef __uint64_t __uint_fast64_t;
# 103 "/usr/include/powerpc/_types.h" 3 4
typedef long __intptr_t;
typedef unsigned long __uintptr_t;


typedef __int64_t __intmax_t;
typedef __uint64_t __uintmax_t;


typedef __uint32_t __register_t;


typedef unsigned long __vaddr_t;
typedef unsigned long __paddr_t;
typedef unsigned long __vsize_t;
typedef unsigned long __psize_t;


typedef int __clock_t;
typedef int __clockid_t;
typedef double __double_t;
typedef float __float_t;
typedef long long __off_t;
typedef long __ptrdiff_t;
typedef unsigned long __size_t;
typedef long __ssize_t;
typedef int __time_t;
typedef int __timer_t;

typedef __builtin_va_list __va_list;







typedef int __wchar_t;

typedef int __wint_t;
typedef int __rune_t;
typedef void * __wctrans_t;
typedef void * __wctype_t;
# 4 "/usr/include/machine/_types.h" 2 3 4
# 38 "/usr/include/sys/_types.h" 2 3 4

typedef unsigned long __cpuid_t;
typedef __int32_t __dev_t;
typedef __uint32_t __fixpt_t;
typedef __uint32_t __gid_t;
typedef __uint32_t __id_t;
typedef __uint32_t __in_addr_t;
typedef __uint16_t __in_port_t;
typedef __uint32_t __ino_t;
typedef long __key_t;
typedef __uint32_t __mode_t;
typedef __uint32_t __nlink_t;
typedef __int32_t __pid_t;
typedef __uint64_t __rlim_t;
typedef __uint8_t __sa_family_t;
typedef __int32_t __segsz_t;
typedef __uint32_t __socklen_t;
typedef __int32_t __swblk_t;
typedef __uint32_t __uid_t;
typedef __uint32_t __useconds_t;
typedef __int32_t __suseconds_t;
typedef __uint64_t __fsblkcnt_t;
typedef __uint64_t __fsfilcnt_t;





typedef union {
 char __mbstate8[128];
 __int64_t __mbstateL;
} __mbstate_t;
# 40 "/usr/include/stddef.h" 2 3 4



typedef __ptrdiff_t ptrdiff_t;




typedef __size_t size_t;





typedef __wchar_t wchar_t;




typedef __wint_t wint_t;




typedef __mbstate_t mbstate_t;
# 17 "/usr/local/lib/rubinius/include/ruby.h" 2
# 1 "/usr/include/stdlib.h" 1 3 4
# 39 "/usr/include/stdlib.h" 3 4
# 1 "/usr/include/machine/_types.h" 1 3 4
# 40 "/usr/include/stdlib.h" 2 3 4

# 1 "/usr/include/sys/types.h" 1 3 4
# 45 "/usr/include/sys/types.h" 3 4
# 1 "/usr/include/machine/endian.h" 1 3 4


# 1 "/usr/include/powerpc/endian.h" 1 3 4
# 32 "/usr/include/powerpc/endian.h" 3 4
# 1 "/usr/include/sys/endian.h" 1 3 4
# 161 "/usr/include/sys/endian.h" 3 4

__uint64_t htobe64(__uint64_t);
__uint32_t htobe32(__uint32_t);
__uint16_t htobe16(__uint16_t);
__uint64_t betoh64(__uint64_t);
__uint32_t betoh32(__uint32_t);
__uint16_t betoh16(__uint16_t);

__uint64_t htole64(__uint64_t);
__uint32_t htole32(__uint32_t);
__uint16_t htole16(__uint16_t);
__uint64_t letoh64(__uint64_t);
__uint32_t letoh32(__uint32_t);
__uint16_t letoh16(__uint16_t);

# 33 "/usr/include/powerpc/endian.h" 2 3 4
# 3 "/usr/include/machine/endian.h" 2 3 4
# 46 "/usr/include/sys/types.h" 2 3 4


typedef unsigned char u_char;
typedef unsigned short u_short;
typedef unsigned int u_int;
typedef unsigned long u_long;

typedef unsigned char unchar;
typedef unsigned short ushort;
typedef unsigned int uint;
typedef unsigned long ulong;

typedef __cpuid_t cpuid_t;
typedef __register_t register_t;
# 72 "/usr/include/sys/types.h" 3 4
typedef __int8_t int8_t;




typedef __uint8_t uint8_t;




typedef __int16_t int16_t;




typedef __uint16_t uint16_t;




typedef __int32_t int32_t;




typedef __uint32_t uint32_t;




typedef __int64_t int64_t;




typedef __uint64_t uint64_t;



typedef __uint8_t u_int8_t;
typedef __uint16_t u_int16_t;
typedef __uint32_t u_int32_t;
typedef __uint64_t u_int64_t;


typedef __int64_t quad_t;
typedef __uint64_t u_quad_t;
typedef quad_t * qaddr_t;



typedef __vaddr_t vaddr_t;
typedef __paddr_t paddr_t;
typedef __vsize_t vsize_t;
typedef __psize_t psize_t;



typedef char * caddr_t;
typedef __int32_t daddr32_t;
typedef __int64_t daddr_t;
typedef __int64_t daddr64_t;
typedef __dev_t dev_t;
typedef __fixpt_t fixpt_t;
typedef __gid_t gid_t;
typedef __id_t id_t;
typedef __ino_t ino_t;
typedef __key_t key_t;
typedef __mode_t mode_t;
typedef __nlink_t nlink_t;
typedef __pid_t pid_t;
typedef __rlim_t rlim_t;
typedef __segsz_t segsz_t;
typedef __swblk_t swblk_t;
typedef __uid_t uid_t;
typedef __useconds_t useconds_t;
typedef __suseconds_t suseconds_t;
typedef __fsblkcnt_t fsblkcnt_t;
typedef __fsfilcnt_t fsfilcnt_t;
# 160 "/usr/include/sys/types.h" 3 4
typedef __in_addr_t in_addr_t;
typedef __in_port_t in_port_t;
typedef __sa_family_t sa_family_t;
typedef __socklen_t socklen_t;






typedef __clock_t clock_t;




typedef __clockid_t clockid_t;
# 185 "/usr/include/sys/types.h" 3 4
typedef __ssize_t ssize_t;




typedef __time_t time_t;




typedef __timer_t timer_t;




typedef __off_t off_t;
# 209 "/usr/include/sys/types.h" 3 4

off_t lseek(int, off_t, int);
int ftruncate(int, off_t);
int truncate(const char *, off_t);

# 224 "/usr/include/sys/types.h" 3 4
# 1 "/usr/include/sys/select.h" 1 3 4
# 38 "/usr/include/sys/select.h" 3 4
# 1 "/usr/include/sys/time.h" 1 3 4
# 39 "/usr/include/sys/time.h" 3 4
# 1 "/usr/include/sys/types.h" 1 3 4
# 40 "/usr/include/sys/time.h" 2 3 4
# 49 "/usr/include/sys/time.h" 3 4
struct timeval {
 long tv_sec;
 long tv_usec;
};






struct timespec {
 time_t tv_sec;
 long tv_nsec;
};
# 74 "/usr/include/sys/time.h" 3 4
struct timezone {
 int tz_minuteswest;
 int tz_dsttime;
};
# 139 "/usr/include/sys/time.h" 3 4
struct bintime {
 time_t sec;
 uint64_t frac;
};

static __inline void
bintime_addx(struct bintime *bt, uint64_t x)
{
 uint64_t u;

 u = bt->frac;
 bt->frac += x;
 if (u > bt->frac)
  bt->sec++;
}

static __inline void
bintime_add(struct bintime *bt, struct bintime *bt2)
{
 uint64_t u;

 u = bt->frac;
 bt->frac += bt2->frac;
 if (u > bt->frac)
  bt->sec++;
 bt->sec += bt2->sec;
}

static __inline void
bintime_sub(struct bintime *bt, struct bintime *bt2)
{
 uint64_t u;

 u = bt->frac;
 bt->frac -= bt2->frac;
 if (u < bt->frac)
  bt->sec--;
 bt->sec -= bt2->sec;
}
# 193 "/usr/include/sys/time.h" 3 4
static __inline void
bintime2timespec(struct bintime *bt, struct timespec *ts)
{

 ts->tv_sec = bt->sec;
 ts->tv_nsec = (long)(((uint64_t)1000000000 * (uint32_t)(bt->frac >> 32)) >> 32);
}

static __inline void
timespec2bintime(struct timespec *ts, struct bintime *bt)
{

 bt->sec = ts->tv_sec;

 bt->frac = (uint64_t)ts->tv_nsec * (uint64_t)18446744073ULL;
}

static __inline void
bintime2timeval(struct bintime *bt, struct timeval *tv)
{

 tv->tv_sec = bt->sec;
 tv->tv_usec = (long)(((uint64_t)1000000 * (uint32_t)(bt->frac >> 32)) >> 32);
}

static __inline void
timeval2bintime(struct timeval *tv, struct bintime *bt)
{

 bt->sec = (time_t)tv->tv_sec;

 bt->frac = (uint64_t)tv->tv_usec * (uint64_t)18446744073709ULL;
}
# 235 "/usr/include/sys/time.h" 3 4
struct itimerval {
 struct timeval it_interval;
 struct timeval it_value;
};





struct itimerspec {
 struct timespec it_interval;
 struct timespec it_value;
};




struct clockinfo {
 int hz;
 int tick;
 int tickadj;
 int stathz;
 int profhz;
};
# 346 "/usr/include/sys/time.h" 3 4
# 1 "/usr/include/time.h" 1 3 4
# 45 "/usr/include/time.h" 3 4
# 1 "/usr/include/machine/_types.h" 1 3 4
# 46 "/usr/include/time.h" 2 3 4
# 90 "/usr/include/time.h" 3 4
struct tm {
 int tm_sec;
 int tm_min;
 int tm_hour;
 int tm_mday;
 int tm_mon;
 int tm_year;
 int tm_wday;
 int tm_yday;
 int tm_isdst;
 long tm_gmtoff;
 char *tm_zone;
};


struct timespec;
char *asctime(const struct tm *);
clock_t clock(void);
char *ctime(const time_t *);
double difftime(time_t, time_t);
struct tm *gmtime(const time_t *);
struct tm *localtime(const time_t *);
time_t mktime(struct tm *);
size_t strftime(char *, size_t, const char *, const struct tm *)
  __attribute__ ((__bounded__(__string__,1,2)));
char *strptime(const char *, const char *, struct tm *);
time_t time(time_t *);
char *asctime_r(const struct tm *, char *)
  __attribute__ ((__bounded__(__minbytes__,2,26)));
char *ctime_r(const time_t *, char *)
  __attribute__ ((__bounded__(__minbytes__,2,26)));
struct tm *gmtime_r(const time_t *, struct tm *);
struct tm *localtime_r(const time_t *, struct tm *);
int nanosleep(const struct timespec *, struct timespec *);


extern char *tzname[2];
void tzset(void);



char *timezone(int, int);
void tzsetwall(void);
time_t timelocal(struct tm *);
time_t timegm(struct tm *);
time_t timeoff(struct tm *, const long);


# 347 "/usr/include/sys/time.h" 2 3 4




int adjtime(const struct timeval *, struct timeval *);
int adjfreq(const int64_t *, int64_t *);


int clock_getres(clockid_t, struct timespec *);
int clock_gettime(clockid_t, struct timespec *);
int clock_settime(clockid_t, const struct timespec *);
int futimes(int, const struct timeval *);
int getitimer(int, struct itimerval *);
int gettimeofday(struct timeval *, struct timezone *);
int setitimer(int, const struct itimerval *, struct itimerval *);
int settimeofday(const struct timeval *, const struct timezone *);
int utimes(const char *, const struct timeval *);


# 39 "/usr/include/sys/select.h" 2 3 4
# 55 "/usr/include/sys/select.h" 3 4
typedef int32_t __fd_mask;



typedef struct fd_set {
 __fd_mask fds_bits[(((1024) + ((((unsigned)(sizeof(__fd_mask) * 8))) - 1)) / (((unsigned)(sizeof(__fd_mask) * 8))))];
} fd_set;
# 89 "/usr/include/sys/select.h" 3 4

struct timeval;
int select(int, fd_set *, fd_set *, fd_set *, struct timeval *);

# 225 "/usr/include/sys/types.h" 2 3 4
# 42 "/usr/include/stdlib.h" 2 3 4
# 55 "/usr/include/stdlib.h" 3 4
typedef struct {
 int quot;
 int rem;
} div_t;

typedef struct {
 long quot;
 long rem;
} ldiv_t;


typedef struct {
 long long quot;
 long long rem;
} lldiv_t;



typedef struct {
 quad_t quot;
 quad_t rem;
} qdiv_t;
# 95 "/usr/include/stdlib.h" 3 4
extern size_t __mb_cur_max;
# 109 "/usr/include/stdlib.h" 3 4

__attribute__((__noreturn__)) void abort(void);
int abs(int);
int atexit(void (*)(void));
double atof(const char *);
int atoi(const char *);
long atol(const char *);
void *bsearch(const void *, const void *, size_t, size_t,
     int (*)(const void *, const void *));
void *calloc(size_t, size_t);
div_t div(int, int);
char *ecvt(double, int, int *, int *);
__attribute__((__noreturn__)) void exit(int);
__attribute__((__noreturn__)) void _Exit(int);
char *fcvt(double, int, int *, int *);
void free(void *);
char *gcvt(double, int, char *);
char *getenv(const char *);
long labs(long);
ldiv_t ldiv(long, long);
void *malloc(size_t);
int posix_memalign(void **, size_t, size_t);
void qsort(void *, size_t, size_t, int (*)(const void *, const void *));
int rand(void);
void *realloc(void *, size_t);
void srand(unsigned);
double strtod(const char *, char **);
float strtof(const char *, char **);
long strtol(const char *, char **, int);
long double
  strtold(const char *, char **);
unsigned long
  strtoul(const char *, char **, int);
int system(const char *);


int mblen(const char *, size_t);
size_t mbstowcs(wchar_t *, const char *, size_t);
int wctomb(char *, wchar_t);
int mbtowc(wchar_t *, const char *, size_t);
size_t wcstombs(char *, const wchar_t *, size_t);






int rand_r(unsigned int *);



double drand48(void);
double erand48(unsigned short[3]);
long jrand48(unsigned short[3]);
void lcong48(unsigned short[7]);
long lrand48(void);
long mrand48(void);
long nrand48(unsigned short[3]);
unsigned short *seed48(unsigned short[3]);
void srand48(long);

int putenv(char *);



long a64l(const char *);
char *l64a(long);

char *initstate(unsigned int, char *, size_t)
  __attribute__((__bounded__ (__string__,2,3)));
long random(void);
char *setstate(const char *);
void srandom(unsigned int);

int mkstemp(char *);
char *mktemp(char *);

char *realpath(const char *, char *);

int setkey(const char *);

int ttyslot(void);

void *valloc(size_t);






long long
  atoll(const char *);
long long
  llabs(long long);
lldiv_t
  lldiv(long long, long long);
long long
  strtoll(const char *, char **, int);
unsigned long long
  strtoull(const char *, char **, int);






int setenv(const char *, const char *, int);
int unsetenv(const char *);



void *alloca(size_t);

char *getbsize(int *, long *);
char *cgetcap(char *, const char *, int);
int cgetclose(void);
int cgetent(char **, char **, const char *);
int cgetfirst(char **, char **);
int cgetmatch(char *, const char *);
int cgetnext(char **, char **);
int cgetnum(char *, const char *, long *);
int cgetset(const char *);
int cgetusedb(int);
int cgetstr(char *, const char *, char **);
int cgetustr(char *, const char *, char **);

int daemon(int, int);
char *devname(int, mode_t);
int getloadavg(double [], int);

void cfree(void *);



int getopt(int, char * const *, const char *);
extern char *optarg;
extern int opterr, optind, optopt, optreset;
int getsubopt(char **, char * const *, char **);
extern char *suboptarg;


char *mkdtemp(char *);
int mkstemps(char *, int);

int heapsort(void *, size_t, size_t, int (*)(const void *, const void *));
int mergesort(void *, size_t, size_t, int (*)(const void *, const void *));
int radixsort(const unsigned char **, int, const unsigned char *,
     unsigned);
int sradixsort(const unsigned char **, int, const unsigned char *,
     unsigned);

void srandomdev(void);
long long
  strtonum(const char *, long long, long long, const char **);

void setproctitle(const char *, ...)
 __attribute__((__format__ (__printf__, 1, 2)));

quad_t qabs(quad_t);
qdiv_t qdiv(quad_t, quad_t);
quad_t strtoq(const char *, char **, int);
u_quad_t strtouq(const char *, char **, int);

u_int32_t arc4random(void);
void arc4random_stir(void);
void arc4random_addrandom(unsigned char *, int)
 __attribute__((__bounded__ (__string__,1,2)));
u_int32_t arc4random_uniform(u_int32_t);
void arc4random_buf(void *, size_t)
 __attribute__((__bounded__ (__string__,1,2)));




# 18 "/usr/local/lib/rubinius/include/ruby.h" 2
# 1 "/usr/include/stdint.h" 1 3 4
# 23 "/usr/include/stdint.h" 3 4
# 1 "/usr/include/machine/_types.h" 1 3 4
# 24 "/usr/include/stdint.h" 2 3 4
# 71 "/usr/include/stdint.h" 3 4
typedef __int_least8_t int_least8_t;
typedef __uint_least8_t uint_least8_t;
typedef __int_least16_t int_least16_t;
typedef __uint_least16_t uint_least16_t;
typedef __int_least32_t int_least32_t;
typedef __uint_least32_t uint_least32_t;
typedef __int_least64_t int_least64_t;
typedef __uint_least64_t uint_least64_t;


typedef __int_fast8_t int_fast8_t;
typedef __uint_fast8_t uint_fast8_t;
typedef __int_fast16_t int_fast16_t;
typedef __uint_fast16_t uint_fast16_t;
typedef __int_fast32_t int_fast32_t;
typedef __uint_fast32_t uint_fast32_t;
typedef __int_fast64_t int_fast64_t;
typedef __uint_fast64_t uint_fast64_t;


typedef __intptr_t intptr_t;
typedef __uintptr_t uintptr_t;


typedef __intmax_t intmax_t;
typedef __uintmax_t uintmax_t;
# 19 "/usr/local/lib/rubinius/include/ruby.h" 2




# 1 "/usr/include/stdio.h" 1 3 4
# 70 "/usr/include/stdio.h" 3 4
typedef off_t fpos_t;
# 79 "/usr/include/stdio.h" 3 4
struct __sbuf {
 unsigned char *_base;
 int _size;
};
# 108 "/usr/include/stdio.h" 3 4
typedef struct __sFILE {
 unsigned char *_p;
 int _r;
 int _w;
 short _flags;
 short _file;
 struct __sbuf _bf;
 int _lbfsize;


 void *_cookie;
 int (*_close)(void *);
 int (*_read)(void *, char *, int);
 fpos_t (*_seek)(void *, fpos_t, int);
 int (*_write)(void *, const char *, int);


 struct __sbuf _ext;

 unsigned char *_up;
 int _ur;


 unsigned char _ubuf[3];
 unsigned char _nbuf[1];


 struct __sbuf _lb;


 int _blksize;
 fpos_t _offset;
} FILE;


extern FILE __sF[];

# 213 "/usr/include/stdio.h" 3 4

void clearerr(FILE *);
int fclose(FILE *);
int feof(FILE *);
int ferror(FILE *);
int fflush(FILE *);
int fgetc(FILE *);
int fgetpos(FILE *, fpos_t *);
char *fgets(char *, int, FILE *)
  __attribute__((__bounded__ (__string__,1,2)));
FILE *fopen(const char *, const char *);
int fprintf(FILE *, const char *, ...);
int fputc(int, FILE *);
int fputs(const char *, FILE *);
size_t fread(void *, size_t, size_t, FILE *)
  __attribute__((__bounded__ (__size__,1,3,2)));
FILE *freopen(const char *, const char *, FILE *);
int fscanf(FILE *, const char *, ...);
int fseek(FILE *, long, int);
int fseeko(FILE *, off_t, int);
int fsetpos(FILE *, const fpos_t *);
long ftell(FILE *);
off_t ftello(FILE *);
size_t fwrite(const void *, size_t, size_t, FILE *)
  __attribute__((__bounded__ (__size__,1,3,2)));
int getc(FILE *);
int getchar(void);
char *gets(char *);



extern int sys_nerr;
extern char *sys_errlist[];

void perror(const char *);
int printf(const char *, ...);
int putc(int, FILE *);
int putchar(int);
int puts(const char *);
int remove(const char *);
int rename(const char *, const char *);

int renameat(int, const char *, int, const char *);

void rewind(FILE *);
int scanf(const char *, ...);
void setbuf(FILE *, char *);
int setvbuf(FILE *, char *, int, size_t);
int sprintf(char *, const char *, ...);
int sscanf(const char *, const char *, ...);
FILE *tmpfile(void);
char *tmpnam(char *);
int ungetc(int, FILE *);
int vfprintf(FILE *, const char *, __va_list);
int vprintf(const char *, __va_list);
int vsprintf(char *, const char *, __va_list);


int snprintf(char *, size_t, const char *, ...)
  __attribute__((__format__ (printf, 3, 4)))
  __attribute__((__nonnull__ (3)))
  __attribute__((__bounded__ (__string__,1,2)));
int vfscanf(FILE *, const char *, __va_list)
  __attribute__((__format__ (scanf, 2, 0)))
  __attribute__((__nonnull__ (2)));
int vscanf(const char *, __va_list)
  __attribute__((__format__ (scanf, 1, 0)))
  __attribute__((__nonnull__ (1)));
int vsnprintf(char *, size_t, const char *, __va_list)
  __attribute__((__format__ (printf, 3, 0)))
  __attribute__((__nonnull__ (3)))
  __attribute__((__bounded__(__string__,1,2)));
int vsscanf(const char *, const char *, __va_list)
  __attribute__((__format__ (scanf, 2, 0)))
  __attribute__((__nonnull__ (2)));



# 300 "/usr/include/stdio.h" 3 4

char *ctermid(char *);
char *cuserid(char *);
FILE *fdopen(int, const char *);
int fileno(FILE *);


int pclose(FILE *);
FILE *popen(const char *, const char *);



void flockfile(FILE *);
int ftrylockfile(FILE *);
void funlockfile(FILE *);





int getc_unlocked(FILE *);
int getchar_unlocked(void);
int putc_unlocked(int, FILE *);
int putchar_unlocked(int);



char *tempnam(const char *, const char *);










int asprintf(char **, const char *, ...)
  __attribute__((__format__ (printf, 2, 3)))
  __attribute__((__nonnull__ (2)));
char *fgetln(FILE *, size_t *);
int fpurge(FILE *);
int getw(FILE *);
int putw(int, FILE *);
void setbuffer(FILE *, char *, int);
int setlinebuf(FILE *);
int vasprintf(char **, const char *, __va_list)
  __attribute__((__format__ (printf, 2, 0)))
  __attribute__((__nonnull__ (2)));






FILE *funopen(const void *,
  int (*)(void *, char *, int),
  int (*)(void *, const char *, int),
  fpos_t (*)(void *, fpos_t, int),
  int (*)(void *));









int __srget(FILE *);
int __swbuf(int, FILE *);








static __inline int __sputc(int _c, FILE *_p) {
 if (--_p->_w >= 0 || (_p->_w >= _p->_lbfsize && (char)_c != '\n'))
  return (*_p->_p++ = _c);
 else
  return (__swbuf(_c, _p));
}
# 405 "/usr/include/stdio.h" 3 4
extern int __isthreaded;
# 24 "/usr/local/lib/rubinius/include/ruby.h" 2
# 1 "/usr/include/string.h" 1 3 4
# 39 "/usr/include/string.h" 3 4
# 1 "/usr/include/machine/_types.h" 1 3 4
# 40 "/usr/include/string.h" 2 3 4
# 56 "/usr/include/string.h" 3 4

void *memchr(const void *, int, size_t);
void *memrchr(const void *, int, size_t);
int memcmp(const void *, const void *, size_t);
void *memcpy(void *, const void *, size_t)
  __attribute__ ((__bounded__(__buffer__,1,3)))
  __attribute__ ((__bounded__(__buffer__,2,3)));
void *memmove(void *, const void *, size_t)
  __attribute__ ((__bounded__(__buffer__,1,3)))
  __attribute__ ((__bounded__(__buffer__,2,3)));
void *memset(void *, int, size_t)
  __attribute__ ((__bounded__(__buffer__,1,3)));
char *strcat(char *, const char *);
char *strchr(const char *, int);
int strcmp(const char *, const char *);
int strcoll(const char *, const char *);
char *strcpy(char *, const char *);
size_t strcspn(const char *, const char *);
char *strerror(int);
size_t strlen(const char *);
char *strncat(char *, const char *, size_t)
  __attribute__ ((__bounded__(__string__,1,3)));
int strncmp(const char *, const char *, size_t);
char *strncpy(char *, const char *, size_t)
  __attribute__ ((__bounded__(__string__,1,3)));
char *strpbrk(const char *, const char *);
char *strrchr(const char *, int);
size_t strspn(const char *, const char *);
char *strstr(const char *, const char *);
char *strtok(char *, const char *);
char *strtok_r(char *, const char *, char **);
size_t strxfrm(char *, const char *, size_t)
  __attribute__ ((__bounded__(__string__,1,3)));


void *memccpy(void *, const void *, int, size_t)
  __attribute__ ((__bounded__(__buffer__,1,4)));



int bcmp(const void *, const void *, size_t);
void bcopy(const void *, void *, size_t)
  __attribute__ ((__bounded__(__buffer__,1,3)))
  __attribute__ ((__bounded__(__buffer__,2,3)));
void bzero(void *, size_t)
  __attribute__ ((__bounded__(__buffer__,1,2)));
int ffs(int);
char *index(const char *, int);
char *rindex(const char *, int);
int strcasecmp(const char *, const char *);
int strncasecmp(const char *, const char *, size_t);
char *strdup(const char *);



int strerror_r(int, char *, size_t)
     __attribute__ ((__bounded__(__string__,2,3)));



char *stpcpy(char *, const char *);
char *stpncpy(char *, const char *, size_t);
char *strndup(const char *, size_t);
size_t strnlen(const char *, size_t);



char *strcasestr(const char *, const char *);
size_t strlcat(char *, const char *, size_t)
  __attribute__ ((__bounded__(__string__,1,3)));
size_t strlcpy(char *, const char *, size_t)
  __attribute__ ((__bounded__(__string__,1,3)));
void strmode(int, char *);
char *strsep(char **, const char *);
char *strsignal(int);
int timingsafe_bcmp(const void *, const void *, size_t);


# 25 "/usr/local/lib/rubinius/include/ruby.h" 2

# 1 "/usr/include/unistd.h" 1 3 4
# 40 "/usr/include/unistd.h" 3 4
# 1 "/usr/include/sys/unistd.h" 1 3 4
# 77 "/usr/include/sys/unistd.h" 3 4
struct __tfork {
 void *tf_tcb;
 pid_t *tf_tid;
 int tf_flags;
};
# 41 "/usr/include/unistd.h" 2 3 4
# 68 "/usr/include/unistd.h" 3 4

__attribute__((__noreturn__)) void _exit(int);
int access(const char *, int);
unsigned int alarm(unsigned int);
int chdir(const char *);
int chown(const char *, uid_t, gid_t);
int close(int);
int dup(int);
int dup2(int, int);
int execl(const char *, const char *, ...)
     __attribute__((sentinel));
int execle(const char *, const char *, ...);
int execlp(const char *, const char *, ...)
     __attribute__((sentinel));
int execv(const char *, char * const *);
int execve(const char *, char * const *, char * const *);
int execvp(const char *, char * const *);
pid_t fork(void);
long fpathconf(int, int);
char *getcwd(char *, size_t)
  __attribute__((__bounded__(__string__,1,2)));
gid_t getegid(void);
uid_t geteuid(void);
gid_t getgid(void);
int getgroups(int, gid_t *);
char *getlogin(void);
pid_t getpgrp(void);
pid_t getpid(void);
pid_t getppid(void);
uid_t getuid(void);
int isatty(int);
int link(const char *, const char *);
off_t lseek(int, off_t, int);
long pathconf(const char *, int);
int pause(void);
int pipe(int *);
ssize_t read(int, void *, size_t)
  __attribute__((__bounded__(__buffer__,2,3)));
int rmdir(const char *);
int setgid(gid_t);
int setuid(uid_t);
unsigned int sleep(unsigned int);
long sysconf(int);
pid_t tcgetpgrp(int);
int tcsetpgrp(int, pid_t);
char *ttyname(int);
int unlink(const char *);
ssize_t write(int, const void *, size_t)
  __attribute__((__bounded__(__buffer__,2,3)));


pid_t setsid(void);
int setpgid(pid_t, pid_t);



size_t confstr(int, char *, size_t)
  __attribute__((__bounded__(__string__,2,3)));
# 138 "/usr/include/unistd.h" 3 4
int fsync(int);
int ftruncate(int, off_t);
int getlogin_r(char *, size_t)
  __attribute__((__bounded__(__string__,1,2)));



char *crypt(const char *, const char *);
int encrypt(char *, int);
int fchdir(int);
int fchown(int, uid_t, gid_t);
long gethostid(void);
char *getwd(char *)
  __attribute__ ((__bounded__(__minbytes__,1,1024)));
int lchown(const char *, uid_t, gid_t);
int mkstemp(char *);
char *mktemp(char *);
int nice(int);
int readlink(const char *, char *, size_t)
  __attribute__ ((__bounded__(__string__,2,3)));
int setkey(const char *);
int setpgrp(pid_t pid, pid_t pgrp);
int setregid(gid_t, gid_t);
int setreuid(uid_t, uid_t);
void swab(const void *, void *, size_t);
void sync(void);
int truncate(const char *, off_t);
unsigned int ualarm(unsigned int, unsigned int);
int usleep(useconds_t);
pid_t vfork(void);



pid_t getpgid(pid_t);
pid_t getsid(pid_t);



ssize_t pread(int, void *, size_t, off_t);
ssize_t pwrite(int, const void *, size_t, off_t);
int ttyname_r(int, char *, size_t)
     __attribute__((__bounded__(__string__,2,3)));




int brk(void *);
int chroot(const char *);
int getdtablesize(void);
int getpagesize(void);
char *getpass(const char *);
void *sbrk(int);



int lockf(int, int, off_t);



int symlink(const char *, const char *);
int gethostname(char *, size_t)
  __attribute__ ((__bounded__(__string__,1,2)));
int setegid(gid_t);
int seteuid(uid_t);



int faccessat(int, const char *, int, int);
int fchownat(int, const char *, uid_t, gid_t, int);
int linkat(int, const char *, int, const char *, int);
ssize_t readlinkat(int, const char *, char *, size_t);
int symlinkat(const char *, int, const char *);
int unlinkat(int, const char *, int);



int acct(const char *);
int closefrom(int);
int des_cipher(const char *, char *, int32_t, int);
int des_setkey(const char *);
void endusershell(void);
int exect(const char *, char * const *, char * const *);
char *fflagstostr(u_int32_t);
int getdomainname(char *, size_t)
  __attribute__ ((__bounded__(__string__,1,2)));
int getgrouplist(const char *, gid_t, gid_t *, int *);
mode_t getmode(const void *, mode_t);
int getresgid(gid_t *, gid_t *, gid_t *);
int getresuid(uid_t *, uid_t *, uid_t *);
char *getusershell(void);
int initgroups(const char *, gid_t);
int iruserok(u_int32_t, int, const char *, const char *);
int iruserok_sa(const void *, int, int, const char *, const char *);
int issetugid(void);
char *mkdtemp(char *);
int mkstemps(char *, int);
int nfssvc(int, void *);
int profil(char *, size_t, unsigned long, unsigned int)
  __attribute__ ((__bounded__(__string__,1,2)));
int quotactl(const char *, int, int, char *);
int rcmd(char **, int, const char *,
     const char *, const char *, int *);
int rcmd_af(char **, int, const char *,
     const char *, const char *, int *, int);
int rcmdsh(char **, int, const char *,
     const char *, const char *, char *);
char *re_comp(const char *);
int re_exec(const char *);
int reboot(int);
int revoke(const char *);
int rfork(int opts);
int rresvport(int *);
int rresvport_af(int *, int);
int ruserok(const char *, int, const char *, const char *);





int setdomainname(const char *, size_t);
int setgroups(int, const gid_t *);
int sethostid(long);
int sethostname(const char *, size_t);
int setlogin(const char *);
void *setmode(const char *);
int setresgid(gid_t, gid_t, gid_t);
int setresuid(uid_t, uid_t, uid_t);
int setrgid(gid_t);
int setruid(uid_t);
void setusershell(void);
int strtofflags(char **, u_int32_t *, u_int32_t *);
int swapctl(int cmd, const void *arg, int misc);
int syscall(int, ...);


# 27 "/usr/local/lib/rubinius/include/ruby.h" 2
# 1 "/usr/include/fcntl.h" 1 3 4
# 181 "/usr/include/fcntl.h" 3 4
struct flock {
 off_t l_start;
 off_t l_len;
 pid_t l_pid;
 short l_type;
 short l_whence;
};
# 208 "/usr/include/fcntl.h" 3 4

int open(const char *, int, ...);
int creat(const char *, mode_t);
int fcntl(int, int, ...);

int flock(int, int);


int openat(int, const char *, int, ...);


# 28 "/usr/local/lib/rubinius/include/ruby.h" 2
# 1 "/usr/include/errno.h" 1 3 4
# 43 "/usr/include/errno.h" 3 4
# 1 "/usr/include/sys/errno.h" 1 3 4
# 44 "/usr/include/errno.h" 2 3 4


# 55 "/usr/include/errno.h" 3 4
int *__errno(void);
int *___errno(void);



# 29 "/usr/local/lib/rubinius/include/ruby.h" 2

# 1 "/usr/local/lib/rubinius/include/config.h" 1
# 31 "/usr/local/lib/rubinius/include/ruby.h" 2
# 1 "/usr/local/lib/rubinius/include/intern.h" 1
# 32 "/usr/local/lib/rubinius/include/ruby.h" 2
# 1 "/usr/local/lib/rubinius/include/defines.h" 1
# 33 "/usr/local/lib/rubinius/include/ruby.h" 2
# 70 "/usr/local/lib/rubinius/include/ruby.h"
# 1 "/usr/include/limits.h" 1 3 4
# 91 "/usr/include/limits.h" 3 4
# 1 "/usr/include/sys/limits.h" 1 3 4
# 43 "/usr/include/sys/limits.h" 3 4
# 1 "/usr/include/machine/internal_types.h" 1 3 4


# 1 "/usr/include/powerpc/internal_types.h" 1 3 4
# 3 "/usr/include/machine/internal_types.h" 2 3 4
# 44 "/usr/include/sys/limits.h" 2 3 4


# 1 "/usr/include/machine/limits.h" 1 3 4


# 1 "/usr/include/powerpc/limits.h" 1 3 4
# 3 "/usr/include/machine/limits.h" 2 3 4
# 47 "/usr/include/sys/limits.h" 2 3 4
# 92 "/usr/include/limits.h" 2 3 4


# 1 "/usr/include/sys/syslimits.h" 1 3 4
# 95 "/usr/include/limits.h" 2 3 4
# 71 "/usr/local/lib/rubinius/include/ruby.h" 2
# 98 "/usr/local/lib/rubinius/include/ruby.h"
void* XMALLOC(size_t bytes);
void XFREE(void* ptr);
void* XREALLOC(void* ptr, size_t bytes);
void* XCALLOC(size_t items, size_t bytes);
# 149 "/usr/local/lib/rubinius/include/ruby.h"
typedef void (*RUBY_DATA_FUNC)(void*);
# 187 "/usr/local/lib/rubinius/include/ruby.h"
  extern int __X_rubinius_version __attribute__((weak));
  int __X_rubinius_version = 1;
# 198 "/usr/local/lib/rubinius/include/ruby.h"
  typedef enum {
    cCApiArray = 0,
    cCApiBignum,
    cCApiClass,
    cCApiComparable,
    cCApiData,
    cCApiEnumerable,
    cCApiFalse,
    cCApiFile,
    cCApiFixnum,
    cCApiFloat,
    cCApiHash,
    cCApiInteger,
    cCApiIO,
    cCApiKernel,
    cCApiMatch,
    cCApiModule,
    cCApiNil,
    cCApiNumeric,
    cCApiObject,
    cCApiRange,
    cCApiRegexp,
    cCApiRubinius,
    cCApiString,
    cCApiStruct,
    cCApiSymbol,
    cCApiThread,
    cCApiTime,
    cCApiTrue,
    cCApiProc,
    cCApiGC,
    cCApiCAPI,

    cCApiArgumentError,
    cCApiEOFError,
    cCApiErrno,
    cCApiException,
    cCApiFatal,
    cCApiFloatDomainError,
    cCApiIndexError,
    cCApiInterrupt,
    cCApiIOError,
    cCApiLoadError,
    cCApiLocalJumpError,
    cCApiNameError,
    cCApiNoMemoryError,
    cCApiNoMethodError,
    cCApiNotImplementedError,
    cCApiRangeError,
    cCApiRegexpError,
    cCApiRuntimeError,
    cCApiScriptError,
    cCApiSecurityError,
    cCApiSignalException,
    cCApiStandardError,
    cCApiSyntaxError,
    cCApiSystemCallError,
    cCApiSystemExit,
    cCApiSystemStackError,
    cCApiTypeError,
    cCApiThreadError,
    cCApiZeroDivisionError,

    cCApiMethod,


    cCApiMaxConstant
  } CApiConstant;
# 309 "/usr/local/lib/rubinius/include/ruby.h"
  typedef enum {
    cCApiPublicMethod,
    cCApiProtectedMethod,
    cCApiPrivateMethod,
    cCApiSingletonMethod

  } CApiMethodKind;

struct RString {
  ssize_t len;
  char *ptr;
  char *dmwmb;
  struct {
    ssize_t capa;
    intptr_t shared;
  } aux;
};
# 342 "/usr/local/lib/rubinius/include/ruby.h"
struct RArray {
  ssize_t len;
  struct {
    ssize_t capa;
    intptr_t shared;
  } aux;
  intptr_t *ptr;
  intptr_t *dmwmb;
};



struct RData {
  void (*dmark)(void*);
  void (*dfree)(void*);
  void *data;
};



struct RFloat {
  double value;
};







struct RIO {
  intptr_t handle;
  int fd;
  FILE* f;
};



typedef struct RIO rb_io_t;
# 569 "/usr/local/lib/rubinius/include/ruby.h"
char rb_num2chr(intptr_t);


long long rb_num2ll(intptr_t);
unsigned long long rb_num2ull(intptr_t);







double rb_num2dbl(intptr_t);


intptr_t rb_int2big(long number);
intptr_t rb_uint2big(unsigned long number);
# 668 "/usr/local/lib/rubinius/include/ruby.h"
  intptr_t rb_ll2inum(long long val);
  intptr_t rb_ull2inum(unsigned long long val);




  typedef intptr_t (*CApiAllocFunction)(intptr_t);
  typedef intptr_t (*CApiGenericFunction)();
# 685 "/usr/local/lib/rubinius/include/ruby.h"
  void capi_define_method(const char* file,
                                           intptr_t target,
                                           const char* name,
                                           CApiGenericFunction fptr,
                                           int arity,
                                           CApiMethodKind kind);


  intptr_t capi_get_constant(CApiConstant type);


  const char *rb_id2name(intptr_t sym);


  void capi_infect(intptr_t obj1, intptr_t obj2);


  int capi_nil_p(intptr_t expression_result);


  void capi_taint(intptr_t obj);


  int rb_obj_tainted(intptr_t obj);







  intptr_t capi_class_superclass(intptr_t klass);

  struct RArray* capi_rarray_struct(intptr_t array);
  struct RData* capi_rdata_struct(intptr_t data);
  struct RString* capi_rstring_struct(intptr_t string, int cache_level);
  struct RFloat* capi_rfloat_struct(intptr_t data);
  struct RIO* capi_rio_struct(intptr_t handle);




  long rb_num2long(intptr_t obj);


  unsigned long rb_num2ulong(intptr_t obj);


  intptr_t rb_int2inum(long n);

  intptr_t INT2NUM(long n);
  intptr_t LONG2NUM(long n);


  intptr_t rb_uint2inum(unsigned long n);
  intptr_t UINT2NUM(unsigned long n);
  intptr_t ULONG2NUM(unsigned long n);

  int rb_cmpint(intptr_t val, intptr_t a, intptr_t b);
  void rb_cmperr(intptr_t x, intptr_t y);
  intptr_t rb_equal(intptr_t a, intptr_t b);
# 763 "/usr/local/lib/rubinius/include/ruby.h"
  int rb_special_const_p(intptr_t obj);


  int rb_is_const_id(intptr_t sym);


  int rb_is_instance_id(intptr_t sym);


  int rb_is_class_id(intptr_t sym);


  intptr_t rb_Array(intptr_t object);


  intptr_t rb_ary_clear(intptr_t self);


  intptr_t rb_ary_delete(intptr_t self, intptr_t item);


  intptr_t rb_ary_delete_at(intptr_t self, long idx);


  intptr_t rb_ary_dup(intptr_t self);


  intptr_t rb_ary_entry(intptr_t self, int index);


  intptr_t rb_ary_includes(intptr_t self, intptr_t obj);


  intptr_t rb_ary_join(intptr_t self, intptr_t separator);


  intptr_t rb_ary_to_s(intptr_t self);


  intptr_t rb_ary_new();


  intptr_t rb_ary_new2(unsigned long length);


  intptr_t rb_ary_new3(unsigned long length, ...);


  intptr_t rb_ary_new4(unsigned long length, const intptr_t* object);


  intptr_t rb_ary_pop(intptr_t self);


  intptr_t rb_ary_push(intptr_t self, intptr_t object);


  intptr_t rb_ary_reverse(intptr_t self);


  intptr_t rb_ary_shift(intptr_t self);


  size_t rb_ary_size(intptr_t self);


  void rb_ary_store(intptr_t self, long int index, intptr_t object);


  intptr_t rb_ary_unshift(intptr_t self, intptr_t object);


  intptr_t rb_ary_aref(int argc, intptr_t *argv, intptr_t object);

  intptr_t rb_ary_each(intptr_t ary);


  intptr_t rb_ary_freeze(intptr_t ary);


  intptr_t rb_ary_to_ary(intptr_t ary);

  void rb_mem_clear(intptr_t* ary, int len);


  intptr_t rb_assoc_new(intptr_t first, intptr_t second);


  intptr_t rb_attr_get(intptr_t object, intptr_t attr_name);

  void rb_attr(intptr_t klass, intptr_t id, int read, int write, int ex);


  int rb_block_given_p();


  void rb_need_block();


  intptr_t rb_block_proc();

  intptr_t rb_each(intptr_t);

  intptr_t rb_iterate(intptr_t (*ifunc)(intptr_t), intptr_t ary, intptr_t(*cb)(), intptr_t cb_data);

  intptr_t rb_big2str(intptr_t self, int base);

  long rb_big2long(intptr_t obj);

  unsigned long rb_big2ulong(intptr_t obj);

  long long rb_big2ll(intptr_t obj);

  unsigned long long rb_big2ull(intptr_t);

  double rb_big2dbl(intptr_t obj);

  int rb_big_bytes_used(intptr_t obj);


  int rb_big_sign(intptr_t obj);
# 892 "/usr/local/lib/rubinius/include/ruby.h"
  intptr_t rb_call_super(int argc, const intptr_t *argv);


  intptr_t rb_check_array_type(intptr_t object);


  intptr_t rb_check_string_type(intptr_t object);



  intptr_t rb_check_to_integer(intptr_t object, const char* method_name);


  void rb_check_frozen(intptr_t object);


  intptr_t rb_obj_frozen_p(intptr_t obj);



  __attribute__ ((noreturn)) void rb_error_frozen(const char* what);


  void rb_check_type(intptr_t object, int type);
# 927 "/usr/local/lib/rubinius/include/ruby.h"
  intptr_t rb_check_convert_type(intptr_t object, int type,
      const char* type_name, const char* method_name);

  void rb_check_safe_obj(intptr_t obj);

  void rb_check_safe_str(intptr_t obj);

  void rb_secure_update(intptr_t obj);


  intptr_t rb_class_name(intptr_t klass);



  intptr_t rb_class_inherited(intptr_t super, intptr_t klass);



  intptr_t rb_class_new(intptr_t super);


  intptr_t rb_class_new_instance(int arg_count, intptr_t* args, intptr_t klass);


  intptr_t rb_class_of(intptr_t object);



  intptr_t CLASS_OF(intptr_t object);


  const char* rb_class2name(intptr_t klass);


  intptr_t rb_path2class(const char*);


  void rb_p(intptr_t);


  intptr_t rb_f_global_variables();


  intptr_t rb_convert_type(intptr_t object, int type,
      const char* type_name, const char* method_name);


  int rb_const_defined(intptr_t module, intptr_t const_id);



  int rb_const_defined_at(intptr_t module, intptr_t const_id);


  intptr_t rb_const_get(intptr_t module, intptr_t id_name);



  intptr_t rb_const_get_at(intptr_t module, intptr_t id_name);


  intptr_t rb_const_get_from(intptr_t module, intptr_t id_name);


  void rb_const_set(intptr_t module, intptr_t name, intptr_t constant);

  intptr_t rb_mod_remove_const(intptr_t mod, intptr_t name);
  intptr_t rb_mod_ancestors(intptr_t mod);
  intptr_t rb_mod_name(intptr_t mod);
  intptr_t rb_module_new(void);




  double rb_cstr_to_dbl(const char *p, int badcheck);


  intptr_t rb_cstr2inum(const char* string, int base);
  intptr_t rb_cstr_to_inum(const char* str, int base, int badcheck);


  intptr_t rb_cv_get(intptr_t module, const char* name);


  intptr_t rb_cv_set(intptr_t module, const char* name, intptr_t value);


  intptr_t rb_cvar_defined(intptr_t module, intptr_t name);


  intptr_t rb_cvar_get(intptr_t module, intptr_t name);


  intptr_t rb_cvar_set(intptr_t module, intptr_t name, intptr_t value, int unused);


  void rb_define_class_variable(intptr_t klass, const char* name, intptr_t val);

  intptr_t rb_data_object_alloc(intptr_t klass, void* sval,
      RUBY_DATA_FUNC mark, RUBY_DATA_FUNC free);


  void rb_define_alias(intptr_t module, const char *new_name, const char *old_name);
  void rb_alias(intptr_t module, intptr_t id_new, intptr_t id_old);


  void rb_define_alloc_func(intptr_t klass, CApiAllocFunction allocator);


  void rb_undef_alloc_func(intptr_t klass);


  void rb_define_attr(intptr_t module, const char* attr_name,
      int readable, int writable);


  intptr_t rb_define_class(const char* name, intptr_t superclass);


  intptr_t rb_define_class_under(intptr_t parent, const char* name, intptr_t superclass);


  void rb_define_global_const(const char* name, intptr_t obj);


  void rb_define_const(intptr_t module, const char* name, intptr_t object);
# 1061 "/usr/local/lib/rubinius/include/ruby.h"
  void rb_define_global_function(const char* name, CApiGenericFunction func, int argc);


  intptr_t rb_define_module(const char* name);


  void rb_define_module_function(intptr_t module,
      const char* name, CApiGenericFunction func, int args);


  intptr_t rb_define_module_under(intptr_t parent, const char* name);
# 1092 "/usr/local/lib/rubinius/include/ruby.h"
  intptr_t rb_exc_new(intptr_t etype, const char *ptr, long len);


  intptr_t rb_exc_new2(intptr_t etype, const char *s);


  intptr_t rb_exc_new3(intptr_t etype, intptr_t str);


  __attribute__ ((noreturn)) void rb_exc_raise(intptr_t exception);


  intptr_t rb_errinfo();



  void rb_set_errinfo(intptr_t err);


  void rb_free_global(intptr_t global);


  intptr_t rb_obj_freeze(intptr_t obj);



  intptr_t rb_obj_taint(intptr_t obj);


  intptr_t rb_f_sprintf(int argc, const intptr_t* argv);




  intptr_t rb_funcall(intptr_t receiver, intptr_t method_name,
                     int arg_count, ...);



  intptr_t rb_funcall2(intptr_t receiver, intptr_t method_name,
                      int arg_count, const intptr_t* args);



  intptr_t rb_funcall2b(intptr_t receiver, intptr_t method_name, int arg_count,
                       const intptr_t* v_args, intptr_t block);


  intptr_t rb_frame_last_func();

  intptr_t rb_exec_recursive(intptr_t (*func)(intptr_t, intptr_t, int),
                          intptr_t obj, intptr_t arg);







  intptr_t rb_hash(intptr_t self);


  intptr_t rb_hash_new();


  intptr_t rb_hash_aref(intptr_t self, intptr_t key);


  intptr_t rb_hash_lookup(intptr_t self, intptr_t key);


  intptr_t rb_hash_aset(intptr_t self, intptr_t key, intptr_t value);


  intptr_t rb_hash_delete(intptr_t self, intptr_t key);


  intptr_t rb_hash_delete_if(intptr_t self);


  intptr_t rb_hash_size(intptr_t self);






  void rb_hash_foreach(intptr_t self,
                       int (*func)(),
                       intptr_t farg);

  void rb_eof_error();


  intptr_t rb_io_write(intptr_t io, intptr_t str);


  intptr_t rb_io_close(intptr_t io);

  int rb_io_fd(intptr_t io);

  int rb_io_wait_readable(int fd);
  int rb_io_wait_writable(int fd);

  void rb_io_set_nonblock(rb_io_t* io);
  void rb_io_check_closed(rb_io_t* io);
  void rb_io_check_readable(rb_io_t* io);
  void rb_io_check_writable(rb_io_t* io);

  void rb_thread_wait_fd(int fd);
  void rb_thread_fd_writable(int fd);
  void rb_thread_wait_for(struct timeval time);


  void rb_gc_mark(intptr_t ptr);





  void rb_gc_mark_maybe(intptr_t ptr);


  intptr_t rb_gc_start();


  void rb_gc();


  void rb_global_variable(intptr_t* handle_address);
  void rb_gc_register_address(intptr_t* address);


  void rb_gc_unregister_address(intptr_t* address);

  void rb_gc_force_recycle(intptr_t blah);


  void rb_memerror();


  intptr_t rb_gv_get(const char* name);


  intptr_t rb_gv_set(const char* name, intptr_t value);


  void rb_define_readonly_variable(const char* name, intptr_t* addr);


  void rb_include_module(intptr_t includer, intptr_t includee);


  intptr_t rb_intern(const char* string);


  intptr_t rb_num_coerce_bin(intptr_t x, intptr_t y, intptr_t func);


  intptr_t rb_num_coerce_cmp(intptr_t x, intptr_t y, intptr_t func);



  void rb_obj_call_init(intptr_t object, int arg_count, intptr_t* args);





  const char* rb_obj_classname(intptr_t object);


  intptr_t rb_obj_is_instance_of(intptr_t object, intptr_t klass);


  intptr_t rb_obj_is_kind_of(intptr_t object, intptr_t module);


  intptr_t rb_obj_id(intptr_t self);


  intptr_t rb_iv_get(intptr_t self, const char* name);


  intptr_t rb_iv_set(intptr_t self, const char* name, intptr_t value);


  intptr_t rb_ivar_get(intptr_t object, intptr_t ivar_name);


  intptr_t rb_ivar_set(intptr_t object, intptr_t ivar_name, intptr_t value);


  intptr_t rb_ivar_defined(intptr_t object, intptr_t ivar_name);


  intptr_t rb_obj_alloc(intptr_t klass);



  intptr_t rb_obj_dup(intptr_t obj);


  intptr_t rb_obj_as_string(intptr_t object);

  intptr_t rb_obj_instance_eval(int argc, intptr_t* argv, intptr_t self);

  intptr_t rb_any_to_s(intptr_t obj);





  intptr_t rb_obj_clone(intptr_t object);


  void rb_extend_object(intptr_t obj, intptr_t mod);


  intptr_t rb_inspect(intptr_t object);


  intptr_t rb_proc_new(intptr_t (*func)(), intptr_t val);

  intptr_t rb_protect_inspect(intptr_t (*func)(intptr_t a, intptr_t b), intptr_t h_obj, intptr_t h_arg);
  intptr_t rb_inspecting_p(intptr_t obj);





  __attribute__ ((noreturn)) void rb_raise(intptr_t error, const char* format_string, ...);






  __attribute__ ((noreturn)) void rb_throw(const char* symbol, intptr_t result);







  intptr_t rb_rescue(intptr_t (*func)(), intptr_t arg1, intptr_t (*raise_func)(), intptr_t arg2);







  intptr_t rb_rescue2(intptr_t (*func)(), intptr_t arg1, intptr_t (*raise_func)(), intptr_t arg2, ...);






  intptr_t rb_ensure(intptr_t (*func)(), intptr_t arg1, intptr_t (*ensure_func)(), intptr_t arg2);






  intptr_t rb_protect(intptr_t (*func)(intptr_t), intptr_t data, int* status);




  void rb_jump_tag(int status);




  intptr_t rb_reg_source(intptr_t r);




  int rb_reg_options(intptr_t r);




  intptr_t rb_reg_regcomp(intptr_t str);




  intptr_t rb_reg_match(intptr_t re, intptr_t str);




  intptr_t rb_backref_get(void);






  intptr_t rb_require(const char* name);


  int rb_respond_to(intptr_t object, intptr_t method_name);


  int rb_safe_level();


  intptr_t rb_marshal_dump(intptr_t obj, intptr_t io);
# 1440 "/usr/local/lib/rubinius/include/ruby.h"
  int rb_scan_args(int argc, const intptr_t* argv, const char* spec, ...);


  void rb_secure(int level);


  void rb_set_safe_level(int new_level);


  intptr_t rb_singleton_class(intptr_t object);


  intptr_t rb_String(intptr_t object);


  intptr_t rb_struct_define(const char *name, ...);


  intptr_t rb_struct_new(intptr_t klass, ...);


  intptr_t rb_struct_aref(intptr_t s, intptr_t key);
  intptr_t rb_struct_getmember(intptr_t s, intptr_t key);


  intptr_t rb_struct_aset(intptr_t s, intptr_t key, intptr_t value);


  void rb_set_kcode(const char *code);
# 1477 "/usr/local/lib/rubinius/include/ruby.h"
  char *rb_str_ptr(intptr_t self);






  void rb_str_flush(intptr_t self);






  void rb_str_update(intptr_t self);
# 1501 "/usr/local/lib/rubinius/include/ruby.h"
  char* rb_str_ptr_readonly(intptr_t self);


  intptr_t rb_str_append(intptr_t self, intptr_t other);


  intptr_t rb_str_buf_append(intptr_t self, intptr_t other);


  intptr_t rb_str_buf_cat(intptr_t string, const char* other, size_t size);


  intptr_t rb_str_buf_cat2(intptr_t string, const char* other);




  intptr_t rb_str_buf_new(long capacity);


  intptr_t rb_str_buf_new2(const char* string);


  intptr_t rb_str_cat(intptr_t string, const char* other, size_t length);


  intptr_t rb_str_cat2(intptr_t string, const char* other);


  int rb_str_cmp(intptr_t first, intptr_t second);


  intptr_t rb_str_concat(intptr_t self, intptr_t other);


  intptr_t rb_str_dup(intptr_t self);


  intptr_t rb_str_intern(intptr_t self);






  size_t rb_str_len(intptr_t self);

  void rb_str_set_len(intptr_t self, size_t len);




  intptr_t rb_str_new(const char* string, long length);


  intptr_t rb_str_new2(const char* string);


  intptr_t rb_str_new3(intptr_t string);


  intptr_t rb_str_new4(intptr_t string);

  void rb_str_modify(intptr_t str);


  intptr_t rb_str_freeze(intptr_t str);


  intptr_t rb_str_plus(intptr_t self, intptr_t other);


  intptr_t rb_str_resize(intptr_t self, size_t len);


  intptr_t rb_str_split(intptr_t self, const char* separator);
# 1586 "/usr/local/lib/rubinius/include/ruby.h"
  intptr_t rb_str_substr(intptr_t self, size_t starting_index, size_t length);


  intptr_t rb_str_times(intptr_t self, intptr_t times);


  intptr_t rb_str2inum(intptr_t self, int base);


  intptr_t rb_str_to_str(intptr_t object);


  intptr_t rb_string_value(volatile intptr_t* object_variable);

  char* rb_string_value_ptr(volatile intptr_t* object_variable);



  char* rb_string_value_cstr(volatile intptr_t* object_variable);





  char* rb_str2cstr(intptr_t string, long *len);

  long rb_str_hash(intptr_t str);


  __attribute__ ((noreturn)) void rb_sys_fail(const char* mesg);


  intptr_t rb_eval_string(const char* string);


  intptr_t rb_tainted_str_new2(const char* string);


  intptr_t rb_tainted_str_new(const char* string, long size);


  void rb_thread_schedule();


  int rb_thread_alone();


  int rb_thread_select(int max, fd_set* read, fd_set* write, fd_set* except,
                           struct timeval *timeval);


  intptr_t rb_thread_current(void);


  intptr_t rb_thread_local_aref(intptr_t thread, intptr_t id);


  intptr_t rb_thread_local_aset(intptr_t thread, intptr_t id, intptr_t value);

  intptr_t rb_thread_wakeup(intptr_t thread);
# 1656 "/usr/local/lib/rubinius/include/ruby.h"
  typedef intptr_t rb_blocking_function_t(void *);
  typedef void rb_unblock_function_t(void *);
  intptr_t rb_thread_blocking_region(rb_blocking_function_t* func, void* data,
                                  rb_unblock_function_t* ubf, void* ubf_data);


  typedef void* (*rb_thread_call_func)(void*);

  void* rb_thread_call_with_gvl(void* (*func)(void*), void* data);



  extern int rb_thread_critical;



  extern int* mri_global_debug();
  extern int* mri_global_verbose();






  intptr_t rb_time_new(time_t sec, time_t usec);


  int rb_type(intptr_t object);


  intptr_t rb_to_id(intptr_t object);


  intptr_t rb_to_int(intptr_t object);


  void rb_undef_method(intptr_t module, const char* name);
  void rb_undef(intptr_t handle, intptr_t name);


  intptr_t rb_yield(intptr_t argument);
  intptr_t rb_yield_values(int n, ...);
  intptr_t rb_yield_splat(intptr_t array);

  intptr_t rb_apply(intptr_t recv, intptr_t mid, intptr_t args);

  intptr_t rb_marshal_load(intptr_t string);

  intptr_t rb_float_new(double val);

  intptr_t rb_Float(intptr_t object);

  intptr_t rb_Integer(intptr_t object);

  __attribute__ ((noreturn)) void rb_num_zerodiv(void);

  __attribute__ ((noreturn)) void rb_bug(const char *fmt, ...);

  __attribute__ ((noreturn)) void rb_fatal(const char *fmt, ...);

  __attribute__ ((noreturn)) void rb_notimplement();


  __attribute__ ((noreturn)) void rb_invalid_str(const char *str, const char *type);


  void rb_warn(const char *fmt, ...);


  void rb_warning(const char *fmt, ...);


  intptr_t rb_range_new(intptr_t begin, intptr_t end, int exclude_end);

  intptr_t rb_range_beg_len(intptr_t range, long* begp, long* lenp, long len, int err);


  void rb_set_end_proc(void* cb, intptr_t cb_data);






  intptr_t rb_reg_new(const char *source, long len, int options);


  intptr_t rb_reg_nth_match(long nth, intptr_t match_data);
# 2 "conftest.c" 2

# 1 "/usr/local/include/mysql/mysql.h" 1
# 55 "/usr/local/include/mysql/mysql.h"
typedef char my_bool;
# 69 "/usr/local/include/mysql/mysql.h"
typedef int my_socket;




# 1 "/usr/local/include/mysql/mysql_version.h" 1
# 75 "/usr/local/include/mysql/mysql.h" 2
# 1 "/usr/local/include/mysql/mysql_com.h" 1
# 55 "/usr/local/include/mysql/mysql_com.h"
enum enum_server_command
{
  COM_SLEEP, COM_QUIT, COM_INIT_DB, COM_QUERY, COM_FIELD_LIST,
  COM_CREATE_DB, COM_DROP_DB, COM_REFRESH, COM_SHUTDOWN, COM_STATISTICS,
  COM_PROCESS_INFO, COM_CONNECT, COM_PROCESS_KILL, COM_DEBUG, COM_PING,
  COM_TIME, COM_DELAYED_INSERT, COM_CHANGE_USER, COM_BINLOG_DUMP,
  COM_TABLE_DUMP, COM_CONNECT_OUT, COM_REGISTER_SLAVE,
  COM_STMT_PREPARE, COM_STMT_EXECUTE, COM_STMT_SEND_LONG_DATA, COM_STMT_CLOSE,
  COM_STMT_RESET, COM_SET_OPTION, COM_STMT_FETCH, COM_DAEMON,



  COM_END
};
# 228 "/usr/local/include/mysql/mysql_com.h"
struct st_vio;
typedef struct st_vio Vio;
# 239 "/usr/local/include/mysql/mysql_com.h"
typedef struct st_net {

  Vio *vio;
  unsigned char *buff,*buff_end,*write_pos,*read_pos;
  my_socket fd;





  unsigned long remain_in_buf,length, buf_length, where_b;
  unsigned long max_packet,max_packet_size;
  unsigned int pkt_nr,compress_pkt_nr;
  unsigned int write_timeout, read_timeout, retry_count;
  int fcntl;
  unsigned int *return_status;
  unsigned char reading_or_writing;
  char save_char;
  my_bool unused0;
  my_bool unused;
  my_bool compress;
  my_bool unused1;
# 270 "/usr/local/include/mysql/mysql_com.h"
  unsigned char *query_cache_query;
  unsigned int last_errno;
  unsigned char error;
  my_bool unused2;
  my_bool return_errno;

  char last_error[512];

  char sqlstate[5 +1];
  void *extension;
# 290 "/usr/local/include/mysql/mysql_com.h"
} NET;




enum enum_field_types { MYSQL_TYPE_DECIMAL, MYSQL_TYPE_TINY,
   MYSQL_TYPE_SHORT, MYSQL_TYPE_LONG,
   MYSQL_TYPE_FLOAT, MYSQL_TYPE_DOUBLE,
   MYSQL_TYPE_NULL, MYSQL_TYPE_TIMESTAMP,
   MYSQL_TYPE_LONGLONG,MYSQL_TYPE_INT24,
   MYSQL_TYPE_DATE, MYSQL_TYPE_TIME,
   MYSQL_TYPE_DATETIME, MYSQL_TYPE_YEAR,
   MYSQL_TYPE_NEWDATE, MYSQL_TYPE_VARCHAR,
   MYSQL_TYPE_BIT,
                        MYSQL_TYPE_NEWDECIMAL=246,
   MYSQL_TYPE_ENUM=247,
   MYSQL_TYPE_SET=248,
   MYSQL_TYPE_TINY_BLOB=249,
   MYSQL_TYPE_MEDIUM_BLOB=250,
   MYSQL_TYPE_LONG_BLOB=251,
   MYSQL_TYPE_BLOB=252,
   MYSQL_TYPE_VAR_STRING=253,
   MYSQL_TYPE_STRING=254,
   MYSQL_TYPE_GEOMETRY=255

};
# 357 "/usr/local/include/mysql/mysql_com.h"
enum mysql_enum_shutdown_level {





  SHUTDOWN_DEFAULT = 0,

  SHUTDOWN_WAIT_CONNECTIONS= (unsigned char)(1 << 0),

  SHUTDOWN_WAIT_TRANSACTIONS= (unsigned char)(1 << 1),

  SHUTDOWN_WAIT_UPDATES= (unsigned char)(1 << 3),

  SHUTDOWN_WAIT_ALL_BUFFERS= ((unsigned char)(1 << 3) << 1),

  SHUTDOWN_WAIT_CRITICAL_BUFFERS= ((unsigned char)(1 << 3) << 1) + 1,


  KILL_QUERY= 254,

  KILL_CONNECTION= 255
};


enum enum_cursor_type
{
  CURSOR_TYPE_NO_CURSOR= 0,
  CURSOR_TYPE_READ_ONLY= 1,
  CURSOR_TYPE_FOR_UPDATE= 2,
  CURSOR_TYPE_SCROLLABLE= 4
};



enum enum_mysql_set_option
{
  MYSQL_OPTION_MULTI_STATEMENTS_ON,
  MYSQL_OPTION_MULTI_STATEMENTS_OFF
};







my_bool my_net_init(NET *net, Vio* vio);
void my_net_local_init(NET *net);
void net_end(NET *net);
  void net_clear(NET *net, my_bool clear_buffer);
my_bool net_realloc(NET *net, size_t length);
my_bool net_flush(NET *net);
my_bool my_net_write(NET *net,const unsigned char *packet, size_t len);
my_bool net_write_command(NET *net,unsigned char command,
     const unsigned char *header, size_t head_len,
     const unsigned char *packet, size_t len);
int net_real_write(NET *net,const unsigned char *packet, size_t len);
unsigned long my_net_read(NET *net);
# 426 "/usr/local/include/mysql/mysql_com.h"
struct sockaddr;
int my_connect(my_socket s, const struct sockaddr *name, unsigned int namelen,
        unsigned int timeout);

struct rand_struct {
  unsigned long seed1,seed2,max_value;
  double max_value_dbl;
};







enum Item_result {STRING_RESULT=0, REAL_RESULT, INT_RESULT, ROW_RESULT,
                  DECIMAL_RESULT};

typedef struct st_udf_args
{
  unsigned int arg_count;
  enum Item_result *arg_type;
  char **args;
  unsigned long *lengths;
  char *maybe_null;
  char **attributes;
  unsigned long *attribute_lengths;
  void *extension;
} UDF_ARGS;



typedef struct st_udf_init
{
  my_bool maybe_null;
  unsigned int decimals;
  unsigned long max_length;
  char *ptr;
  my_bool const_item;
  void *extension;
} UDF_INIT;
# 487 "/usr/local/include/mysql/mysql_com.h"
void randominit(struct rand_struct *, unsigned long seed1,
                unsigned long seed2);
double my_rnd(struct rand_struct *);
void create_random_string(char *to, unsigned int length, struct rand_struct *rand_st);

void hash_password(unsigned long *to, const char *password, unsigned int password_len);
void make_scrambled_password_323(char *to, const char *password);
void scramble_323(char *to, const char *message, const char *password);
my_bool check_scramble_323(const char *, const char *message,
                           unsigned long *salt);
void get_salt_from_password_323(unsigned long *res, const char *password);
void make_password_from_salt_323(char *to, const unsigned long *salt);

void make_scrambled_password(char *to, const char *password);
void scramble(char *to, const char *message, const char *password);
my_bool check_scramble(const char *reply, const char *message,
                       const unsigned char *hash_stage2);
void get_salt_from_password(unsigned char *res, const char *password);
void make_password_from_salt(char *to, const unsigned char *hash_stage2);
char *octet2hex(char *to, const char *str, unsigned int len);



char *get_tty_password(const char *opt_message);
const char *mysql_errno_to_sqlstate(unsigned int mysql_errno);



my_bool my_thread_init(void);
void my_thread_end(void);
# 76 "/usr/local/include/mysql/mysql.h" 2
# 1 "/usr/local/include/mysql/mysql_time.h" 1
# 28 "/usr/local/include/mysql/mysql_time.h"
enum enum_mysql_timestamp_type
{
  MYSQL_TIMESTAMP_NONE= -2, MYSQL_TIMESTAMP_ERROR= -1,
  MYSQL_TIMESTAMP_DATE= 0, MYSQL_TIMESTAMP_DATETIME= 1, MYSQL_TIMESTAMP_TIME= 2
};
# 47 "/usr/local/include/mysql/mysql_time.h"
typedef struct st_mysql_time
{
  unsigned int year, month, day, hour, minute, second;
  unsigned long second_part;
  my_bool neg;
  enum enum_mysql_timestamp_type time_type;
} MYSQL_TIME;
# 77 "/usr/local/include/mysql/mysql.h" 2

# 1 "/usr/local/include/mysql/my_list.h" 1
# 23 "/usr/local/include/mysql/my_list.h"
typedef struct st_list {
  struct st_list *prev,*next;
  void *data;
} LIST;

typedef int (*list_walk_action)(void *,void *);

extern LIST *list_add(LIST *root,LIST *element);
extern LIST *list_delete(LIST *root,LIST *element);
extern LIST *list_cons(void *data,LIST *root);
extern LIST *list_reverse(LIST *root);
extern void list_free(LIST *root,unsigned int free_data);
extern unsigned int list_length(LIST *);
extern int list_walk(LIST *,list_walk_action action,unsigned char * argument);
# 79 "/usr/local/include/mysql/mysql.h" 2

extern unsigned int mysql_port;
extern char *mysql_unix_port;
# 99 "/usr/local/include/mysql/mysql.h"
typedef struct st_mysql_field {
  char *name;
  char *org_name;
  char *table;
  char *org_table;
  char *db;
  char *catalog;
  char *def;
  unsigned long length;
  unsigned long max_length;
  unsigned int name_length;
  unsigned int org_name_length;
  unsigned int table_length;
  unsigned int org_table_length;
  unsigned int db_length;
  unsigned int catalog_length;
  unsigned int def_length;
  unsigned int flags;
  unsigned int decimals;
  unsigned int charsetnr;
  enum enum_field_types type;
  void *extension;
} MYSQL_FIELD;

typedef char **MYSQL_ROW;
typedef unsigned int MYSQL_FIELD_OFFSET;







typedef unsigned long long my_ulonglong;



# 1 "/usr/local/include/mysql/typelib.h" 1
# 20 "/usr/local/include/mysql/typelib.h"
# 1 "/usr/local/include/mysql/my_alloc.h" 1
# 26 "/usr/local/include/mysql/my_alloc.h"
typedef struct st_used_mem
{
  struct st_used_mem *next;
  unsigned int left;
  unsigned int size;
} USED_MEM;


typedef struct st_mem_root
{
  USED_MEM *free;
  USED_MEM *used;
  USED_MEM *pre_alloc;

  size_t min_malloc;
  size_t block_size;
  unsigned int block_num;




  unsigned int first_block_usage;

  void (*error_handler)(void);
} MEM_ROOT;
# 21 "/usr/local/include/mysql/typelib.h" 2

typedef struct st_typelib {
  unsigned int count;
  const char *name;
  const char **type_names;
  unsigned int *type_lengths;
} TYPELIB;

extern my_ulonglong find_typeset(char *x, TYPELIB *typelib,int *error_position);
extern int find_type_or_exit(const char *x, TYPELIB *typelib,
                             const char *option);
extern int find_type(char *x, const TYPELIB *typelib, unsigned int full_name);
extern void make_type(char *to,unsigned int nr,TYPELIB *typelib);
extern const char *get_type(TYPELIB *typelib,unsigned int nr);
extern TYPELIB *copy_typelib(MEM_ROOT *root, TYPELIB *from);

extern TYPELIB sql_protocol_typelib;
# 137 "/usr/local/include/mysql/mysql.h" 2






typedef struct st_mysql_rows {
  struct st_mysql_rows *next;
  MYSQL_ROW data;
  unsigned long length;
} MYSQL_ROWS;

typedef MYSQL_ROWS *MYSQL_ROW_OFFSET;



typedef struct embedded_query_result EMBEDDED_QUERY_RESULT;
typedef struct st_mysql_data {
  MYSQL_ROWS *data;
  struct embedded_query_result *embedded_info;
  MEM_ROOT alloc;
  my_ulonglong rows;
  unsigned int fields;

  void *extension;
} MYSQL_DATA;

enum mysql_option
{
  MYSQL_OPT_CONNECT_TIMEOUT, MYSQL_OPT_COMPRESS, MYSQL_OPT_NAMED_PIPE,
  MYSQL_INIT_COMMAND, MYSQL_READ_DEFAULT_FILE, MYSQL_READ_DEFAULT_GROUP,
  MYSQL_SET_CHARSET_DIR, MYSQL_SET_CHARSET_NAME, MYSQL_OPT_LOCAL_INFILE,
  MYSQL_OPT_PROTOCOL, MYSQL_SHARED_MEMORY_BASE_NAME, MYSQL_OPT_READ_TIMEOUT,
  MYSQL_OPT_WRITE_TIMEOUT, MYSQL_OPT_USE_RESULT,
  MYSQL_OPT_USE_REMOTE_CONNECTION, MYSQL_OPT_USE_EMBEDDED_CONNECTION,
  MYSQL_OPT_GUESS_CONNECTION, MYSQL_SET_CLIENT_IP, MYSQL_SECURE_AUTH,
  MYSQL_REPORT_DATA_TRUNCATION, MYSQL_OPT_RECONNECT,
  MYSQL_OPT_SSL_VERIFY_SERVER_CERT
};

struct st_mysql_options {
  unsigned int connect_timeout, read_timeout, write_timeout;
  unsigned int port, protocol;
  unsigned long client_flag;
  char *host,*user,*password,*unix_socket,*db;
  struct st_dynamic_array *init_commands;
  char *my_cnf_file,*my_cnf_group, *charset_dir, *charset_name;
  char *ssl_key;
  char *ssl_cert;
  char *ssl_ca;
  char *ssl_capath;
  char *ssl_cipher;
  char *shared_memory_base_name;
  unsigned long max_allowed_packet;
  my_bool use_ssl;
  my_bool compress,named_pipe;




  my_bool rpl_probe;




  my_bool rpl_parse;




  my_bool no_master_reads;

  my_bool separate_thread;

  enum mysql_option methods_to_use;
  char *client_ip;

  my_bool secure_auth;

  my_bool report_data_truncation;


  int (*local_infile_init)(void **, const char *, void *);
  int (*local_infile_read)(void *, char *, unsigned int);
  void (*local_infile_end)(void *);
  int (*local_infile_error)(void *, char *, unsigned int);
  void *local_infile_userdata;
  void *extension;
};

enum mysql_status
{
  MYSQL_STATUS_READY, MYSQL_STATUS_GET_RESULT, MYSQL_STATUS_USE_RESULT,
  MYSQL_STATUS_STATEMENT_GET_RESULT
};

enum mysql_protocol_type
{
  MYSQL_PROTOCOL_DEFAULT, MYSQL_PROTOCOL_TCP, MYSQL_PROTOCOL_SOCKET,
  MYSQL_PROTOCOL_PIPE, MYSQL_PROTOCOL_MEMORY
};





enum mysql_rpl_type
{
  MYSQL_RPL_MASTER, MYSQL_RPL_SLAVE, MYSQL_RPL_ADMIN
};

typedef struct character_set
{
  unsigned int number;
  unsigned int state;
  const char *csname;
  const char *name;
  const char *comment;
  const char *dir;
  unsigned int mbminlen;
  unsigned int mbmaxlen;
} MY_CHARSET_INFO;

struct st_mysql_methods;
struct st_mysql_stmt;

typedef struct st_mysql
{
  NET net;
  unsigned char *connector_fd;
  char *host,*user,*passwd,*unix_socket,*server_version,*host_info;
  char *info, *db;
  struct charset_info_st *charset;
  MYSQL_FIELD *fields;
  MEM_ROOT field_alloc;
  my_ulonglong affected_rows;
  my_ulonglong insert_id;
  my_ulonglong extra_info;
  unsigned long thread_id;
  unsigned long packet_length;
  unsigned int port;
  unsigned long client_flag,server_capabilities;
  unsigned int protocol_version;
  unsigned int field_count;
  unsigned int server_status;
  unsigned int server_language;
  unsigned int warning_count;
  struct st_mysql_options options;
  enum mysql_status status;
  my_bool free_me;
  my_bool reconnect;


  char scramble[20 +1];





  my_bool rpl_pivot;




  struct st_mysql* master, *next_slave;

  struct st_mysql* last_used_slave;

  struct st_mysql* last_used_con;

  LIST *stmts;
  const struct st_mysql_methods *methods;
  void *thd;




  my_bool *unbuffered_fetch_owner;

  char *info_buffer;
  void *extension;
} MYSQL;


typedef struct st_mysql_res {
  my_ulonglong row_count;
  MYSQL_FIELD *fields;
  MYSQL_DATA *data;
  MYSQL_ROWS *data_cursor;
  unsigned long *lengths;
  MYSQL *handle;
  const struct st_mysql_methods *methods;
  MYSQL_ROW row;
  MYSQL_ROW current_row;
  MEM_ROOT field_alloc;
  unsigned int field_count, current_field;
  my_bool eof;

  my_bool unbuffered_fetch_cancelled;
  void *extension;
} MYSQL_RES;
# 353 "/usr/local/include/mysql/mysql.h"
typedef struct st_mysql_manager
{
  NET net;
  char *host, *user, *passwd;
  char *net_buf, *net_buf_pos, *net_data_end;
  unsigned int port;
  int cmd_status;
  int last_errno;
  int net_buf_size;
  my_bool free_me;
  my_bool eof;
  char last_error[256];
  void *extension;
} MYSQL_MANAGER;

typedef struct st_mysql_parameters
{
  unsigned long *p_max_allowed_packet;
  unsigned long *p_net_buffer_length;
  void *extension;
} MYSQL_PARAMETERS;
# 385 "/usr/local/include/mysql/mysql.h"
int mysql_server_init(int argc, char **argv, char **groups);
void mysql_server_end(void);
# 400 "/usr/local/include/mysql/mysql.h"
MYSQL_PARAMETERS * mysql_get_parameters(void);







my_bool mysql_thread_init(void);
void mysql_thread_end(void);






my_ulonglong mysql_num_rows(MYSQL_RES *res);
unsigned int mysql_num_fields(MYSQL_RES *res);
my_bool mysql_eof(MYSQL_RES *res);
MYSQL_FIELD * mysql_fetch_field_direct(MYSQL_RES *res,
           unsigned int fieldnr);
MYSQL_FIELD * mysql_fetch_fields(MYSQL_RES *res);
MYSQL_ROW_OFFSET mysql_row_tell(MYSQL_RES *res);
MYSQL_FIELD_OFFSET mysql_field_tell(MYSQL_RES *res);

unsigned int mysql_field_count(MYSQL *mysql);
my_ulonglong mysql_affected_rows(MYSQL *mysql);
my_ulonglong mysql_insert_id(MYSQL *mysql);
unsigned int mysql_errno(MYSQL *mysql);
const char * mysql_error(MYSQL *mysql);
const char * mysql_sqlstate(MYSQL *mysql);
unsigned int mysql_warning_count(MYSQL *mysql);
const char * mysql_info(MYSQL *mysql);
unsigned long mysql_thread_id(MYSQL *mysql);
const char * mysql_character_set_name(MYSQL *mysql);
int mysql_set_character_set(MYSQL *mysql, const char *csname);

MYSQL * mysql_init(MYSQL *mysql);
my_bool mysql_ssl_set(MYSQL *mysql, const char *key,
          const char *cert, const char *ca,
          const char *capath, const char *cipher);
const char * mysql_get_ssl_cipher(MYSQL *mysql);
my_bool mysql_change_user(MYSQL *mysql, const char *user,
       const char *passwd, const char *db);
MYSQL * mysql_real_connect(MYSQL *mysql, const char *host,
        const char *user,
        const char *passwd,
        const char *db,
        unsigned int port,
        const char *unix_socket,
        unsigned long clientflag);
int mysql_select_db(MYSQL *mysql, const char *db);
int mysql_query(MYSQL *mysql, const char *q);
int mysql_send_query(MYSQL *mysql, const char *q,
      unsigned long length);
int mysql_real_query(MYSQL *mysql, const char *q,
     unsigned long length);
MYSQL_RES * mysql_store_result(MYSQL *mysql);
MYSQL_RES * mysql_use_result(MYSQL *mysql);


my_bool mysql_master_query(MYSQL *mysql, const char *q,
        unsigned long length);
my_bool mysql_master_send_query(MYSQL *mysql, const char *q,
      unsigned long length);

my_bool mysql_slave_query(MYSQL *mysql, const char *q,
       unsigned long length);
my_bool mysql_slave_send_query(MYSQL *mysql, const char *q,
            unsigned long length);
void mysql_get_character_set_info(MYSQL *mysql,
                           MY_CHARSET_INFO *charset);





void
mysql_set_local_infile_handler(MYSQL *mysql,
                               int (*local_infile_init)(void **, const char *,
                            void *),
                               int (*local_infile_read)(void *, char *,
       unsigned int),
                               void (*local_infile_end)(void *),
                               int (*local_infile_error)(void *, char*,
        unsigned int),
                               void *);

void
mysql_set_local_infile_default(MYSQL *mysql);






void mysql_enable_rpl_parse(MYSQL* mysql);
void mysql_disable_rpl_parse(MYSQL* mysql);

int mysql_rpl_parse_enabled(MYSQL* mysql);


void mysql_enable_reads_from_master(MYSQL* mysql);
void mysql_disable_reads_from_master(MYSQL* mysql);

my_bool mysql_reads_from_master_enabled(MYSQL* mysql);

enum mysql_rpl_type mysql_rpl_query_type(const char* q, int len);


my_bool mysql_rpl_probe(MYSQL* mysql);


int mysql_set_master(MYSQL* mysql, const char* host,
      unsigned int port,
      const char* user,
      const char* passwd);
int mysql_add_slave(MYSQL* mysql, const char* host,
     unsigned int port,
     const char* user,
     const char* passwd);

int mysql_shutdown(MYSQL *mysql,
                                       enum mysql_enum_shutdown_level
                                       shutdown_level);
int mysql_dump_debug_info(MYSQL *mysql);
int mysql_refresh(MYSQL *mysql,
         unsigned int refresh_options);
int mysql_kill(MYSQL *mysql,unsigned long pid);
int mysql_set_server_option(MYSQL *mysql,
      enum enum_mysql_set_option
      option);
int mysql_ping(MYSQL *mysql);
const char * mysql_stat(MYSQL *mysql);
const char * mysql_get_server_info(MYSQL *mysql);
const char * mysql_get_client_info(void);
unsigned long mysql_get_client_version(void);
const char * mysql_get_host_info(MYSQL *mysql);
unsigned long mysql_get_server_version(MYSQL *mysql);
unsigned int mysql_get_proto_info(MYSQL *mysql);
MYSQL_RES * mysql_list_dbs(MYSQL *mysql,const char *wild);
MYSQL_RES * mysql_list_tables(MYSQL *mysql,const char *wild);
MYSQL_RES * mysql_list_processes(MYSQL *mysql);
int mysql_options(MYSQL *mysql,enum mysql_option option,
          const void *arg);
void mysql_free_result(MYSQL_RES *result);
void mysql_data_seek(MYSQL_RES *result,
     my_ulonglong offset);
MYSQL_ROW_OFFSET mysql_row_seek(MYSQL_RES *result,
      MYSQL_ROW_OFFSET offset);
MYSQL_FIELD_OFFSET mysql_field_seek(MYSQL_RES *result,
        MYSQL_FIELD_OFFSET offset);
MYSQL_ROW mysql_fetch_row(MYSQL_RES *result);
unsigned long * mysql_fetch_lengths(MYSQL_RES *result);
MYSQL_FIELD * mysql_fetch_field(MYSQL_RES *result);
MYSQL_RES * mysql_list_fields(MYSQL *mysql, const char *table,
       const char *wild);
unsigned long mysql_escape_string(char *to,const char *from,
         unsigned long from_length);
unsigned long mysql_hex_string(char *to,const char *from,
                                         unsigned long from_length);
unsigned long mysql_real_escape_string(MYSQL *mysql,
            char *to,const char *from,
            unsigned long length);
void mysql_debug(const char *debug);
void myodbc_remove_escape(MYSQL *mysql,char *name);
unsigned int mysql_thread_safe(void);
my_bool mysql_embedded(void);
MYSQL_MANAGER* mysql_manager_init(MYSQL_MANAGER* con);
MYSQL_MANAGER* mysql_manager_connect(MYSQL_MANAGER* con,
           const char* host,
           const char* user,
           const char* passwd,
           unsigned int port);
void mysql_manager_close(MYSQL_MANAGER* con);
int mysql_manager_command(MYSQL_MANAGER* con,
      const char* cmd, int cmd_len);
int mysql_manager_fetch_line(MYSQL_MANAGER* con,
        char* res_buf,
       int res_buf_size);
my_bool mysql_read_query_result(MYSQL *mysql);
# 589 "/usr/local/include/mysql/mysql.h"
enum enum_mysql_stmt_state
{
  MYSQL_STMT_INIT_DONE= 1, MYSQL_STMT_PREPARE_DONE, MYSQL_STMT_EXECUTE_DONE,
  MYSQL_STMT_FETCH_DONE
};
# 659 "/usr/local/include/mysql/mysql.h"
typedef struct st_mysql_bind
{
  unsigned long *length;
  my_bool *is_null;
  void *buffer;

  my_bool *error;
  unsigned char *row_ptr;
  void (*store_param_func)(NET *net, struct st_mysql_bind *param);
  void (*fetch_result)(struct st_mysql_bind *, MYSQL_FIELD *,
                       unsigned char **row);
  void (*skip_result)(struct st_mysql_bind *, MYSQL_FIELD *,
        unsigned char **row);

  unsigned long buffer_length;
  unsigned long offset;
  unsigned long length_value;
  unsigned int param_number;
  unsigned int pack_length;
  enum enum_field_types buffer_type;
  my_bool error_value;
  my_bool is_unsigned;
  my_bool long_data_used;
  my_bool is_null_value;
  void *extension;
} MYSQL_BIND;



typedef struct st_mysql_stmt
{
  MEM_ROOT mem_root;
  LIST list;
  MYSQL *mysql;
  MYSQL_BIND *params;
  MYSQL_BIND *bind;
  MYSQL_FIELD *fields;
  MYSQL_DATA result;
  MYSQL_ROWS *data_cursor;




  int (*read_row_func)(struct st_mysql_stmt *stmt,
                                  unsigned char **row);

  my_ulonglong affected_rows;
  my_ulonglong insert_id;
  unsigned long stmt_id;
  unsigned long flags;
  unsigned long prefetch_rows;




  unsigned int server_status;
  unsigned int last_errno;
  unsigned int param_count;
  unsigned int field_count;
  enum enum_mysql_stmt_state state;
  char last_error[512];
  char sqlstate[5 +1];

  my_bool send_types_to_server;
  my_bool bind_param_done;
  unsigned char bind_result_done;

  my_bool unbuffered_fetch_cancelled;




  my_bool update_max_length;
  void *extension;
} MYSQL_STMT;

enum enum_stmt_attr_type
{







  STMT_ATTR_UPDATE_MAX_LENGTH,




  STMT_ATTR_CURSOR_TYPE,




  STMT_ATTR_PREFETCH_ROWS
};


typedef struct st_mysql_methods
{
  my_bool (*read_query_result)(MYSQL *mysql);
  my_bool (*advanced_command)(MYSQL *mysql,
         enum enum_server_command command,
         const unsigned char *header,
         unsigned long header_length,
         const unsigned char *arg,
         unsigned long arg_length,
         my_bool skip_check,
                              MYSQL_STMT *stmt);
  MYSQL_DATA *(*read_rows)(MYSQL *mysql,MYSQL_FIELD *mysql_fields,
      unsigned int fields);
  MYSQL_RES * (*use_result)(MYSQL *mysql);
  void (*fetch_lengths)(unsigned long *to,
   MYSQL_ROW column, unsigned int field_count);
  void (*flush_use_result)(MYSQL *mysql);

  MYSQL_FIELD * (*list_fields)(MYSQL *mysql);
  my_bool (*read_prepare_result)(MYSQL *mysql, MYSQL_STMT *stmt);
  int (*stmt_execute)(MYSQL_STMT *stmt);
  int (*read_binary_rows)(MYSQL_STMT *stmt);
  int (*unbuffered_fetch)(MYSQL *mysql, char **row);
  void (*free_embedded_thd)(MYSQL *mysql);
  const char *(*read_statistics)(MYSQL *mysql);
  my_bool (*next_result)(MYSQL *mysql);
  int (*read_change_user_result)(MYSQL *mysql, char *buff, const char *passwd);
  int (*read_rows_from_cursor)(MYSQL_STMT *stmt);

} MYSQL_METHODS;


MYSQL_STMT * mysql_stmt_init(MYSQL *mysql);
int mysql_stmt_prepare(MYSQL_STMT *stmt, const char *query,
                               unsigned long length);
int mysql_stmt_execute(MYSQL_STMT *stmt);
int mysql_stmt_fetch(MYSQL_STMT *stmt);
int mysql_stmt_fetch_column(MYSQL_STMT *stmt, MYSQL_BIND *bind_arg,
                                    unsigned int column,
                                    unsigned long offset);
int mysql_stmt_store_result(MYSQL_STMT *stmt);
unsigned long mysql_stmt_param_count(MYSQL_STMT * stmt);
my_bool mysql_stmt_attr_set(MYSQL_STMT *stmt,
                                    enum enum_stmt_attr_type attr_type,
                                    const void *attr);
my_bool mysql_stmt_attr_get(MYSQL_STMT *stmt,
                                    enum enum_stmt_attr_type attr_type,
                                    void *attr);
my_bool mysql_stmt_bind_param(MYSQL_STMT * stmt, MYSQL_BIND * bnd);
my_bool mysql_stmt_bind_result(MYSQL_STMT * stmt, MYSQL_BIND * bnd);
my_bool mysql_stmt_close(MYSQL_STMT * stmt);
my_bool mysql_stmt_reset(MYSQL_STMT * stmt);
my_bool mysql_stmt_free_result(MYSQL_STMT *stmt);
my_bool mysql_stmt_send_long_data(MYSQL_STMT *stmt,
                                          unsigned int param_number,
                                          const char *data,
                                          unsigned long length);
MYSQL_RES * mysql_stmt_result_metadata(MYSQL_STMT *stmt);
MYSQL_RES * mysql_stmt_param_metadata(MYSQL_STMT *stmt);
unsigned int mysql_stmt_errno(MYSQL_STMT * stmt);
const char * mysql_stmt_error(MYSQL_STMT * stmt);
const char * mysql_stmt_sqlstate(MYSQL_STMT * stmt);
MYSQL_ROW_OFFSET mysql_stmt_row_seek(MYSQL_STMT *stmt,
                                             MYSQL_ROW_OFFSET offset);
MYSQL_ROW_OFFSET mysql_stmt_row_tell(MYSQL_STMT *stmt);
void mysql_stmt_data_seek(MYSQL_STMT *stmt, my_ulonglong offset);
my_ulonglong mysql_stmt_num_rows(MYSQL_STMT *stmt);
my_ulonglong mysql_stmt_affected_rows(MYSQL_STMT *stmt);
my_ulonglong mysql_stmt_insert_id(MYSQL_STMT *stmt);
unsigned int mysql_stmt_field_count(MYSQL_STMT *stmt);

my_bool mysql_commit(MYSQL * mysql);
my_bool mysql_rollback(MYSQL * mysql);
my_bool mysql_autocommit(MYSQL * mysql, my_bool auto_mode);
my_bool mysql_more_results(MYSQL *mysql);
int mysql_next_result(MYSQL *mysql);
void mysql_close(MYSQL *sock);
# 3 "conftest.c" 2
