This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug libfortran/31335] New: Calls lstat(), stat() and fstat() in libgfortran should be protected by autoconf HAVE_{L,,F}STAT macros
- From: "fxcoudert at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 24 Mar 2007 11:02:32 -0000
- Subject: [Bug libfortran/31335] New: Calls lstat(), stat() and fstat() in libgfortran should be protected by autoconf HAVE_{L,,F}STAT macros
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
In libgfortran/intrinsics/stat.c, we unconditionally issue calls to stat(),
fstat() and lstat(). This is wrong, and these calls should be protected by
HAVE_{,F,L}STAT macros, themselves defined by autoconf.
This bug is annoying especially for lstat(), because it's non-POSIX and it's
not present on mingw; this, in turns, prevent us from creating a DLL
libgfortran (when the recent libtool patch by Steve Ellcey will be commited, it
will be the only bug still preventing this!). In the lstat() case, when lstat()
is not available and stat() is available, we should use it instead.
PS: We already have a test HAVE_WORKING_STAT that is used by the I/O system to
see if the system stat implementation fits the needs of the I/O code, but this
is unrelated.
--
Summary: Calls lstat(), stat() and fstat() in libgfortran should
be protected by autoconf HAVE_{L,,F}STAT macros
Product: gcc
Version: 4.3.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: libfortran
AssignedTo: fxcoudert at gcc dot gnu dot org
ReportedBy: fxcoudert at gcc dot gnu dot org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=31335
- Follow-Ups:
- [Bug libfortran/31335] Calls lstat(), stat() and fstat() in libgfortran should be protected by autoconf HAVE_{L,,F}STAT macros
- From: fxcoudert at gcc dot gnu dot org
- [Bug libfortran/31335] Calls lstat(), stat() and fstat() in libgfortran should be protected by autoconf HAVE_{L,,F}STAT macros
- From: fxcoudert at gcc dot gnu dot org
- [Bug libfortran/31335] Calls lstat(), stat() and fstat() in libgfortran should be protected by autoconf HAVE_{L,,F}STAT macros
- From: dannysmith at users dot sourceforge dot net
- [Bug libfortran/31335] Calls lstat(), stat() and fstat() in libgfortran should be protected by autoconf HAVE_{L,,F}STAT macros
- From: fxcoudert at gcc dot gnu dot org
- [Bug libfortran/31335] Calls lstat(), stat() and fstat() in libgfortran should be protected by autoconf HAVE_{L,,F}STAT macros
- From: fxcoudert at gcc dot gnu dot org
- [Bug libfortran/31335] Calls lstat(), stat() and fstat() in libgfortran should be protected by autoconf HAVE_{L,,F}STAT macros
- From: fxcoudert at gcc dot gnu dot org