This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

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


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.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]