diff options
author | Arnaud Charlet <charlet@gcc.gnu.org> | 2014-07-17 08:12:09 +0200 |
---|---|---|
committer | Arnaud Charlet <charlet@gcc.gnu.org> | 2014-07-17 08:12:09 +0200 |
commit | d2d8b2a70d792987761480ac14301816498a6454 (patch) | |
tree | dbf1a3f04bae9a8d171e9ca2a7b1aaec91d67569 /gcc/ada/adaint.c | |
parent | 3fad4d00acc3ccc59e4d028eb94d759e9ed4c55f (diff) | |
download | gcc-d2d8b2a70d792987761480ac14301816498a6454.zip gcc-d2d8b2a70d792987761480ac14301816498a6454.tar.gz gcc-d2d8b2a70d792987761480ac14301816498a6454.tar.bz2 |
[multiple changes]
2014-07-17 Robert Dewar <dewar@adacore.com>
* exp_ch7.adb, exp_ch7.ads, sinfo.ads: Minor reformatting.
2014-07-17 Ed Schonberg <schonberg@adacore.com>
* sem_case.adb (Check_Choice_Set): If the case expression is the
expression in a predicate, do not recheck coverage against itself,
to prevent spurious errors.
* sem_ch13.adb (Check_Aspect_At_End_Of_Declarations): Indicate that
expression comes from an aspect specification, to prevent spurious
errors when expression is a case expression in a predicate.
2014-07-17 Pascal Obry <obry@adacore.com>
* adaint.c, adaint.h (__gnat_set_executable): Add mode parameter.
* s-os_lib.ads, s-os_lib.adb (Set_Executable): Add Mode parameter.
2014-07-17 Vincent Celier <celier@adacore.com>
* gnatchop.adb, make.adb, gnatbind.adb, clean.adb, gprep.adb,
gnatxref.adb, gnatls.adb, gnatfind.adb, gnatname.adb: Do not output
the usage for an erroneous invocation of a gnat tool.
From-SVN: r212716
Diffstat (limited to 'gcc/ada/adaint.c')
-rw-r--r-- | gcc/ada/adaint.c | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/gcc/ada/adaint.c b/gcc/ada/adaint.c index b1d31b7..151f2e6 100644 --- a/gcc/ada/adaint.c +++ b/gcc/ada/adaint.c @@ -2332,8 +2332,13 @@ __gnat_set_writable (char *name) #endif } +/* must match definition in s-os_lib.ads */ +#define S_OWNER 1 +#define S_GROUP 2 +#define S_OTHERS 4 + void -__gnat_set_executable (char *name) +__gnat_set_executable (char *name, int mode) { #if defined (_WIN32) && !defined (RTX) TCHAR wname [GNAT_MAX_PATH_LEN + 2]; @@ -2349,7 +2354,12 @@ __gnat_set_executable (char *name) if (GNAT_STAT (name, &statbuf) == 0) { - statbuf.st_mode = statbuf.st_mode | S_IXUSR; + if (mode & S_OWNER) + statbuf.st_mode = statbuf.st_mode | S_IXUSR; + if (mode & S_GROUP) + statbuf.st_mode = statbuf.st_mode | S_IXGRP; + if (mode & S_OTHERS) + statbuf.st_mode = statbuf.st_mode | S_IXOTH; chmod (name, statbuf.st_mode); } #endif |