[Bug target/33281] gfortran crt2.o not found under Vista
DHConsultancy at skynet dot be
gcc-bugzilla@gcc.gnu.org
Wed Sep 5 12:58:00 GMT 2007
------- Comment #4 from DHConsultancy at skynet dot be 2007-09-05 12:58 -------
Subject: Re: gfortran crt2.o not found under Vista
I was hoping to avoid having to do the build. If all else fails, I'll
try it.
Thnx for your help.
dannysmith at users dot sourceforge dot net wrote:
> ------- Comment #2 from dannysmith at users dot sourceforge dot net 2007-09-04 06:17 -------
> The solution is to build gcc/gfortran wiith -D__USE_MINGW_ACCESS in CFLAGS;
>>From mingw/include/io.h
>
> /* Some defines for _access nAccessMode (MS doesn't define them, but
> * it doesn't seem to hurt to add them). */
> #define F_OK 0 /* Check for file existence */
> /* Well maybe it does hurt. On newer versions of MSVCRT, an access mode
> of 1 causes invalid parameter error. */
> #define X_OK 1 /* MS access() doesn't check for execute permission. */
> #define W_OK 2 /* Check for write permission */
> #define R_OK 4 /* Check for read permission */
>
>
> and later:
> #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
>
> Danny
>
>
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=33281
More information about the Gcc-bugs
mailing list