diff options
author | Arnaud Charlet <charlet@gcc.gnu.org> | 2009-04-16 14:17:56 +0200 |
---|---|---|
committer | Arnaud Charlet <charlet@gcc.gnu.org> | 2009-04-16 14:17:56 +0200 |
commit | 4e0079cc3ce34e5d73d82ad99c96b43b7f5184e7 (patch) | |
tree | 8a23d332bae4e014e749fa8c79b5f8910a336c66 /gcc/ada/adaint.c | |
parent | 9093359a7b5a48d0d93cd9f4f7620647c8d09d40 (diff) | |
download | gcc-4e0079cc3ce34e5d73d82ad99c96b43b7f5184e7.zip gcc-4e0079cc3ce34e5d73d82ad99c96b43b7f5184e7.tar.gz gcc-4e0079cc3ce34e5d73d82ad99c96b43b7f5184e7.tar.bz2 |
[multiple changes]
2009-04-16 Thomas Quinot <quinot@adacore.com>
* snames.ads-tmpl (Name_Defined): New predefined name for use by the
integrated preprocessor.
* prep.ads, prep.adb (Setup_Hooks): New subprogram.
(Initialize): Split into two subprograms, Initialize (to be called
prior to compiler command line processing) and Setup_Hooks (to be called
later on when the first source file is loaded).
* gprep.adb: Change call to Prep.Initialize to call to Prep.Setup_Hooks.
Add call to Prep.Initialize.
* sinput-l.adb, prepcomp.adb: Change call to Prep.Initialize to call
to Prep.Setup_Hooks.
2009-04-16 Pascal Obry <obry@adacore.com>
* adaint.h, adaint.c (__gnat_chdir): New routine.
Simple wrapper routines used to convert to proper encoding on
Windows.
* s-crtl.ads: Use __gnat_chdir instead of direct call to the C library.
* a-direct.adb, g-dirope.adb: Use chdir from System.CRTL.
From-SVN: r146174
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 4f38528..a777467 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) { |