aboutsummaryrefslogtreecommitdiff
path: root/libgfortran/io/unix.c
diff options
context:
space:
mode:
authorTobias Burnus <burnus@gcc.gnu.org>2012-06-01 07:53:31 +0200
committerTobias Burnus <burnus@gcc.gnu.org>2012-06-01 07:53:31 +0200
commit7ed26a671c8b9bfe83a5b3691ea7f82986816a7d (patch)
tree63fe8083057cc04125b9f153960462ad7b09fd6b /libgfortran/io/unix.c
parent62330f08cbb816f178c86d3ec589f1a259aedd93 (diff)
downloadgcc-7ed26a671c8b9bfe83a5b3691ea7f82986816a7d.zip
gcc-7ed26a671c8b9bfe83a5b3691ea7f82986816a7d.tar.gz
gcc-7ed26a671c8b9bfe83a5b3691ea7f82986816a7d.tar.bz2
chmod.c (chmod_func): On MinGW, don't set is_dir
2012-06-01 Tobias Burnus <burnus@net-b.de> * intrinsics/chmod.c (chmod_func): On MinGW, don't set is_dir * and fix octal-mode handling. * io/unit.c (get_internal_unit): Add cast. * io/unix.c (min): Undef "min" before defining it. * runtime/backtrace.c (show_backtrace): Move label into ifndef __MINGW__ block. From-SVN: r188098
Diffstat (limited to 'libgfortran/io/unix.c')
-rw-r--r--libgfortran/io/unix.c20
1 files changed, 12 insertions, 8 deletions
diff --git a/libgfortran/io/unix.c b/libgfortran/io/unix.c
index c81163f..1a9faea 100644
--- a/libgfortran/io/unix.c
+++ b/libgfortran/io/unix.c
@@ -41,13 +41,6 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
#include <errno.h>
-/* min macro that evaluates its arguments only once. */
-#define min(a,b) \
- ({ typeof (a) _a = (a); \
- typeof (b) _b = (b); \
- _a < _b ? _a : _b; })
-
-
/* For mingw, we don't identify files by their inode number, but by a
64-bit identifier created from a BY_HANDLE_FILE_INFORMATION. */
#ifdef __MINGW32__
@@ -106,8 +99,19 @@ id_from_fd (const int fd)
return id_from_handle ((HANDLE) _get_osfhandle (fd));
}
+#endif /* HAVE_WORKING_STAT */
+#endif /* __MINGW32__ */
+
+
+/* min macro that evaluates its arguments only once. */
+#ifdef min
+#undef min
#endif
-#endif
+
+#define min(a,b) \
+ ({ typeof (a) _a = (a); \
+ typeof (b) _b = (b); \
+ _a < _b ? _a : _b; })
#ifndef PATH_MAX
#define PATH_MAX 1024