/**********************************************************************
 
	Copyright (C) 2003 Hirohisa MORI <joshua@nichibun.ac.jp>
 
	This program is free software; you can redistribute it 
	and/or modify it under the terms of the GLOBALBASE 
	Library General Public License (G-LGPL) as published by 

	http://www.globalbase.org/
 
	This program is distributed in the hope that it will be 
	useful, but WITHOUT ANY WARRANTY; without even the 
	implied warranty of MERCHANTABILITY or FITNESS FOR A 
	PARTICULAR PURPOSE.

**********************************************************************/

#define U_FILE_LIB

#include <stdio.h>
#include <errno.h>
#include <io.h>
#include <fcntl.h>
#include	"machine/include.h"
#include	"utils.h"

int
u_open(char * filename,int flags,int mode)
{
	// add O_BINARY by default
	return open(filename,flags|O_BINARY,mode);
}


int
u_close(int fd)
{
	return close(fd);
}

int
u_write(int fd,void * data,int len)
{
	return write(fd,data,len);
}

int
u_read(int fd,void * data,int len)
{
	return read(fd,data,len);
}

int
u_lseek(int fd,int where,int ofs)
{
	return lseek(fd,where,ofs);
}

