wincecompat.h 1.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  1. /*
  2. * wincecompat.h : wince compatiblity header file
  3. *
  4. * See Copyright for the status of this software.
  5. *
  6. * javier@tiresiassoft.com
  7. *
  8. * 17 Sep 2002 created
  9. */
  10. #ifndef __WINCECOMPAT_H__
  11. #define __WINCECOMPAT_H__
  12. #include <stdio.h>
  13. #include <winbase.h>
  14. #define MAX_STRERROR 31
  15. #define O_RDONLY 0x0000 /* open for reading only */
  16. #define O_WRONLY 0x0001 /* open for writing only */
  17. #define O_RDWR 0x0002 /* open for reading and writing */
  18. #define O_APPEND 0x0008 /* writes done at eof */
  19. #define O_CREAT 0x0100 /* create and open file */
  20. #define O_TRUNC 0x0200 /* open and truncate */
  21. #define O_EXCL 0x0400 /* open only if file doesn't already exist */
  22. #define BUFSIZ 4096
  23. extern int errno;
  24. /*
  25. Prototypes
  26. */
  27. int read(int handle, char *buffer, unsigned int len);
  28. int write(int handle, const char *buffer, unsigned int len);
  29. int open(const char *filename,int oflag, ...);
  30. int close(int handle);
  31. char *getenv( const char *varname );
  32. char *getcwd( char *buffer, unsigned int size);
  33. char *strerror(int errnum);
  34. /*
  35. Macro'ed inexistant funtion names
  36. */
  37. #define snprintf _snprintf
  38. #define vsnprintf(b,c,f,a) _vsnprintf(b,c,f,a)
  39. #define perror(_t) MessageBox(NULL, _T("_t"), _T("Error/Warning"), MB_OK)
  40. #endif