Subversion Repositories Kolibri OS

Rev

Rev 6764 | Blame | Compare with Previous | Last modification | View Log | Download | RSS feed

  1. /*
  2. Kolibri OS config for gcc 5.4
  3.  
  4. Started by Siemargl @Nov 2016
  5. */
  6.  
  7. #include <sys/types.h>      /* off_t, time_t, dev_t, ... */
  8. #include <sys/stat.h>
  9. #include <sys/kos_io.h>             /* lseek(), open(), setftime(), dup(), creat() */
  10. #include <time.h>           /* localtime() */
  11. #include <fcntl.h>          /* O_BINARY for open() w/o CR/LF translation */
  12. #include <sys/time.h>
  13. #include <unistd.h>
  14. #include <dirent.h>
  15.  
  16. #define DIR_END       '/'
  17. #define NO_STRNICMP
  18. #define STRNICMP zstrnicmp
  19. #define NO_CHMOD
  20. #define NO_FCHOWN
  21. //#define SET_DIR_ATTRIB   internal unzip bug
  22.  
  23. #define echoff(f)
  24. #define echon()
  25. #define getch() getchar() /* not correct, but may not be on a console */
  26. #define HAVE_WORKING_GETCH
  27.  
  28. /* next line turn on full unicode utf-8 support */
  29. //#define UNICODE_SUPPORT
  30. #ifdef UNICODE_SUPPORT
  31. #   define UTF8_MAYBE_NATIVE
  32. #   define NO_NL_LANGINFO
  33. #else /* cp866 is native */
  34. #   define CRTL_CP_IS_OEM
  35. #endif // UNICODE_SUPPORT
  36.  
  37. /*
  38. #  ifdef CRTL_CP_IS_OEM
  39. #   define ISO_TO_INTERN(src, dst)  AnsiToOem(src, dst)
  40. #   define OEM_TO_INTERN(src, dst)  {if ((src) != (dst)) strcpy((dst), (src));}
  41. #   define INTERN_TO_ISO(src, dst)  OemToAnsi(src, dst)
  42. #   define INTERN_TO_OEM(src, dst)  {if ((src) != (dst)) strcpy((dst), (src));}
  43. #  endif
  44. #  define _OEM_INTERN(str1) OEM_TO_INTERN(str1, str1)
  45. #  define _ISO_INTERN(str1) ISO_TO_INTERN(str1, str1)
  46. */
  47. /* UzpPassword supplies ANSI-coded string regardless of C RTL's native CP */
  48. // remove for a while
  49. // #  define STR_TO_CP2(dst, src)  (AnsiToOem(src, dst), dst)
  50.    /* dummy defines to disable these functions, they are not needed */
  51. #  define STR_TO_ISO
  52. #  define STR_TO_OEM
  53.  
  54.  
  55. /*
  56. #  ifdef DATE_FORMAT
  57. #    undef DATE_FORMAT
  58. #  endif
  59. #  define DATE_FORMAT     dateformat()
  60. */
  61. #define lenEOL          2
  62. #define PutNativeEOL    {*q++ = native(CR); *q++ = native(LF);}
  63. /*
  64. #  if (!defined(NO_EF_UT_TIME) && !defined(USE_EF_UT_TIME))
  65. #    define USE_EF_UT_TIME
  66. #  endif
  67. */
  68.  
  69. /* Static variables that we have to add to Uz_Globs: */
  70. #define SYSTEM_SPECIFIC_GLOBALS \
  71.     int created_dir, renamed_fullpath;\
  72.     char *rootpath, *buildpath, *end;\
  73.     ZCONST char *wildname;\
  74.     char *dirname, matchname[FILNAMSIZ];\
  75.     int rootlen, have_dirname, dirnamelen, notfirstcall;\
  76.     zvoid *wild_dir;
  77.