rawio.h 718 B

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. #ifndef KR_headers
  2. #ifdef MSDOS
  3. #include "io.h"
  4. #ifndef WATCOM
  5. #define close _close
  6. #define creat _creat
  7. #define open _open
  8. #define read _read
  9. #define write _write
  10. #endif /*WATCOM*/
  11. #endif /*MSDOS*/
  12. #ifdef __cplusplus
  13. extern "C" {
  14. #endif
  15. #ifndef MSDOS
  16. #ifdef OPEN_DECL
  17. extern int creat(const char*,int), open(const char*,int);
  18. #endif
  19. extern int close(int);
  20. extern int read(int,void*,size_t), write(int,void*,size_t);
  21. extern int unlink(const char*);
  22. #ifndef _POSIX_SOURCE
  23. #ifndef NON_UNIX_STDIO
  24. extern FILE *fdopen(int, const char*);
  25. #endif
  26. #endif
  27. #endif /*KR_HEADERS*/
  28. extern char *mktemp(char*);
  29. #ifdef __cplusplus
  30. }
  31. #endif
  32. #endif
  33. #include "fcntl.h"
  34. #ifndef O_WRONLY
  35. #define O_RDONLY 0
  36. #define O_WRONLY 1
  37. #endif