
#include <stdio.h>
#include <stddef.h>
#include <stdarg.h>
#include <errno.h>
#include <sys/types.h>   /* XXX for ssize_t on some platforms */

#ifdef _WIN32
#  include <Windows.h>
#  define snprintf _snprintf
typedef __int8 int8_t;
typedef __int16 int16_t;
typedef __int32 int32_t;
typedef __int64 int64_t;
typedef unsigned __int8 uint8_t;
typedef unsigned __int16 uint16_t;
typedef unsigned __int32 uint32_t;
typedef unsigned __int64 uint64_t;
typedef SSIZE_T ssize_t;
typedef unsigned char _Bool;
#else
#  include <stdint.h>
#endif


    #include "gdbm.h"
    
static void _cffi_check__datum(datum *p)
{
  /* only to generate compile-time warnings or errors */
  { char * *tmp = &p->dptr; (void)tmp; }
  (void)((p->dsize) << 1);
}
ssize_t _cffi_layout__datum(ssize_t i)
{
  struct _cffi_aligncheck { char x; datum y; };
  static ssize_t nums[] = {
    sizeof(datum),
    offsetof(struct _cffi_aligncheck, y),
    offsetof(datum, dptr),
    sizeof(((datum *)0)->dptr),
    offsetof(datum, dsize),
    sizeof(((datum *)0)->dsize),
    -1
  };
  return nums[i];
  /* the next line is not executed, but compiled */
  _cffi_check__datum(0);
}

void _cffi_f_free(void * x0)
{
  free(x0);
}

void _cffi_f_gdbm_close(void * x0)
{
  gdbm_close(x0);
}

int _cffi_f_gdbm_delete(void * x0, datum *x1)
{
  return gdbm_delete(x0, *x1);
}

int _cffi_f_gdbm_exists(void * x0, datum *x1)
{
  return gdbm_exists(x0, *x1);
}

datum _cffi_f_gdbm_fetch(void * x0, datum *x1)
{
  return gdbm_fetch(x0, *x1);
}

datum _cffi_f_gdbm_firstkey(void * x0)
{
  return gdbm_firstkey(x0);
}

datum _cffi_f_gdbm_nextkey(void * x0, datum *x1)
{
  return gdbm_nextkey(x0, *x1);
}

void * _cffi_f_gdbm_open(char * x0, int x1, int x2, int x3, void(* x4)(void))
{
  return gdbm_open(x0, x1, x2, x3, x4);
}

int _cffi_f_gdbm_reorganize(void * x0)
{
  return gdbm_reorganize(x0);
}

int _cffi_f_gdbm_store(void * x0, datum *x1, datum *x2, int x3)
{
  return gdbm_store(x0, *x1, *x2, x3);
}

char * _cffi_f_gdbm_strerror(int x0)
{
  return gdbm_strerror(x0);
}

void _cffi_f_gdbm_sync(void * x0)
{
  gdbm_sync(x0);
}

int _cffi_const_GDBM_FAST(long long *out_value)
{
  *out_value = (long long)(GDBM_FAST);
  return (GDBM_FAST) <= 0;
}

int _cffi_const_GDBM_NEWDB(long long *out_value)
{
  *out_value = (long long)(GDBM_NEWDB);
  return (GDBM_NEWDB) <= 0;
}

int _cffi_const_GDBM_NOLOCK(long long *out_value)
{
  *out_value = (long long)(GDBM_NOLOCK);
  return (GDBM_NOLOCK) <= 0;
}

int _cffi_const_GDBM_READER(long long *out_value)
{
  *out_value = (long long)(GDBM_READER);
  return (GDBM_READER) <= 0;
}

int _cffi_const_GDBM_REPLACE(long long *out_value)
{
  *out_value = (long long)(GDBM_REPLACE);
  return (GDBM_REPLACE) <= 0;
}

int _cffi_const_GDBM_SYNC(long long *out_value)
{
  *out_value = (long long)(GDBM_SYNC);
  return (GDBM_SYNC) <= 0;
}

int _cffi_const_GDBM_WRCREAT(long long *out_value)
{
  *out_value = (long long)(GDBM_WRCREAT);
  return (GDBM_WRCREAT) <= 0;
}

int _cffi_const_GDBM_WRITER(long long *out_value)
{
  *out_value = (long long)(GDBM_WRITER);
  return (GDBM_WRITER) <= 0;
}

int * _cffi_var_gdbm_errno(void)
{
  return (&gdbm_errno);
}

