Discussion:
[PATCH] fstatat: pacify GCC on unusual platform
Add Reply
Paul Eggert
2017-11-05 22:29:43 UTC
Reply
Permalink
Raw Message
* lib/fstatat.c (orig_fstatat) [!HAVE_WORKING_FSTATAT_ZERO_FLAG]:
Omit, as it’s unused in this case.
---
ChangeLog | 6 ++++++
lib/fstatat.c | 2 +-
2 files changed, 7 insertions(+), 1 deletion(-)

diff --git a/ChangeLog b/ChangeLog
index 87a929791..4bc28d981 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2017-11-05 Paul Eggert <***@cs.ucla.edu>
+
+ fstatat: pacify GCC on unusual platform
+ * lib/fstatat.c (orig_fstatat) [!HAVE_WORKING_FSTATAT_ZERO_FLAG]:
+ Omit, as it’s unused in this case.
+
2017-10-29 Paul Eggert <***@cs.ucla.edu>

timespec: prefer ‘assume’ to ‘assure’
diff --git a/lib/fstatat.c b/lib/fstatat.c
index 67e48d95d..294861f51 100644
--- a/lib/fstatat.c
+++ b/lib/fstatat.c
@@ -28,7 +28,7 @@
#include <sys/stat.h>
#undef __need_system_sys_stat_h

-#if HAVE_FSTATAT
+#if HAVE_FSTATAT && HAVE_WORKING_FSTATAT_ZERO_FLAG
static int
orig_fstatat (int fd, char const *filename, struct stat *buf, int flags)
{
--
2.13.6
Jim Meyering
2017-11-06 00:08:31 UTC
Reply
Permalink
Raw Message
Post by Paul Eggert
Omit, as it’s unused in this case.
Thanks. For the record, which platform required that?
Paul Eggert
2017-11-06 04:30:19 UTC
Reply
Permalink
Raw Message
Post by Jim Meyering
Post by Paul Eggert
Omit, as it’s unused in this case.
Thanks. For the record, which platform required that?
I believe it was Fedora 26 x86-64 with CFLAGS='-m32'. Another bug was present
that contributed to the problem. I'll send email about that shortly.

This all came from my looking into Bruno Haible's recent bug reports about gzip
when compiled with CFLAGS=-m32 on 64-bit platforms. Boy what a mess it is. I am
starting to lean towards simply saying that it's not supported.

Loading...