osdep.h 1.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758
  1. /*
  2. Copyright (c) 1990-1999 Info-ZIP. All rights reserved.
  3. See the accompanying file LICENSE, version 1999-Oct-05 or later
  4. (the contents of which are also included in zip.h) for terms of use.
  5. If, for some reason, both of these files are missing, the Info-ZIP license
  6. also may be found at: ftp://ftp.cdrom.com/pub/infozip/license.html
  7. */
  8. /*
  9. * XXX this should somehow depend on the stuff in revision.h
  10. */
  11. #pragma prog 2.3,0,0,0
  12. /* use argument expansion */
  13. #if !defined(UTIL) && !defined(MAINWA_BUG)
  14. # pragma wild argv
  15. #endif
  16. #include <stdio.h>
  17. #include <malloc.h>
  18. #include <handle.h>
  19. #include <conio.h>>
  20. #include <locale.h>
  21. #include <sys/types.h>
  22. #include "theos/stat.h" /* use JMD's extended stat function */
  23. #define isatty() _isatty() /* THEOS isatty uses a FILE* instead of a fd */
  24. int _isatty(int fd);
  25. #define deletedir(d) rmdir(d)
  26. /* will come later */
  27. #if 0
  28. #define USE_EF_UT_TIME /* Enable use of "UT" extra field time info */
  29. #endif
  30. #if DEBUG
  31. int _fprintf(FILE* fp, const char* fmt, ...);
  32. #endif
  33. /* for rename() replacement. Standard function is bugged */
  34. int _rename(const char* old, const char* new);
  35. #define rename(a,b) _rename(a,b)
  36. #ifdef LOCATE_BUG
  37. /* for fopen replacement. Standard function fails on relative path pointing
  38. * to root directory.
  39. */
  40. #undef _fopen
  41. #undef open
  42. #define fopen() _fopen()
  43. FILE* _fopen(const char*, const char*);
  44. #define open() __open()
  45. FILE* __open(const char*, int);
  46. #endif
  47. #define EXDEV 10000