summaryrefslogtreecommitdiff
path: root/gcc/ada/adaint.c
diff options
context:
space:
mode:
authorcharlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4>2009-04-16 12:17:56 +0000
committercharlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4>2009-04-16 12:17:56 +0000
commita8d94a8f4f54bf294ab409c8d617ae8bdfaf0f46 (patch)
tree8a23d332bae4e014e749fa8c79b5f8910a336c66 /gcc/ada/adaint.c
parent880fe3cee1b1ca470b6e9b10da27868a42c9ca29 (diff)
downloadgcc-a8d94a8f4f54bf294ab409c8d617ae8bdfaf0f46.tar.gz
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. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@146174 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/ada/adaint.c')
-rw-r--r--gcc/ada/adaint.c17
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)
{