1
0
Fork 0
This repository has been archived on 2019-12-23. You can view files and clone it, but you cannot make any changes to it's state, such as pushing and creating new issues, pull requests or comments.
arduinisten/arduino-0018-windows/hardware/tools/avr/source/mingw/5.1.3/mingw-vista.patch

24 lines
899 B
Diff
Raw Normal View History

2010-03-30 21:53:44 +02:00
===================================================================
RCS file: /cvs/src/src/winsup/mingw/include/io.h,v
retrieving revision 1.16
retrieving revision 1.17
diff -u -r1.16 -r1.17
--- mingw/include/io.h 2007/02/08 08:15:32 1.16
+++ mingw/include/io.h 2007/03/05 08:25:32 1.17
@@ -293,6 +293,15 @@
_CRTIMP int __cdecl write (int, const void*, unsigned int);
#endif /* _UWIN */
+#ifdef __USE_MINGW_ACCESS
+/* Old versions of MSVCRT access() just ignored X_OK, while the version
+ shipped with Vista, returns an error code. This will restore the
+ old behaviour */
+static inline int __mingw_access (const char* __fname, int __mode)
+ { return _access (__fname, __mode & ~X_OK); }
+#define access(__f,__m) __mingw_access (__f, __m)
+#endif
+
/* Wide character versions. Also declared in wchar.h. */
/* Where do these live? Not in libmoldname.a nor in libmsvcrt.a */
#if 0