/**********************************************************************
 
	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.

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


#ifndef ___INCLUDE_H___
#define ___INCLUDE_H___

#include	<unistd.h>
#include	<dirent.h>
#ifdef VA2
#include	<varargs.h>
#else
#include	<stdarg.h>
#endif
#include	<stdlib.h>
#include	<string.h>
#include	<stdio.h>
#include	<fcntl.h>
#include	<math.h>

#include <strings.h>
#include <stdlib.h>
#include <fcntl.h>
#include <sys/time.h>
#include <sys/types.h>
#include <unistd.h>
#include <utime.h>

void bzero(void*,int);
int inet_addr(char * addr);

#ifndef INLINE
#define INLINE static __inline
#endif

#define INTEGER64	long long
#define U_INTEGER64	unsigned long long
#define CONST_INT64(val) (val##LL)
#define I64_FORMAT "%lli"


#if __MACH__
#define m_mkdir	mkdir
int strcasecmp(const char *s1, const char *s2);
#else

int ftruncate(int fd, int _len );

#endif

/*
int open64(char * filename,int flags,int mode);
INTEGER64 lseek64(int fd,INTEGER64 ofs,int where);
int ftruncate64(int fd, int _len );
*/
#define open64		open
#define lseek64		lseek
#define ftruncate64	ftruncate


/* inter machine sourcecode */

char * get_path_from_mac_fs(FSSpec inMacFSSpec, Boolean isFolder);
void DeleteAllServerMaster();

#if !__MACH__
int inet_addr(char * addr);
#endif

#define m_getcwd getcwd
#define m_utime utime

#define XLPATH_DELIM	";\t\n\r"

#endif
