File:  [ELWIX - Embedded LightWeight unIX -] / embedaddon / libxml2 / win32 / wince / wincecompat.h
Revision 1.1.1.1 (vendor branch): download - view: text, annotated - select for diffs - revision graph
Tue Feb 21 23:37:58 2012 UTC (12 years, 4 months ago) by misho
Branches: libxml2, MAIN
CVS tags: v2_9_1p0, v2_9_1, v2_8_0p0, v2_8_0, v2_7_8, HEAD
libxml2

/*
 * wincecompat.h : wince compatiblity header file 
 *
 * See Copyright for the status of this software.
 *
 * javier@tiresiassoft.com
 *
 * 17 Sep 2002  created
 */

#ifndef __WINCECOMPAT_H__
#define __WINCECOMPAT_H__

#include <stdio.h>
#include <winbase.h>

#define MAX_STRERROR 31

#define O_RDONLY       0x0000  /* open for reading only */
#define O_WRONLY       0x0001  /* open for writing only */
#define O_RDWR         0x0002  /* open for reading and writing */
#define O_APPEND       0x0008  /* writes done at eof */

#define O_CREAT        0x0100  /* create and open file */
#define O_TRUNC        0x0200  /* open and truncate */
#define O_EXCL         0x0400  /* open only if file doesn't already exist */

#define BUFSIZ 4096

extern int errno;
/* 
	Prototypes 
*/
int read(int handle, char *buffer, unsigned int len);
int write(int handle, const char *buffer, unsigned int len);
int open(const char *filename,int oflag, ...);
int close(int handle);
char *getenv( const char *varname );
char *getcwd( char *buffer, unsigned int size);
char *strerror(int errnum);

/*
	Macro'ed inexistant funtion names

*/
#define snprintf _snprintf
#define vsnprintf(b,c,f,a) _vsnprintf(b,c,f,a)
#define perror(_t) MessageBox(NULL, _T("_t"), _T("Error/Warning"), MB_OK)

#endif

FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>