#if (defined __ANDROID__)
# define ANDROID 1
#endif

# define O_RDONLY 0
# define O_WRONLY 1
# define O_RDWR 2

//# define SEEK_SET 0
//# define SEEK_CUR 1

# include  <stdlib.h>

int io_open (char * dir, char * filename, int mode);

long long io_read (int fd, char * buffer, long long size);
long long io_read (int fd, unsigned char * buffer, long long size);

void io_close (int fd);

long long io_lseek (int fd, long long pos, int mode);
int io_strcasecmp(char * s1, char * s2);
int io_strncasecmp (char * s1, char * s2, int n);

long long io_write (int fd, char * buffer, long long size);
long long io_write (int fd, unsigned char * buffer, long long size);

long long io_readline (int fd, char * buffer, long long size);
int io_eof (int fd);

int FileExists(char * filename);
long long size(char * filename);
int io_creat (char * dir, char * filename);

long long io_fgets (int fd, char * buffer, long long size);
int io_feof (int fd);

void MessageBoxErr(char * a);

void SetHomeDir(char *);

#if defined ANDROID


int abs (int);

//void * memcpy(void * ddest, const void * ssrc, unsigned int n);
//void * memset(void * dst0, int c0, unsigned int length);

char * strcpy(char *s1, char *s2);
unsigned int strlen(char * str);
//void * io_malloc (unsigned int size);
//void free (void *);
char * strncpy(char *s1, char *s2, int n);

//int rand (void);


//void sscanf (char *, char *, int *);

#endif