aboutsummaryrefslogtreecommitdiff
path: root/gcc/ada/mkdir.c
diff options
context:
space:
mode:
authorArnaud Charlet <charlet@gcc.gnu.org>2016-04-27 14:47:56 +0200
committerArnaud Charlet <charlet@gcc.gnu.org>2016-04-27 14:47:56 +0200
commitcaa64a44ace7776c08a1ca261380bee9a74e2dff (patch)
treeed96be4a8f89d8cd40880a2c31d6031a197f4197 /gcc/ada/mkdir.c
parenta6ac73115af92e964988677378306f5c08dd0ddf (diff)
downloadgcc-caa64a44ace7776c08a1ca261380bee9a74e2dff.zip
gcc-caa64a44ace7776c08a1ca261380bee9a74e2dff.tar.gz
gcc-caa64a44ace7776c08a1ca261380bee9a74e2dff.tar.bz2
[multiple changes]
2016-04-27 Hristian Kirtchev <kirtchev@adacore.com> * sem_prag.adb (Process_Atomic_Independent_Shared_Volatile): Code cleanup. Check the original node when trying to determine the node kind of pragma Volatile's argument to account for untagged derivations where the type is transformed into a constrained subtype. 2016-04-27 Olivier Hainque <hainque@adacore.com> * mkdir.c (__gnat_mkdir): Rework the vxworks section to use a consistent posix interface on the caller side. 2016-04-27 Ed Schonberg <schonberg@adacore.com> * sem_ch10.adb (Build_Limited_View, Decorate_Type): If this is a limited view of a type, initialize the Limited_Dependents field to catch misuses of the type in a client unit. 2016-04-27 Thomas Quinot <quinot@adacore.com> * a-strunb-shared.adb (Finalize): add missing Reference call. * s-strhas.adb: minor grammar fix and extension of comment * sem_ch8.adb: minor whitespace fixes 2016-04-27 Ed Schonberg <schonberg@adacore.com> * lib-xref.adb (Get_Type_Reference): Handle properly the case of an object declaration whose type definition is a class-wide subtype and whose expression is a function call that returns a classwide type. 2016-04-27 Hristian Kirtchev <kirtchev@adacore.com> * sem_util.ads, sem_util.adb (Output_Entity): New routine. (Output_Name): New routine. 2016-04-27 Bob Duff <duff@adacore.com> * exp_ch3.adb (Rewrite_As_Renaming): Disable previous change for now. From-SVN: r235495
Diffstat (limited to 'gcc/ada/mkdir.c')
-rw-r--r--gcc/ada/mkdir.c16
1 files changed, 13 insertions, 3 deletions
diff --git a/gcc/ada/mkdir.c b/gcc/ada/mkdir.c
index bdb0fa8..9b0a926 100644
--- a/gcc/ada/mkdir.c
+++ b/gcc/ada/mkdir.c
@@ -6,7 +6,7 @@
* *
* C Implementation File *
* *
- * Copyright (C) 2002-2014, Free Software Foundation, Inc. *
+ * Copyright (C) 2002-2016, Free Software Foundation, Inc. *
* *
* GNAT is free software; you can redistribute it and/or modify it under *
* terms of the GNU General Public License as published by the Free Soft- *
@@ -60,8 +60,18 @@
int
__gnat_mkdir (char *dir_name, int encoding ATTRIBUTE_UNUSED)
{
-#if defined (__vxworks) && !(defined (__RTP__) && ((_WRS_VXWORKS_MAJOR == 7) || (_WRS_VXWORKS_MINOR != 0)))
- return mkdir (dir_name);
+#if defined (__vxworks)
+
+ /* Pretend that the system mkdir is posix compliant even though it
+ sometimes is not, not expecting the second argument in some
+ configurations (e.g. vxworks 653 2.2, difference from 2.5). The
+ second actual argument will just be ignored in this case. */
+
+ typedef int posix_mkdir (const char * name, mode_t mode);
+
+ posix_mkdir * vxmkdir = (posix_mkdir *)&mkdir;
+ return vxmkdir (dir_name, S_IRWXU | S_IRWXG | S_IRWXO);
+
#elif defined (__MINGW32__)
TCHAR wname [GNAT_MAX_PATH_LEN + 2];