[libgfortran,patch] Protect uses of {f,l,}stat with autoconf macros

Jerry DeLisle jvdelisle@verizon.net
Sun Apr 1 15:51:00 GMT 2007


FX Coudert wrote:
> Attached patch fixes PR libfortran/31335: we have unconditional calls to 
> fstat, lstat and stat in libgfortran/intrinsics/stat.c. I simply propose 
> to follow the pattern laid in the rest of the library, and only define 
> the FSTAT and STAT library functions when fstat() and stat() library 
> calls are available. LSTAT is a bit different, because on systems that 
> don't support it, it is equivalent to stat() and thus can be provided 
> anyway.
> 
> This bug prevented libgfortran from building as a DLL. With this fix, 
> and Steve Ellcey's libtool patch, it will be possible to build 
> libgfortran as a DLL on windows with as little as  a two-lines patch 
> (adding -no-undefined to libgfortran_LT_FLAGS in Makefile.am, and adding 
> LT_INIT([shared static win32-dll dlopen]) to configure.ac
> 
> Built and tested on i386-pc-mingw32 and x86_64-unknown-linux-gnu. OK for 
> mainline?
> 
> Thanks,
> FX
:REVIEWMAIL:

This is OK.



More information about the Gcc-patches mailing list