This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug target/33281] gfortran crt2.o not found under Vista
- From: "DHConsultancy at skynet dot be" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 5 Sep 2007 12:58:18 -0000
- Subject: [Bug target/33281] gfortran crt2.o not found under Vista
- References: <bug-33281-15052@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- 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