diff options
author | Arnaud Charlet <charlet@gcc.gnu.org> | 2009-04-16 12:27:47 +0200 |
---|---|---|
committer | Arnaud Charlet <charlet@gcc.gnu.org> | 2009-04-16 12:27:47 +0200 |
commit | 2794f02243b66df4e2ecbb042e26835f8b4a2a93 (patch) | |
tree | f9b2bdff86bc1060fbbee4da8e48621242d5f0cf /gcc/ada/adaint.c | |
parent | b0fbf3c0ca19ee803de0f9568db4a9744092688c (diff) | |
download | gcc-2794f02243b66df4e2ecbb042e26835f8b4a2a93.zip gcc-2794f02243b66df4e2ecbb042e26835f8b4a2a93.tar.gz gcc-2794f02243b66df4e2ecbb042e26835f8b4a2a93.tar.bz2 |
[multiple changes]
2009-04-16 Bob Duff <duff@adacore.com>
* exp_ch6.ads, exp_ch6.adb (Is_Build_In_Place_Function_Return): Remove,
unused.
2009-04-16 Thomas Quinot <quinot@adacore.com>
* sem_ch4.adb: Minor reformatting
* adaint.c: Remove junk duplicated code.
* sem_ch3.adb: Minor reformatting
* exp_dist.adb: Minor comment rewording
From-SVN: r146165
Diffstat (limited to 'gcc/ada/adaint.c')
-rw-r--r-- | gcc/ada/adaint.c | 23 |
1 files changed, 1 insertions, 22 deletions
diff --git a/gcc/ada/adaint.c b/gcc/ada/adaint.c index c84cd3e..4f38528 100644 --- a/gcc/ada/adaint.c +++ b/gcc/ada/adaint.c @@ -469,7 +469,7 @@ __gnat_symlink (char *oldpath ATTRIBUTE_UNUSED, /* Try to lock a file, return 1 if success. */ #if defined (__vxworks) || defined (__nucleus__) || defined (MSDOS) \ - || defined (_WIN32) + || defined (_WIN32) || defined (__EMX__) || defined (VMS) /* Version that does not use link. */ @@ -501,27 +501,6 @@ __gnat_try_lock (char *dir, char *file) return 1; } -#elif defined (__EMX__) || defined (VMS) - -/* More cases that do not use link; identical code, to solve too long - line problem ??? */ - -int -__gnat_try_lock (char *dir, char *file) -{ - char full_path[256]; - int fd; - - sprintf (full_path, "%s%c%s", dir, DIR_SEPARATOR, file); - fd = open (full_path, O_CREAT | O_EXCL, 0600); - - if (fd < 0) - return 0; - - close (fd); - return 1; -} - #else /* Version using link(), more secure over NFS. */ |