diff options
Diffstat (limited to 'gcc/ada/adaint.c')
-rw-r--r-- | gcc/ada/adaint.c | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/gcc/ada/adaint.c b/gcc/ada/adaint.c index 4f38528c648..a777467e27d 100644 --- a/gcc/ada/adaint.c +++ b/gcc/ada/adaint.c @@ -708,6 +708,23 @@ __gnat_rename (char *from, char *to) #endif } +/* Changing directory. */ + +int +__gnat_chdir (char *path) +{ +#if defined (__MINGW32__) && ! defined (__vxworks) && ! defined (CROSS_COMPILE) + { + TCHAR wpath[GNAT_MAX_PATH_LEN]; + + S2WSU (wpath, path, GNAT_MAX_PATH_LEN); + return _tchdir (wpath); + } +#else + return chdir (path); +#endif +} + FILE * __gnat_fopen (char *path, char *mode, int encoding ATTRIBUTE_UNUSED) { |