/* Generated automatically from ./fcntl.scm.  DO NOT EDIT */
#include <gauche.h>
#include <gauche/code.h>
#include <gauche/extend.h>

#line 52 "./fcntl.scm"
#include "gauche/fcntl.h"
#include "gauche/class.h"


static ScmObj gauche_2d_2dfcntlsys_fcntl(ScmObj*, int, void*);
static SCM_DEFINE_SUBR(gauche_2d_2dfcntlsys_fcntl__STUB, 2, 2,SCM_FALSE,gauche_2d_2dfcntlsys_fcntl, NULL, NULL);


static ScmObj gauche_2d_2dfcntlsys_open(ScmObj*, int, void*);
static SCM_DEFINE_SUBRX(gauche_2d_2dfcntlsys_open__STUB, 2, 2,0, SCM_FALSE,SCM_SUBR_IMMEDIATE_ARG, gauche_2d_2dfcntlsys_open, NULL, NULL);

#if defined(HAVE_SYS_STATVFS_H)

static ScmObj gauche_2d_2dfcntlsys_statvfs(ScmObj*, int, void*);
static SCM_DEFINE_SUBRX(gauche_2d_2dfcntlsys_statvfs__STUB, 1, 0,0, SCM_FALSE,SCM_SUBR_IMMEDIATE_ARG, gauche_2d_2dfcntlsys_statvfs, NULL, NULL);

#endif /* defined(HAVE_SYS_STATVFS_H) */
#if defined(HAVE_SYS_STATVFS_H)

static ScmObj gauche_2d_2dfcntlsys_fstatvfs(ScmObj*, int, void*);
static SCM_DEFINE_SUBR(gauche_2d_2dfcntlsys_fstatvfs__STUB, 1, 0,SCM_FALSE,gauche_2d_2dfcntlsys_fstatvfs, NULL, NULL);

#endif /* defined(HAVE_SYS_STATVFS_H) */
extern void Scm_Init_fcntl();
#if defined(__CYGWIN__) || defined(GAUCHE_WINDOWS)
#define SCM_CGEN_CONST /*empty*/
#else
#define SCM_CGEN_CONST const
#endif
static SCM_CGEN_CONST struct scm__scRec {
#if defined(HAVE_SYS_STATVFS_H)
  ScmString d2002[10];
#endif /*defined(HAVE_SYS_STATVFS_H)*/
#if defined(O_ASYNC)
  ScmString d2000[1];
#endif /*defined(O_ASYNC)*/
#if defined(O_NONBLOCK)
  ScmString d1998[1];
#endif /*defined(O_NONBLOCK)*/
#if defined(O_NOFOLLOW)
  ScmString d1996[1];
#endif /*defined(O_NOFOLLOW)*/
#if defined(O_NOCTTY)
  ScmString d1994[1];
#endif /*defined(O_NOCTTY)*/
#if defined(O_CLOEXEC)
  ScmString d1992[1];
#endif /*defined(O_CLOEXEC)*/
#if defined(FD_CLOEXEC)
  ScmString d1990[1];
#endif /*defined(FD_CLOEXEC)*/
#if defined(F_NOTIFY)
  ScmString d1988[8];
#endif /*defined(F_NOTIFY)*/
#if defined(F_SETLEASE)
  ScmString d1986[1];
#endif /*defined(F_SETLEASE)*/
#if defined(F_GETLEASE)
  ScmString d1984[1];
#endif /*defined(F_GETLEASE)*/
#if defined(F_SETSIG)
  ScmString d1982[1];
#endif /*defined(F_SETSIG)*/
#if defined(F_GETSIG)
  ScmString d1980[1];
#endif /*defined(F_GETSIG)*/
#if defined(F_SETOWN)
  ScmString d1978[1];
#endif /*defined(F_SETOWN)*/
#if defined(F_GETOWN)
  ScmString d1976[1];
#endif /*defined(F_GETOWN)*/
  ScmString d1965[32];
} scm__sc SCM_UNUSED = {
#if defined(HAVE_SYS_STATVFS_H)
  {   /* ScmString d2002 */
      SCM_STRING_CONST_INITIALIZER("sys-statvfs", 11, 11),
      SCM_STRING_CONST_INITIALIZER("path", 4, 4),
      SCM_STRING_CONST_INITIALIZER("source-info", 11, 11),
      SCM_STRING_CONST_INITIALIZER("./fcntl.scm", 11, 11),
      SCM_STRING_CONST_INITIALIZER("bind-info", 9, 9),
      SCM_STRING_CONST_INITIALIZER("gauche.fcntl", 12, 12),
      SCM_STRING_CONST_INITIALIZER("sys-fstatvfs", 12, 12),
      SCM_STRING_CONST_INITIALIZER("port-or-fd", 10, 10),
      SCM_STRING_CONST_INITIALIZER("ST_NOSUID", 9, 9),
      SCM_STRING_CONST_INITIALIZER("ST_RDONLY", 9, 9),
  },
#endif /*defined(HAVE_SYS_STATVFS_H)*/
#if defined(O_ASYNC)
  {   /* ScmString d2000 */
      SCM_STRING_CONST_INITIALIZER("O_ASYNC", 7, 7),
  },
#endif /*defined(O_ASYNC)*/
#if defined(O_NONBLOCK)
  {   /* ScmString d1998 */
      SCM_STRING_CONST_INITIALIZER("O_NONBLOCK", 10, 10),
  },
#endif /*defined(O_NONBLOCK)*/
#if defined(O_NOFOLLOW)
  {   /* ScmString d1996 */
      SCM_STRING_CONST_INITIALIZER("O_NOFOLLOW", 10, 10),
  },
#endif /*defined(O_NOFOLLOW)*/
#if defined(O_NOCTTY)
  {   /* ScmString d1994 */
      SCM_STRING_CONST_INITIALIZER("O_NOCTTY", 8, 8),
  },
#endif /*defined(O_NOCTTY)*/
#if defined(O_CLOEXEC)
  {   /* ScmString d1992 */
      SCM_STRING_CONST_INITIALIZER("O_CLOEXEC", 9, 9),
  },
#endif /*defined(O_CLOEXEC)*/
#if defined(FD_CLOEXEC)
  {   /* ScmString d1990 */
      SCM_STRING_CONST_INITIALIZER("FD_CLOEXEC", 10, 10),
  },
#endif /*defined(FD_CLOEXEC)*/
#if defined(F_NOTIFY)
  {   /* ScmString d1988 */
      SCM_STRING_CONST_INITIALIZER("F_NOTIFY", 8, 8),
      SCM_STRING_CONST_INITIALIZER("DN_ACCESS", 9, 9),
      SCM_STRING_CONST_INITIALIZER("DN_MODIFY", 9, 9),
      SCM_STRING_CONST_INITIALIZER("DN_CREATE", 9, 9),
      SCM_STRING_CONST_INITIALIZER("DN_DELETE", 9, 9),
      SCM_STRING_CONST_INITIALIZER("DN_RENAME", 9, 9),
      SCM_STRING_CONST_INITIALIZER("DN_ATTRIB", 9, 9),
      SCM_STRING_CONST_INITIALIZER("DN_MULTISHOT", 12, 12),
  },
#endif /*defined(F_NOTIFY)*/
#if defined(F_SETLEASE)
  {   /* ScmString d1986 */
      SCM_STRING_CONST_INITIALIZER("F_SETLEASE", 10, 10),
  },
#endif /*defined(F_SETLEASE)*/
#if defined(F_GETLEASE)
  {   /* ScmString d1984 */
      SCM_STRING_CONST_INITIALIZER("F_GETLEASE", 10, 10),
  },
#endif /*defined(F_GETLEASE)*/
#if defined(F_SETSIG)
  {   /* ScmString d1982 */
      SCM_STRING_CONST_INITIALIZER("F_SETSIG", 8, 8),
  },
#endif /*defined(F_SETSIG)*/
#if defined(F_GETSIG)
  {   /* ScmString d1980 */
      SCM_STRING_CONST_INITIALIZER("F_GETSIG", 8, 8),
  },
#endif /*defined(F_GETSIG)*/
#if defined(F_SETOWN)
  {   /* ScmString d1978 */
      SCM_STRING_CONST_INITIALIZER("F_SETOWN", 8, 8),
  },
#endif /*defined(F_SETOWN)*/
#if defined(F_GETOWN)
  {   /* ScmString d1976 */
      SCM_STRING_CONST_INITIALIZER("F_GETOWN", 8, 8),
  },
#endif /*defined(F_GETOWN)*/
  {   /* ScmString d1965 */
      SCM_STRING_CONST_INITIALIZER("gauche.fcntl", 12, 12),
      SCM_STRING_CONST_INITIALIZER("F_DUPFD", 7, 7),
      SCM_STRING_CONST_INITIALIZER("F_GETFD", 7, 7),
      SCM_STRING_CONST_INITIALIZER("F_SETFD", 7, 7),
      SCM_STRING_CONST_INITIALIZER("F_GETFL", 7, 7),
      SCM_STRING_CONST_INITIALIZER("F_SETFL", 7, 7),
      SCM_STRING_CONST_INITIALIZER("F_GETLK", 7, 7),
      SCM_STRING_CONST_INITIALIZER("F_SETLK", 7, 7),
      SCM_STRING_CONST_INITIALIZER("F_SETLKW", 8, 8),
      SCM_STRING_CONST_INITIALIZER("F_RDLCK", 7, 7),
      SCM_STRING_CONST_INITIALIZER("F_WRLCK", 7, 7),
      SCM_STRING_CONST_INITIALIZER("F_UNLCK", 7, 7),
      SCM_STRING_CONST_INITIALIZER("O_ACCMODE", 9, 9),
      SCM_STRING_CONST_INITIALIZER("O_RDONLY", 8, 8),
      SCM_STRING_CONST_INITIALIZER("O_WRONLY", 8, 8),
      SCM_STRING_CONST_INITIALIZER("O_RDWR", 6, 6),
      SCM_STRING_CONST_INITIALIZER("O_APPEND", 8, 8),
      SCM_STRING_CONST_INITIALIZER("O_CREAT", 7, 7),
      SCM_STRING_CONST_INITIALIZER("O_EXCL", 6, 6),
      SCM_STRING_CONST_INITIALIZER("O_TRUNC", 7, 7),
      SCM_STRING_CONST_INITIALIZER("sys-fcntl", 9, 9),
      SCM_STRING_CONST_INITIALIZER("port-or-fd", 10, 10),
      SCM_STRING_CONST_INITIALIZER("op", 2, 2),
      SCM_STRING_CONST_INITIALIZER("optional", 8, 8),
      SCM_STRING_CONST_INITIALIZER("arg", 3, 3),
      SCM_STRING_CONST_INITIALIZER("source-info", 11, 11),
      SCM_STRING_CONST_INITIALIZER("./fcntl.scm", 11, 11),
      SCM_STRING_CONST_INITIALIZER("bind-info", 9, 9),
      SCM_STRING_CONST_INITIALIZER("sys-open", 8, 8),
      SCM_STRING_CONST_INITIALIZER("path", 4, 4),
      SCM_STRING_CONST_INITIALIZER("flags", 5, 5),
      SCM_STRING_CONST_INITIALIZER("mode", 4, 4),
  },
};
static struct scm__rcRec {
#if defined(HAVE_SYS_STATVFS_H)
  ScmPair d2004[19] SCM_ALIGN_PAIR;
#endif /*defined(HAVE_SYS_STATVFS_H)*/
#if defined(HAVE_SYS_STATVFS_H)
  ScmObj d2003[11];
#endif /*defined(HAVE_SYS_STATVFS_H)*/
  ScmPair d2001[25] SCM_ALIGN_PAIR;
#if defined(O_ASYNC)
  ScmObj d1999[1];
#endif /*defined(O_ASYNC)*/
#if defined(O_NONBLOCK)
  ScmObj d1997[1];
#endif /*defined(O_NONBLOCK)*/
#if defined(O_NOFOLLOW)
  ScmObj d1995[1];
#endif /*defined(O_NOFOLLOW)*/
#if defined(O_NOCTTY)
  ScmObj d1993[1];
#endif /*defined(O_NOCTTY)*/
#if defined(O_CLOEXEC)
  ScmObj d1991[1];
#endif /*defined(O_CLOEXEC)*/
#if defined(FD_CLOEXEC)
  ScmObj d1989[1];
#endif /*defined(FD_CLOEXEC)*/
#if defined(F_NOTIFY)
  ScmObj d1987[8];
#endif /*defined(F_NOTIFY)*/
#if defined(F_SETLEASE)
  ScmObj d1985[1];
#endif /*defined(F_SETLEASE)*/
#if defined(F_GETLEASE)
  ScmObj d1983[1];
#endif /*defined(F_GETLEASE)*/
#if defined(F_SETSIG)
  ScmObj d1981[1];
#endif /*defined(F_SETSIG)*/
#if defined(F_GETSIG)
  ScmObj d1979[1];
#endif /*defined(F_GETSIG)*/
#if defined(F_SETOWN)
  ScmObj d1977[1];
#endif /*defined(F_SETOWN)*/
#if defined(F_GETOWN)
  ScmObj d1975[1];
#endif /*defined(F_GETOWN)*/
  ScmObj d1964[34];
} scm__rc SCM_UNUSED = {
#if defined(HAVE_SYS_STATVFS_H)
  {   /* ScmPair d2004 */
       { SCM_NIL, SCM_NIL },
       { SCM_UNDEFINED, SCM_NIL},
       { SCM_MAKE_INT(159U), SCM_NIL},
       { SCM_OBJ(&scm__sc.d2002[3]), SCM_OBJ(&scm__rc.d2004[2])},
       { SCM_UNDEFINED, SCM_OBJ(&scm__rc.d2004[3])},
       { SCM_UNDEFINED, SCM_NIL},
       { SCM_UNDEFINED, SCM_OBJ(&scm__rc.d2004[5])},
       { SCM_UNDEFINED, SCM_OBJ(&scm__rc.d2004[6])},
       { SCM_OBJ(&scm__rc.d2004[7]), SCM_NIL},
       { SCM_OBJ(&scm__rc.d2004[4]), SCM_OBJ(&scm__rc.d2004[8])},
       { SCM_UNDEFINED, SCM_NIL},
       { SCM_MAKE_INT(167U), SCM_NIL},
       { SCM_OBJ(&scm__sc.d2002[3]), SCM_OBJ(&scm__rc.d2004[11])},
       { SCM_UNDEFINED, SCM_OBJ(&scm__rc.d2004[12])},
       { SCM_UNDEFINED, SCM_NIL},
       { SCM_UNDEFINED, SCM_OBJ(&scm__rc.d2004[14])},
       { SCM_UNDEFINED, SCM_OBJ(&scm__rc.d2004[15])},
       { SCM_OBJ(&scm__rc.d2004[16]), SCM_NIL},
       { SCM_OBJ(&scm__rc.d2004[13]), SCM_OBJ(&scm__rc.d2004[17])},
  },
#endif /*defined(HAVE_SYS_STATVFS_H)*/
#if defined(HAVE_SYS_STATVFS_H)
  {   /* ScmObj d2003 */
    SCM_UNBOUND,
    SCM_UNBOUND,
    SCM_UNBOUND,
    SCM_UNBOUND,
    SCM_UNBOUND,
    SCM_UNBOUND,
    SCM_UNBOUND,
    SCM_UNBOUND,
    SCM_UNBOUND,
    SCM_UNBOUND,
    SCM_UNBOUND,
  },
#endif /*defined(HAVE_SYS_STATVFS_H)*/
  {   /* ScmPair d2001 */
       { SCM_NIL, SCM_NIL },
       { SCM_UNDEFINED, SCM_NIL},
       { SCM_UNDEFINED, SCM_OBJ(&scm__rc.d2001[1])},
       { SCM_UNDEFINED, SCM_OBJ(&scm__rc.d2001[2])},
       { SCM_UNDEFINED, SCM_OBJ(&scm__rc.d2001[3])},
       { SCM_MAKE_INT(114U), SCM_NIL},
       { SCM_OBJ(&scm__sc.d1965[26]), SCM_OBJ(&scm__rc.d2001[5])},
       { SCM_UNDEFINED, SCM_OBJ(&scm__rc.d2001[6])},
       { SCM_UNDEFINED, SCM_NIL},
       { SCM_UNDEFINED, SCM_OBJ(&scm__rc.d2001[8])},
       { SCM_UNDEFINED, SCM_OBJ(&scm__rc.d2001[9])},
       { SCM_OBJ(&scm__rc.d2001[10]), SCM_NIL},
       { SCM_OBJ(&scm__rc.d2001[7]), SCM_OBJ(&scm__rc.d2001[11])},
       { SCM_UNDEFINED, SCM_NIL},
       { SCM_UNDEFINED, SCM_OBJ(&scm__rc.d2001[13])},
       { SCM_UNDEFINED, SCM_OBJ(&scm__rc.d2001[14])},
       { SCM_UNDEFINED, SCM_OBJ(&scm__rc.d2001[15])},
       { SCM_MAKE_INT(120U), SCM_NIL},
       { SCM_OBJ(&scm__sc.d1965[26]), SCM_OBJ(&scm__rc.d2001[17])},
       { SCM_UNDEFINED, SCM_OBJ(&scm__rc.d2001[18])},
       { SCM_UNDEFINED, SCM_NIL},
       { SCM_UNDEFINED, SCM_OBJ(&scm__rc.d2001[20])},
       { SCM_UNDEFINED, SCM_OBJ(&scm__rc.d2001[21])},
       { SCM_OBJ(&scm__rc.d2001[22]), SCM_NIL},
       { SCM_OBJ(&scm__rc.d2001[19]), SCM_OBJ(&scm__rc.d2001[23])},
  },
#if defined(O_ASYNC)
  {   /* ScmObj d1999 */
    SCM_UNBOUND,
  },
#endif /*defined(O_ASYNC)*/
#if defined(O_NONBLOCK)
  {   /* ScmObj d1997 */
    SCM_UNBOUND,
  },
#endif /*defined(O_NONBLOCK)*/
#if defined(O_NOFOLLOW)
  {   /* ScmObj d1995 */
    SCM_UNBOUND,
  },
#endif /*defined(O_NOFOLLOW)*/
#if defined(O_NOCTTY)
  {   /* ScmObj d1993 */
    SCM_UNBOUND,
  },
#endif /*defined(O_NOCTTY)*/
#if defined(O_CLOEXEC)
  {   /* ScmObj d1991 */
    SCM_UNBOUND,
  },
#endif /*defined(O_CLOEXEC)*/
#if defined(FD_CLOEXEC)
  {   /* ScmObj d1989 */
    SCM_UNBOUND,
  },
#endif /*defined(FD_CLOEXEC)*/
#if defined(F_NOTIFY)
  {   /* ScmObj d1987 */
    SCM_UNBOUND,
    SCM_UNBOUND,
    SCM_UNBOUND,
    SCM_UNBOUND,
    SCM_UNBOUND,
    SCM_UNBOUND,
    SCM_UNBOUND,
    SCM_UNBOUND,
  },
#endif /*defined(F_NOTIFY)*/
#if defined(F_SETLEASE)
  {   /* ScmObj d1985 */
    SCM_UNBOUND,
  },
#endif /*defined(F_SETLEASE)*/
#if defined(F_GETLEASE)
  {   /* ScmObj d1983 */
    SCM_UNBOUND,
  },
#endif /*defined(F_GETLEASE)*/
#if defined(F_SETSIG)
  {   /* ScmObj d1981 */
    SCM_UNBOUND,
  },
#endif /*defined(F_SETSIG)*/
#if defined(F_GETSIG)
  {   /* ScmObj d1979 */
    SCM_UNBOUND,
  },
#endif /*defined(F_GETSIG)*/
#if defined(F_SETOWN)
  {   /* ScmObj d1977 */
    SCM_UNBOUND,
  },
#endif /*defined(F_SETOWN)*/
#if defined(F_GETOWN)
  {   /* ScmObj d1975 */
    SCM_UNBOUND,
  },
#endif /*defined(F_GETOWN)*/
  {   /* ScmObj d1964 */
    SCM_UNBOUND,
    SCM_UNBOUND,
    SCM_UNBOUND,
    SCM_UNBOUND,
    SCM_UNBOUND,
    SCM_UNBOUND,
    SCM_UNBOUND,
    SCM_UNBOUND,
    SCM_UNBOUND,
    SCM_UNBOUND,
    SCM_UNBOUND,
    SCM_UNBOUND,
    SCM_UNBOUND,
    SCM_UNBOUND,
    SCM_UNBOUND,
    SCM_UNBOUND,
    SCM_UNBOUND,
    SCM_UNBOUND,
    SCM_UNBOUND,
    SCM_UNBOUND,
    SCM_UNBOUND,
    SCM_UNBOUND,
    SCM_UNBOUND,
    SCM_UNBOUND,
    SCM_UNBOUND,
    SCM_UNBOUND,
    SCM_UNBOUND,
    SCM_UNBOUND,
    SCM_UNBOUND,
    SCM_UNBOUND,
    SCM_UNBOUND,
    SCM_UNBOUND,
    SCM_UNBOUND,
    SCM_UNBOUND,
  },
};
static ScmObj gauche_2d_2dfcntlsys_fcntl(ScmObj *SCM_FP SCM_UNUSED, int SCM_ARGCNT SCM_UNUSED, void *data_ SCM_UNUSED)
{
  ScmObj port_or_fd_scm;
  ScmObj port_or_fd;
  ScmObj op_scm;
  ScmSmallInt op;
  ScmObj arg_scm;
  ScmObj arg;
  ScmObj SCM_SUBRARGS[4];
  SCM_ENTER_SUBR("sys-fcntl");
  if (SCM_ARGCNT >= 4
      && !SCM_NULLP(SCM_ARGREF(SCM_ARGCNT-1)))
    Scm_Error("too many arguments: up to 3 is expected, %d given.", SCM_ARGCNT + Scm_Length(SCM_ARGREF(SCM_ARGCNT-1)) - 1);
  for (int SCM_i=0; SCM_i<4; SCM_i++) {
    SCM_SUBRARGS[SCM_i] = SCM_ARGREF(SCM_i);
  }
  port_or_fd_scm = SCM_SUBRARGS[0];
  port_or_fd = (port_or_fd_scm);
  op_scm = SCM_SUBRARGS[1];
  if (!SCM_INTP(op_scm)) Scm_Error("small integer required, but got %S", op_scm);
  op = SCM_INT_VALUE(op_scm);
  if (SCM_ARGCNT > 2+1) {
    arg_scm = SCM_SUBRARGS[2];
  } else {
    arg_scm = SCM_UNBOUND;
  }
  arg = (arg_scm);
  {
{
ScmObj SCM_RESULT;
{SCM_RESULT=(Scm_SysFcntl(port_or_fd,op,arg));goto SCM_STUB_RETURN;}
goto SCM_STUB_RETURN;
SCM_STUB_RETURN:
SCM_RETURN(SCM_OBJ_SAFE(SCM_RESULT));
}
  }
}

static ScmObj gauche_2d_2dfcntlsys_open(ScmObj *SCM_FP SCM_UNUSED, int SCM_ARGCNT SCM_UNUSED, void *data_ SCM_UNUSED)
{
  ScmObj path_scm;
  const char * path;
  ScmObj flags_scm;
  int flags;
  ScmObj mode_scm;
  u_long mode;
  ScmObj SCM_SUBRARGS[4];
  SCM_ENTER_SUBR("sys-open");
  if (SCM_ARGCNT >= 4
      && !SCM_NULLP(SCM_ARGREF(SCM_ARGCNT-1)))
    Scm_Error("too many arguments: up to 3 is expected, %d given.", SCM_ARGCNT + Scm_Length(SCM_ARGREF(SCM_ARGCNT-1)) - 1);
  for (int SCM_i=0; SCM_i<4; SCM_i++) {
    SCM_SUBRARGS[SCM_i] = SCM_ARGREF(SCM_i);
  }
  path_scm = SCM_SUBRARGS[0];
  if (!SCM_STRINGP(path_scm)) Scm_Error("const C string required, but got %S", path_scm);
  path = SCM_STRING_CONST_CSTRING(path_scm);
  flags_scm = SCM_SUBRARGS[1];
  if (!SCM_INTEGERP(flags_scm)) Scm_Error("C integer required, but got %S", flags_scm);
  flags = Scm_GetInteger(flags_scm);
  if (SCM_ARGCNT > 2+1) {
    mode_scm = SCM_SUBRARGS[2];
  } else {
    mode_scm = SCM_MAKE_INT(436U);
  }
  if (!SCM_UINTEGERP(mode_scm)) Scm_Error("C integer required, but got %S", mode_scm);
  mode = Scm_GetIntegerU(mode_scm);
  {
{
int SCM_RESULT;

#line 123 "./fcntl.scm"
{int fd=0;
SCM_SYSCALL(fd,open(path,flags,mode));
if ((fd)<(0)){{
Scm_SysError("open failed");}}
{SCM_RESULT=(fd);goto SCM_STUB_RETURN;}}
goto SCM_STUB_RETURN;
SCM_STUB_RETURN:
SCM_RETURN(Scm_MakeInteger(SCM_RESULT));
}
  }
}

#if defined(HAVE_SYS_STATVFS_H)
SCM_DEFINE_BUILTIN_CLASS(Scm_SysStatvfsClass, NULL, NULL, NULL, NULL, SCM_CLASS_DEFAULT_CPL);

static ScmObj Scm_SysStatvfsClass_bsize_GET(ScmObj OBJARG)
{
  ScmSysStatvfs* obj = SCM_SYS_STATVFS(OBJARG);
return Scm_MakeIntegerU(obj->vfs.f_bsize);
}

static ScmObj Scm_SysStatvfsClass_frsize_GET(ScmObj OBJARG)
{
  ScmSysStatvfs* obj = SCM_SYS_STATVFS(OBJARG);
return Scm_MakeIntegerU(obj->vfs.f_frsize);
}

static ScmObj Scm_SysStatvfsClass_blocks_GET(ScmObj OBJARG)
{
  ScmSysStatvfs* obj = SCM_SYS_STATVFS(OBJARG);
return Scm_OffsetToInteger(obj->vfs.f_blocks);
}

static ScmObj Scm_SysStatvfsClass_bfree_GET(ScmObj OBJARG)
{
  ScmSysStatvfs* obj = SCM_SYS_STATVFS(OBJARG);
return Scm_OffsetToInteger(obj->vfs.f_bfree);
}

static ScmObj Scm_SysStatvfsClass_bavail_GET(ScmObj OBJARG)
{
  ScmSysStatvfs* obj = SCM_SYS_STATVFS(OBJARG);
return Scm_OffsetToInteger(obj->vfs.f_bavail);
}

static ScmObj Scm_SysStatvfsClass_files_GET(ScmObj OBJARG)
{
  ScmSysStatvfs* obj = SCM_SYS_STATVFS(OBJARG);
return Scm_OffsetToInteger(obj->vfs.f_files);
}

static ScmObj Scm_SysStatvfsClass_ffree_GET(ScmObj OBJARG)
{
  ScmSysStatvfs* obj = SCM_SYS_STATVFS(OBJARG);
return Scm_OffsetToInteger(obj->vfs.f_ffree);
}

static ScmObj Scm_SysStatvfsClass_favail_GET(ScmObj OBJARG)
{
  ScmSysStatvfs* obj = SCM_SYS_STATVFS(OBJARG);
return Scm_OffsetToInteger(obj->vfs.f_favail);
}

static ScmObj Scm_SysStatvfsClass_fsid_GET(ScmObj OBJARG)
{
  ScmSysStatvfs* obj = SCM_SYS_STATVFS(OBJARG);
return Scm_MakeIntegerU(obj->vfs.f_fsid);
}

static ScmObj Scm_SysStatvfsClass_flag_GET(ScmObj OBJARG)
{
  ScmSysStatvfs* obj = SCM_SYS_STATVFS(OBJARG);
return Scm_MakeIntegerU(obj->vfs.f_flag);
}

static ScmObj Scm_SysStatvfsClass_namemax_GET(ScmObj OBJARG)
{
  ScmSysStatvfs* obj = SCM_SYS_STATVFS(OBJARG);
return Scm_MakeIntegerU(obj->vfs.f_namemax);
}

static ScmClassStaticSlotSpec Scm_SysStatvfsClass__SLOTS[] = {
  SCM_CLASS_SLOT_SPEC("bsize", Scm_SysStatvfsClass_bsize_GET, NULL),
  SCM_CLASS_SLOT_SPEC("frsize", Scm_SysStatvfsClass_frsize_GET, NULL),
  SCM_CLASS_SLOT_SPEC("blocks", Scm_SysStatvfsClass_blocks_GET, NULL),
  SCM_CLASS_SLOT_SPEC("bfree", Scm_SysStatvfsClass_bfree_GET, NULL),
  SCM_CLASS_SLOT_SPEC("bavail", Scm_SysStatvfsClass_bavail_GET, NULL),
  SCM_CLASS_SLOT_SPEC("files", Scm_SysStatvfsClass_files_GET, NULL),
  SCM_CLASS_SLOT_SPEC("ffree", Scm_SysStatvfsClass_ffree_GET, NULL),
  SCM_CLASS_SLOT_SPEC("favail", Scm_SysStatvfsClass_favail_GET, NULL),
  SCM_CLASS_SLOT_SPEC("fsid", Scm_SysStatvfsClass_fsid_GET, NULL),
  SCM_CLASS_SLOT_SPEC("flag", Scm_SysStatvfsClass_flag_GET, NULL),
  SCM_CLASS_SLOT_SPEC("namemax", Scm_SysStatvfsClass_namemax_GET, NULL),
  SCM_CLASS_SLOT_SPEC_END()
};

#endif /* defined(HAVE_SYS_STATVFS_H) */
#if defined(HAVE_SYS_STATVFS_H)
static ScmObj gauche_2d_2dfcntlsys_statvfs(ScmObj *SCM_FP SCM_UNUSED, int SCM_ARGCNT SCM_UNUSED, void *data_ SCM_UNUSED)
{
  ScmObj path_scm;
  const char * path;
  ScmObj SCM_SUBRARGS[1];
  SCM_ENTER_SUBR("sys-statvfs");
  for (int SCM_i=0; SCM_i<1; SCM_i++) {
    SCM_SUBRARGS[SCM_i] = SCM_ARGREF(SCM_i);
  }
  path_scm = SCM_SUBRARGS[0];
  if (!SCM_STRINGP(path_scm)) Scm_Error("const C string required, but got %S", path_scm);
  path = SCM_STRING_CONST_CSTRING(path_scm);
  {
{
ScmObj SCM_RESULT;

#line 160 "./fcntl.scm"
{ScmSysStatvfs* vfs=SCM_NEW(ScmSysStatvfs);int r=0;
#line 162 "./fcntl.scm"
SCM_SET_CLASS(vfs,SCM_CLASS_SYS_STATVFS);
SCM_SYSCALL(r,statvfs(path,&((vfs)->vfs)));
if ((r)<(0)){{Scm_SysError("statvfs failed on %s",path);}}
{SCM_RESULT=(SCM_OBJ(vfs));goto SCM_STUB_RETURN;}}
goto SCM_STUB_RETURN;
SCM_STUB_RETURN:
SCM_RETURN(SCM_OBJ_SAFE(SCM_RESULT));
}
  }
}

#endif /* defined(HAVE_SYS_STATVFS_H) */
#if defined(HAVE_SYS_STATVFS_H)
static ScmObj gauche_2d_2dfcntlsys_fstatvfs(ScmObj *SCM_FP SCM_UNUSED, int SCM_ARGCNT SCM_UNUSED, void *data_ SCM_UNUSED)
{
  ScmObj port_or_fd_scm;
  ScmObj port_or_fd;
  ScmObj SCM_SUBRARGS[1];
  SCM_ENTER_SUBR("sys-fstatvfs");
  for (int SCM_i=0; SCM_i<1; SCM_i++) {
    SCM_SUBRARGS[SCM_i] = SCM_ARGREF(SCM_i);
  }
  port_or_fd_scm = SCM_SUBRARGS[0];
  port_or_fd = (port_or_fd_scm);
  {
{
ScmObj SCM_RESULT;

#line 168 "./fcntl.scm"
{ScmSysStatvfs* vfs=SCM_NEW(ScmSysStatvfs);int fd=
Scm_GetPortFd(port_or_fd,FALSE);int r=0;
#line 171 "./fcntl.scm"
SCM_SET_CLASS(vfs,SCM_CLASS_SYS_STATVFS);
if ((fd)<(0)){{SCM_RESULT=(SCM_FALSE);goto SCM_STUB_RETURN;}} else {
SCM_SYSCALL(r,fstatvfs(fd,&((vfs)->vfs)));
if ((r)<(0)){{Scm_SysError("fstatvfs failed for %d",fd);}}
{SCM_RESULT=(SCM_OBJ(vfs));goto SCM_STUB_RETURN;}}}
goto SCM_STUB_RETURN;
SCM_STUB_RETURN:
SCM_RETURN(SCM_OBJ_SAFE(SCM_RESULT));
}
  }
}

#endif /* defined(HAVE_SYS_STATVFS_H) */

static ScmCompiledCode *toplevels[] = {
 NULL /*termination*/
};
SCM_EXTENSION_ENTRY void Scm_Init_gauche__fcntl() {
   Scm_SelectModule(SCM_MODULE(SCM_OBJ(Scm_GaucheModule())));
SCM_INIT_EXTENSION(fcntl);
  scm__rc.d1964[1] = Scm_MakeSymbol(SCM_STRING(SCM_OBJ(&scm__sc.d1965[0])),TRUE); /* gauche.fcntl */
  scm__rc.d1964[0] = SCM_OBJ(Scm_FindModule(SCM_SYMBOL(scm__rc.d1964[1]), SCM_FIND_MODULE_CREATE)); /* module gauche.fcntl */
   Scm_SelectModule(SCM_MODULE(scm__rc.d1964[0]));
   Scm_SelectModule(SCM_MODULE(SCM_OBJ(Scm_GaucheModule())));
   Scm_SelectModule(SCM_MODULE(scm__rc.d1964[0]));
  scm__rc.d1964[2] = Scm_MakeSymbol(SCM_STRING(SCM_OBJ(&scm__sc.d1965[1])),TRUE); /* F_DUPFD */
  Scm_MakeBinding(SCM_MODULE(scm__rc.d1964[0]), SCM_SYMBOL(scm__rc.d1964[2]), Scm_MakeInteger(F_DUPFD), SCM_BINDING_CONST);

  scm__rc.d1964[3] = Scm_MakeSymbol(SCM_STRING(SCM_OBJ(&scm__sc.d1965[2])),TRUE); /* F_GETFD */
  Scm_MakeBinding(SCM_MODULE(scm__rc.d1964[0]), SCM_SYMBOL(scm__rc.d1964[3]), Scm_MakeInteger(F_GETFD), SCM_BINDING_CONST);

  scm__rc.d1964[4] = Scm_MakeSymbol(SCM_STRING(SCM_OBJ(&scm__sc.d1965[3])),TRUE); /* F_SETFD */
  Scm_MakeBinding(SCM_MODULE(scm__rc.d1964[0]), SCM_SYMBOL(scm__rc.d1964[4]), Scm_MakeInteger(F_SETFD), SCM_BINDING_CONST);

  scm__rc.d1964[5] = Scm_MakeSymbol(SCM_STRING(SCM_OBJ(&scm__sc.d1965[4])),TRUE); /* F_GETFL */
  Scm_MakeBinding(SCM_MODULE(scm__rc.d1964[0]), SCM_SYMBOL(scm__rc.d1964[5]), Scm_MakeInteger(F_GETFL), SCM_BINDING_CONST);

  scm__rc.d1964[6] = Scm_MakeSymbol(SCM_STRING(SCM_OBJ(&scm__sc.d1965[5])),TRUE); /* F_SETFL */
  Scm_MakeBinding(SCM_MODULE(scm__rc.d1964[0]), SCM_SYMBOL(scm__rc.d1964[6]), Scm_MakeInteger(F_SETFL), SCM_BINDING_CONST);

  scm__rc.d1964[7] = Scm_MakeSymbol(SCM_STRING(SCM_OBJ(&scm__sc.d1965[6])),TRUE); /* F_GETLK */
  Scm_MakeBinding(SCM_MODULE(scm__rc.d1964[0]), SCM_SYMBOL(scm__rc.d1964[7]), Scm_MakeInteger(F_GETLK), SCM_BINDING_CONST);

  scm__rc.d1964[8] = Scm_MakeSymbol(SCM_STRING(SCM_OBJ(&scm__sc.d1965[7])),TRUE); /* F_SETLK */
  Scm_MakeBinding(SCM_MODULE(scm__rc.d1964[0]), SCM_SYMBOL(scm__rc.d1964[8]), Scm_MakeInteger(F_SETLK), SCM_BINDING_CONST);

  scm__rc.d1964[9] = Scm_MakeSymbol(SCM_STRING(SCM_OBJ(&scm__sc.d1965[8])),TRUE); /* F_SETLKW */
  Scm_MakeBinding(SCM_MODULE(scm__rc.d1964[0]), SCM_SYMBOL(scm__rc.d1964[9]), Scm_MakeInteger(F_SETLKW), SCM_BINDING_CONST);

  scm__rc.d1964[10] = Scm_MakeSymbol(SCM_STRING(SCM_OBJ(&scm__sc.d1965[9])),TRUE); /* F_RDLCK */
  Scm_MakeBinding(SCM_MODULE(scm__rc.d1964[0]), SCM_SYMBOL(scm__rc.d1964[10]), Scm_MakeInteger(F_RDLCK), SCM_BINDING_CONST);

  scm__rc.d1964[11] = Scm_MakeSymbol(SCM_STRING(SCM_OBJ(&scm__sc.d1965[10])),TRUE); /* F_WRLCK */
  Scm_MakeBinding(SCM_MODULE(scm__rc.d1964[0]), SCM_SYMBOL(scm__rc.d1964[11]), Scm_MakeInteger(F_WRLCK), SCM_BINDING_CONST);

  scm__rc.d1964[12] = Scm_MakeSymbol(SCM_STRING(SCM_OBJ(&scm__sc.d1965[11])),TRUE); /* F_UNLCK */
  Scm_MakeBinding(SCM_MODULE(scm__rc.d1964[0]), SCM_SYMBOL(scm__rc.d1964[12]), Scm_MakeInteger(F_UNLCK), SCM_BINDING_CONST);

#if defined(F_GETOWN)
  scm__rc.d1975[0] = Scm_MakeSymbol(SCM_STRING(SCM_OBJ(&scm__sc.d1976[0])),TRUE); /* F_GETOWN */
#endif /* defined(F_GETOWN) */
#if defined(F_GETOWN)
  Scm_MakeBinding(SCM_MODULE(scm__rc.d1964[0]), SCM_SYMBOL(scm__rc.d1975[0]), Scm_MakeInteger(F_GETOWN), SCM_BINDING_CONST);

#endif /* defined(F_GETOWN) */
#if defined(F_SETOWN)
  scm__rc.d1977[0] = Scm_MakeSymbol(SCM_STRING(SCM_OBJ(&scm__sc.d1978[0])),TRUE); /* F_SETOWN */
#endif /* defined(F_SETOWN) */
#if defined(F_SETOWN)
  Scm_MakeBinding(SCM_MODULE(scm__rc.d1964[0]), SCM_SYMBOL(scm__rc.d1977[0]), Scm_MakeInteger(F_SETOWN), SCM_BINDING_CONST);

#endif /* defined(F_SETOWN) */
#if defined(F_GETSIG)
  scm__rc.d1979[0] = Scm_MakeSymbol(SCM_STRING(SCM_OBJ(&scm__sc.d1980[0])),TRUE); /* F_GETSIG */
#endif /* defined(F_GETSIG) */
#if defined(F_GETSIG)
  Scm_MakeBinding(SCM_MODULE(scm__rc.d1964[0]), SCM_SYMBOL(scm__rc.d1979[0]), Scm_MakeInteger(F_GETSIG), SCM_BINDING_CONST);

#endif /* defined(F_GETSIG) */
#if defined(F_SETSIG)
  scm__rc.d1981[0] = Scm_MakeSymbol(SCM_STRING(SCM_OBJ(&scm__sc.d1982[0])),TRUE); /* F_SETSIG */
#endif /* defined(F_SETSIG) */
#if defined(F_SETSIG)
  Scm_MakeBinding(SCM_MODULE(scm__rc.d1964[0]), SCM_SYMBOL(scm__rc.d1981[0]), Scm_MakeInteger(F_SETSIG), SCM_BINDING_CONST);

#endif /* defined(F_SETSIG) */
#if defined(F_GETLEASE)
  scm__rc.d1983[0] = Scm_MakeSymbol(SCM_STRING(SCM_OBJ(&scm__sc.d1984[0])),TRUE); /* F_GETLEASE */
#endif /* defined(F_GETLEASE) */
#if defined(F_GETLEASE)
  Scm_MakeBinding(SCM_MODULE(scm__rc.d1964[0]), SCM_SYMBOL(scm__rc.d1983[0]), Scm_MakeInteger(F_GETLEASE), SCM_BINDING_CONST);

#endif /* defined(F_GETLEASE) */
#if defined(F_SETLEASE)
  scm__rc.d1985[0] = Scm_MakeSymbol(SCM_STRING(SCM_OBJ(&scm__sc.d1986[0])),TRUE); /* F_SETLEASE */
#endif /* defined(F_SETLEASE) */
#if defined(F_SETLEASE)
  Scm_MakeBinding(SCM_MODULE(scm__rc.d1964[0]), SCM_SYMBOL(scm__rc.d1985[0]), Scm_MakeInteger(F_SETLEASE), SCM_BINDING_CONST);

#endif /* defined(F_SETLEASE) */
#if defined(F_NOTIFY)
  scm__rc.d1987[0] = Scm_MakeSymbol(SCM_STRING(SCM_OBJ(&scm__sc.d1988[0])),TRUE); /* F_NOTIFY */
#endif /* defined(F_NOTIFY) */
#if defined(F_NOTIFY)
  Scm_MakeBinding(SCM_MODULE(scm__rc.d1964[0]), SCM_SYMBOL(scm__rc.d1987[0]), Scm_MakeInteger(F_NOTIFY), SCM_BINDING_CONST);

#endif /* defined(F_NOTIFY) */
#if defined(FD_CLOEXEC)
  scm__rc.d1989[0] = Scm_MakeSymbol(SCM_STRING(SCM_OBJ(&scm__sc.d1990[0])),TRUE); /* FD_CLOEXEC */
#endif /* defined(FD_CLOEXEC) */
#if defined(FD_CLOEXEC)
  Scm_MakeBinding(SCM_MODULE(scm__rc.d1964[0]), SCM_SYMBOL(scm__rc.d1989[0]), Scm_MakeInteger(FD_CLOEXEC), SCM_BINDING_CONST);

#endif /* defined(FD_CLOEXEC) */
  scm__rc.d1964[13] = Scm_MakeSymbol(SCM_STRING(SCM_OBJ(&scm__sc.d1965[12])),TRUE); /* O_ACCMODE */
  Scm_MakeBinding(SCM_MODULE(scm__rc.d1964[0]), SCM_SYMBOL(scm__rc.d1964[13]), Scm_MakeInteger(O_ACCMODE), SCM_BINDING_CONST);

  scm__rc.d1964[14] = Scm_MakeSymbol(SCM_STRING(SCM_OBJ(&scm__sc.d1965[13])),TRUE); /* O_RDONLY */
  Scm_MakeBinding(SCM_MODULE(scm__rc.d1964[0]), SCM_SYMBOL(scm__rc.d1964[14]), Scm_MakeInteger(O_RDONLY), SCM_BINDING_CONST);

  scm__rc.d1964[15] = Scm_MakeSymbol(SCM_STRING(SCM_OBJ(&scm__sc.d1965[14])),TRUE); /* O_WRONLY */
  Scm_MakeBinding(SCM_MODULE(scm__rc.d1964[0]), SCM_SYMBOL(scm__rc.d1964[15]), Scm_MakeInteger(O_WRONLY), SCM_BINDING_CONST);

  scm__rc.d1964[16] = Scm_MakeSymbol(SCM_STRING(SCM_OBJ(&scm__sc.d1965[15])),TRUE); /* O_RDWR */
  Scm_MakeBinding(SCM_MODULE(scm__rc.d1964[0]), SCM_SYMBOL(scm__rc.d1964[16]), Scm_MakeInteger(O_RDWR), SCM_BINDING_CONST);

  scm__rc.d1964[17] = Scm_MakeSymbol(SCM_STRING(SCM_OBJ(&scm__sc.d1965[16])),TRUE); /* O_APPEND */
  Scm_MakeBinding(SCM_MODULE(scm__rc.d1964[0]), SCM_SYMBOL(scm__rc.d1964[17]), Scm_MakeInteger(O_APPEND), SCM_BINDING_CONST);

  scm__rc.d1964[18] = Scm_MakeSymbol(SCM_STRING(SCM_OBJ(&scm__sc.d1965[17])),TRUE); /* O_CREAT */
  Scm_MakeBinding(SCM_MODULE(scm__rc.d1964[0]), SCM_SYMBOL(scm__rc.d1964[18]), Scm_MakeInteger(O_CREAT), SCM_BINDING_CONST);

  scm__rc.d1964[19] = Scm_MakeSymbol(SCM_STRING(SCM_OBJ(&scm__sc.d1965[18])),TRUE); /* O_EXCL */
  Scm_MakeBinding(SCM_MODULE(scm__rc.d1964[0]), SCM_SYMBOL(scm__rc.d1964[19]), Scm_MakeInteger(O_EXCL), SCM_BINDING_CONST);

  scm__rc.d1964[20] = Scm_MakeSymbol(SCM_STRING(SCM_OBJ(&scm__sc.d1965[19])),TRUE); /* O_TRUNC */
  Scm_MakeBinding(SCM_MODULE(scm__rc.d1964[0]), SCM_SYMBOL(scm__rc.d1964[20]), Scm_MakeInteger(O_TRUNC), SCM_BINDING_CONST);

#if defined(O_CLOEXEC)
  scm__rc.d1991[0] = Scm_MakeSymbol(SCM_STRING(SCM_OBJ(&scm__sc.d1992[0])),TRUE); /* O_CLOEXEC */
#endif /* defined(O_CLOEXEC) */
#if defined(O_CLOEXEC)
  Scm_MakeBinding(SCM_MODULE(scm__rc.d1964[0]), SCM_SYMBOL(scm__rc.d1991[0]), Scm_MakeInteger(O_CLOEXEC), SCM_BINDING_CONST);

#endif /* defined(O_CLOEXEC) */
#if defined(O_NOCTTY)
  scm__rc.d1993[0] = Scm_MakeSymbol(SCM_STRING(SCM_OBJ(&scm__sc.d1994[0])),TRUE); /* O_NOCTTY */
#endif /* defined(O_NOCTTY) */
#if defined(O_NOCTTY)
  Scm_MakeBinding(SCM_MODULE(scm__rc.d1964[0]), SCM_SYMBOL(scm__rc.d1993[0]), Scm_MakeInteger(O_NOCTTY), SCM_BINDING_CONST);

#endif /* defined(O_NOCTTY) */
#if defined(O_NOFOLLOW)
  scm__rc.d1995[0] = Scm_MakeSymbol(SCM_STRING(SCM_OBJ(&scm__sc.d1996[0])),TRUE); /* O_NOFOLLOW */
#endif /* defined(O_NOFOLLOW) */
#if defined(O_NOFOLLOW)
  Scm_MakeBinding(SCM_MODULE(scm__rc.d1964[0]), SCM_SYMBOL(scm__rc.d1995[0]), Scm_MakeInteger(O_NOFOLLOW), SCM_BINDING_CONST);

#endif /* defined(O_NOFOLLOW) */
#if defined(O_NONBLOCK)
  scm__rc.d1997[0] = Scm_MakeSymbol(SCM_STRING(SCM_OBJ(&scm__sc.d1998[0])),TRUE); /* O_NONBLOCK */
#endif /* defined(O_NONBLOCK) */
#if defined(O_NONBLOCK)
  Scm_MakeBinding(SCM_MODULE(scm__rc.d1964[0]), SCM_SYMBOL(scm__rc.d1997[0]), Scm_MakeInteger(O_NONBLOCK), SCM_BINDING_CONST);

#endif /* defined(O_NONBLOCK) */
#if defined(O_ASYNC)
  scm__rc.d1999[0] = Scm_MakeSymbol(SCM_STRING(SCM_OBJ(&scm__sc.d2000[0])),TRUE); /* O_ASYNC */
#endif /* defined(O_ASYNC) */
#if defined(O_ASYNC)
  Scm_MakeBinding(SCM_MODULE(scm__rc.d1964[0]), SCM_SYMBOL(scm__rc.d1999[0]), Scm_MakeInteger(O_ASYNC), SCM_BINDING_CONST);

#endif /* defined(O_ASYNC) */
#if defined(F_NOTIFY)
  scm__rc.d1987[1] = Scm_MakeSymbol(SCM_STRING(SCM_OBJ(&scm__sc.d1988[1])),TRUE); /* DN_ACCESS */
#endif /* defined(F_NOTIFY) */
#if defined(F_NOTIFY)
  Scm_MakeBinding(SCM_MODULE(scm__rc.d1964[0]), SCM_SYMBOL(scm__rc.d1987[1]), Scm_MakeInteger(DN_ACCESS), SCM_BINDING_CONST);

#endif /* defined(F_NOTIFY) */
#if defined(F_NOTIFY)
  scm__rc.d1987[2] = Scm_MakeSymbol(SCM_STRING(SCM_OBJ(&scm__sc.d1988[2])),TRUE); /* DN_MODIFY */
#endif /* defined(F_NOTIFY) */
#if defined(F_NOTIFY)
  Scm_MakeBinding(SCM_MODULE(scm__rc.d1964[0]), SCM_SYMBOL(scm__rc.d1987[2]), Scm_MakeInteger(DN_MODIFY), SCM_BINDING_CONST);

#endif /* defined(F_NOTIFY) */
#if defined(F_NOTIFY)
  scm__rc.d1987[3] = Scm_MakeSymbol(SCM_STRING(SCM_OBJ(&scm__sc.d1988[3])),TRUE); /* DN_CREATE */
#endif /* defined(F_NOTIFY) */
#if defined(F_NOTIFY)
  Scm_MakeBinding(SCM_MODULE(scm__rc.d1964[0]), SCM_SYMBOL(scm__rc.d1987[3]), Scm_MakeInteger(DN_CREATE), SCM_BINDING_CONST);

#endif /* defined(F_NOTIFY) */
#if defined(F_NOTIFY)
  scm__rc.d1987[4] = Scm_MakeSymbol(SCM_STRING(SCM_OBJ(&scm__sc.d1988[4])),TRUE); /* DN_DELETE */
#endif /* defined(F_NOTIFY) */
#if defined(F_NOTIFY)
  Scm_MakeBinding(SCM_MODULE(scm__rc.d1964[0]), SCM_SYMBOL(scm__rc.d1987[4]), Scm_MakeInteger(DN_DELETE), SCM_BINDING_CONST);

#endif /* defined(F_NOTIFY) */
#if defined(F_NOTIFY)
  scm__rc.d1987[5] = Scm_MakeSymbol(SCM_STRING(SCM_OBJ(&scm__sc.d1988[5])),TRUE); /* DN_RENAME */
#endif /* defined(F_NOTIFY) */
#if defined(F_NOTIFY)
  Scm_MakeBinding(SCM_MODULE(scm__rc.d1964[0]), SCM_SYMBOL(scm__rc.d1987[5]), Scm_MakeInteger(DN_RENAME), SCM_BINDING_CONST);

#endif /* defined(F_NOTIFY) */
#if defined(F_NOTIFY)
  scm__rc.d1987[6] = Scm_MakeSymbol(SCM_STRING(SCM_OBJ(&scm__sc.d1988[6])),TRUE); /* DN_ATTRIB */
#endif /* defined(F_NOTIFY) */
#if defined(F_NOTIFY)
  Scm_MakeBinding(SCM_MODULE(scm__rc.d1964[0]), SCM_SYMBOL(scm__rc.d1987[6]), Scm_MakeInteger(DN_ATTRIB), SCM_BINDING_CONST);

#endif /* defined(F_NOTIFY) */
#if defined(F_NOTIFY)
  scm__rc.d1987[7] = Scm_MakeSymbol(SCM_STRING(SCM_OBJ(&scm__sc.d1988[7])),TRUE); /* DN_MULTISHOT */
#endif /* defined(F_NOTIFY) */
#if defined(F_NOTIFY)
  Scm_MakeBinding(SCM_MODULE(scm__rc.d1964[0]), SCM_SYMBOL(scm__rc.d1987[7]), Scm_MakeInteger(DN_MULTISHOT), SCM_BINDING_CONST);

#endif /* defined(F_NOTIFY) */
  scm__rc.d1964[21] = Scm_MakeSymbol(SCM_STRING(SCM_OBJ(&scm__sc.d1965[20])),TRUE); /* sys-fcntl */
  scm__rc.d1964[22] = Scm_MakeSymbol(SCM_STRING(SCM_OBJ(&scm__sc.d1965[21])),TRUE); /* port-or-fd */
  scm__rc.d1964[23] = Scm_MakeSymbol(SCM_STRING(SCM_OBJ(&scm__sc.d1965[22])),TRUE); /* op */
  scm__rc.d1964[24] = Scm_MakeKeyword(SCM_STRING(SCM_OBJ(&scm__sc.d1965[23]))); /* :optional */
  scm__rc.d1964[25] = Scm_MakeSymbol(SCM_STRING(SCM_OBJ(&scm__sc.d1965[24])),TRUE); /* arg */
  SCM_SET_CAR(SCM_OBJ(&scm__rc.d2001[1]), scm__rc.d1964[25]);
  SCM_SET_CAR(SCM_OBJ(&scm__rc.d2001[2]), scm__rc.d1964[24]);
  SCM_SET_CAR(SCM_OBJ(&scm__rc.d2001[3]), scm__rc.d1964[23]);
  SCM_SET_CAR(SCM_OBJ(&scm__rc.d2001[4]), scm__rc.d1964[22]);
  scm__rc.d1964[26] = Scm_MakeSymbol(SCM_STRING(SCM_OBJ(&scm__sc.d1965[25])),TRUE); /* source-info */
  SCM_SET_CAR(SCM_OBJ(&scm__rc.d2001[7]), scm__rc.d1964[26]);
  scm__rc.d1964[27] = Scm_MakeSymbol(SCM_STRING(SCM_OBJ(&scm__sc.d1965[27])),TRUE); /* bind-info */
  SCM_SET_CAR(SCM_OBJ(&scm__rc.d2001[8]), scm__rc.d1964[21]);
  SCM_SET_CAR(SCM_OBJ(&scm__rc.d2001[9]), scm__rc.d1964[1]);
  SCM_SET_CAR(SCM_OBJ(&scm__rc.d2001[10]), scm__rc.d1964[27]);
  scm__rc.d1964[28] = Scm_MakeExtendedPair(scm__rc.d1964[21], SCM_OBJ(&scm__rc.d2001[4]), SCM_OBJ(&scm__rc.d2001[12]));
  Scm_MakeBinding(SCM_MODULE(scm__rc.d1964[0]), SCM_SYMBOL(SCM_INTERN("sys-fcntl")), SCM_OBJ(&gauche_2d_2dfcntlsys_fcntl__STUB), 0);
  gauche_2d_2dfcntlsys_fcntl__STUB.common.info = scm__rc.d1964[28];
  scm__rc.d1964[29] = Scm_MakeSymbol(SCM_STRING(SCM_OBJ(&scm__sc.d1965[28])),TRUE); /* sys-open */
  scm__rc.d1964[30] = Scm_MakeSymbol(SCM_STRING(SCM_OBJ(&scm__sc.d1965[29])),TRUE); /* path */
  scm__rc.d1964[31] = Scm_MakeSymbol(SCM_STRING(SCM_OBJ(&scm__sc.d1965[30])),TRUE); /* flags */
  scm__rc.d1964[32] = Scm_MakeSymbol(SCM_STRING(SCM_OBJ(&scm__sc.d1965[31])),TRUE); /* mode */
  SCM_SET_CAR(SCM_OBJ(&scm__rc.d2001[13]), scm__rc.d1964[32]);
  SCM_SET_CAR(SCM_OBJ(&scm__rc.d2001[14]), scm__rc.d1964[24]);
  SCM_SET_CAR(SCM_OBJ(&scm__rc.d2001[15]), scm__rc.d1964[31]);
  SCM_SET_CAR(SCM_OBJ(&scm__rc.d2001[16]), scm__rc.d1964[30]);
  SCM_SET_CAR(SCM_OBJ(&scm__rc.d2001[19]), scm__rc.d1964[26]);
  SCM_SET_CAR(SCM_OBJ(&scm__rc.d2001[20]), scm__rc.d1964[29]);
  SCM_SET_CAR(SCM_OBJ(&scm__rc.d2001[21]), scm__rc.d1964[1]);
  SCM_SET_CAR(SCM_OBJ(&scm__rc.d2001[22]), scm__rc.d1964[27]);
  scm__rc.d1964[33] = Scm_MakeExtendedPair(scm__rc.d1964[29], SCM_OBJ(&scm__rc.d2001[16]), SCM_OBJ(&scm__rc.d2001[24]));
  Scm_MakeBinding(SCM_MODULE(scm__rc.d1964[0]), SCM_SYMBOL(SCM_INTERN("sys-open")), SCM_OBJ(&gauche_2d_2dfcntlsys_open__STUB), 0);
  gauche_2d_2dfcntlsys_open__STUB.common.info = scm__rc.d1964[33];
#if defined(HAVE_SYS_STATVFS_H)
  Scm_InitBuiltinClass(&Scm_SysStatvfsClass, "<sys-statvfs>", Scm_SysStatvfsClass__SLOTS, TRUE, SCM_MODULE(scm__rc.d1964[0]));
#endif /* defined(HAVE_SYS_STATVFS_H) */
#if defined(HAVE_SYS_STATVFS_H)
  scm__rc.d2003[0] = Scm_MakeSymbol(SCM_STRING(SCM_OBJ(&scm__sc.d2002[0])),TRUE); /* sys-statvfs */
#endif /* defined(HAVE_SYS_STATVFS_H) */
#if defined(HAVE_SYS_STATVFS_H)
  scm__rc.d2003[1] = Scm_MakeSymbol(SCM_STRING(SCM_OBJ(&scm__sc.d2002[1])),TRUE); /* path */
#endif /* defined(HAVE_SYS_STATVFS_H) */
#if defined(HAVE_SYS_STATVFS_H)
  SCM_SET_CAR(SCM_OBJ(&scm__rc.d2004[1]), scm__rc.d2003[1]);
#endif /* defined(HAVE_SYS_STATVFS_H) */
#if defined(HAVE_SYS_STATVFS_H)
  scm__rc.d2003[2] = Scm_MakeSymbol(SCM_STRING(SCM_OBJ(&scm__sc.d2002[2])),TRUE); /* source-info */
#endif /* defined(HAVE_SYS_STATVFS_H) */
#if defined(HAVE_SYS_STATVFS_H)
#endif /* defined(HAVE_SYS_STATVFS_H) */
#if defined(HAVE_SYS_STATVFS_H)
#endif /* defined(HAVE_SYS_STATVFS_H) */
#if defined(HAVE_SYS_STATVFS_H)
#endif /* defined(HAVE_SYS_STATVFS_H) */
#if defined(HAVE_SYS_STATVFS_H)
  SCM_SET_CAR(SCM_OBJ(&scm__rc.d2004[4]), scm__rc.d2003[2]);
#endif /* defined(HAVE_SYS_STATVFS_H) */
#if defined(HAVE_SYS_STATVFS_H)
  scm__rc.d2003[3] = Scm_MakeSymbol(SCM_STRING(SCM_OBJ(&scm__sc.d2002[4])),TRUE); /* bind-info */
#endif /* defined(HAVE_SYS_STATVFS_H) */
#if defined(HAVE_SYS_STATVFS_H)
  scm__rc.d2003[4] = Scm_MakeSymbol(SCM_STRING(SCM_OBJ(&scm__sc.d2002[5])),TRUE); /* gauche.fcntl */
#endif /* defined(HAVE_SYS_STATVFS_H) */
#if defined(HAVE_SYS_STATVFS_H)
  SCM_SET_CAR(SCM_OBJ(&scm__rc.d2004[5]), scm__rc.d2003[0]);
#endif /* defined(HAVE_SYS_STATVFS_H) */
#if defined(HAVE_SYS_STATVFS_H)
  SCM_SET_CAR(SCM_OBJ(&scm__rc.d2004[6]), scm__rc.d2003[4]);
#endif /* defined(HAVE_SYS_STATVFS_H) */
#if defined(HAVE_SYS_STATVFS_H)
  SCM_SET_CAR(SCM_OBJ(&scm__rc.d2004[7]), scm__rc.d2003[3]);
#endif /* defined(HAVE_SYS_STATVFS_H) */
#if defined(HAVE_SYS_STATVFS_H)
#endif /* defined(HAVE_SYS_STATVFS_H) */
#if defined(HAVE_SYS_STATVFS_H)
#endif /* defined(HAVE_SYS_STATVFS_H) */
#if defined(HAVE_SYS_STATVFS_H)
  scm__rc.d2003[5] = Scm_MakeExtendedPair(scm__rc.d2003[0], SCM_OBJ(&scm__rc.d2004[1]), SCM_OBJ(&scm__rc.d2004[9]));
#endif /* defined(HAVE_SYS_STATVFS_H) */
#if defined(HAVE_SYS_STATVFS_H)
  Scm_MakeBinding(SCM_MODULE(scm__rc.d1964[0]), SCM_SYMBOL(SCM_INTERN("sys-statvfs")), SCM_OBJ(&gauche_2d_2dfcntlsys_statvfs__STUB), 0);
  gauche_2d_2dfcntlsys_statvfs__STUB.common.info = scm__rc.d2003[5];
#endif /* defined(HAVE_SYS_STATVFS_H) */
#if defined(HAVE_SYS_STATVFS_H)
  scm__rc.d2003[6] = Scm_MakeSymbol(SCM_STRING(SCM_OBJ(&scm__sc.d2002[6])),TRUE); /* sys-fstatvfs */
#endif /* defined(HAVE_SYS_STATVFS_H) */
#if defined(HAVE_SYS_STATVFS_H)
  scm__rc.d2003[7] = Scm_MakeSymbol(SCM_STRING(SCM_OBJ(&scm__sc.d2002[7])),TRUE); /* port-or-fd */
#endif /* defined(HAVE_SYS_STATVFS_H) */
#if defined(HAVE_SYS_STATVFS_H)
  SCM_SET_CAR(SCM_OBJ(&scm__rc.d2004[10]), scm__rc.d2003[7]);
#endif /* defined(HAVE_SYS_STATVFS_H) */
#if defined(HAVE_SYS_STATVFS_H)
#endif /* defined(HAVE_SYS_STATVFS_H) */
#if defined(HAVE_SYS_STATVFS_H)
#endif /* defined(HAVE_SYS_STATVFS_H) */
#if defined(HAVE_SYS_STATVFS_H)
#endif /* defined(HAVE_SYS_STATVFS_H) */
#if defined(HAVE_SYS_STATVFS_H)
  SCM_SET_CAR(SCM_OBJ(&scm__rc.d2004[13]), scm__rc.d2003[2]);
#endif /* defined(HAVE_SYS_STATVFS_H) */
#if defined(HAVE_SYS_STATVFS_H)
  SCM_SET_CAR(SCM_OBJ(&scm__rc.d2004[14]), scm__rc.d2003[6]);
#endif /* defined(HAVE_SYS_STATVFS_H) */
#if defined(HAVE_SYS_STATVFS_H)
  SCM_SET_CAR(SCM_OBJ(&scm__rc.d2004[15]), scm__rc.d2003[4]);
#endif /* defined(HAVE_SYS_STATVFS_H) */
#if defined(HAVE_SYS_STATVFS_H)
  SCM_SET_CAR(SCM_OBJ(&scm__rc.d2004[16]), scm__rc.d2003[3]);
#endif /* defined(HAVE_SYS_STATVFS_H) */
#if defined(HAVE_SYS_STATVFS_H)
#endif /* defined(HAVE_SYS_STATVFS_H) */
#if defined(HAVE_SYS_STATVFS_H)
#endif /* defined(HAVE_SYS_STATVFS_H) */
#if defined(HAVE_SYS_STATVFS_H)
  scm__rc.d2003[8] = Scm_MakeExtendedPair(scm__rc.d2003[6], SCM_OBJ(&scm__rc.d2004[10]), SCM_OBJ(&scm__rc.d2004[18]));
#endif /* defined(HAVE_SYS_STATVFS_H) */
#if defined(HAVE_SYS_STATVFS_H)
  Scm_MakeBinding(SCM_MODULE(scm__rc.d1964[0]), SCM_SYMBOL(SCM_INTERN("sys-fstatvfs")), SCM_OBJ(&gauche_2d_2dfcntlsys_fstatvfs__STUB), 0);
  gauche_2d_2dfcntlsys_fstatvfs__STUB.common.info = scm__rc.d2003[8];
#endif /* defined(HAVE_SYS_STATVFS_H) */
#if defined(HAVE_SYS_STATVFS_H)
  scm__rc.d2003[9] = Scm_MakeSymbol(SCM_STRING(SCM_OBJ(&scm__sc.d2002[8])),TRUE); /* ST_NOSUID */
#endif /* defined(HAVE_SYS_STATVFS_H) */
#if defined(HAVE_SYS_STATVFS_H)
  Scm_MakeBinding(SCM_MODULE(scm__rc.d1964[0]), SCM_SYMBOL(scm__rc.d2003[9]), Scm_MakeInteger(ST_NOSUID), SCM_BINDING_CONST);

#endif /* defined(HAVE_SYS_STATVFS_H) */
#if defined(HAVE_SYS_STATVFS_H)
  scm__rc.d2003[10] = Scm_MakeSymbol(SCM_STRING(SCM_OBJ(&scm__sc.d2002[9])),TRUE); /* ST_RDONLY */
#endif /* defined(HAVE_SYS_STATVFS_H) */
#if defined(HAVE_SYS_STATVFS_H)
  Scm_MakeBinding(SCM_MODULE(scm__rc.d1964[0]), SCM_SYMBOL(scm__rc.d2003[10]), Scm_MakeInteger(ST_RDONLY), SCM_BINDING_CONST);

#endif /* defined(HAVE_SYS_STATVFS_H) */

#line 188 "./fcntl.scm"
Scm_Init_fcntl();
  Scm_VMExecuteToplevels(toplevels);
}
