[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH 1/6] canonicalize-lgpl: fix EOVERFLOW bug
From: |
Bruno Haible |
Subject: |
Re: [PATCH 1/6] canonicalize-lgpl: fix EOVERFLOW bug |
Date: |
Thu, 31 Dec 2020 17:18:50 +0100 |
User-agent: |
KMail/5.1.3 (Linux/4.4.0-197-generic; KDE/5.18.0; x86_64; ; ) |
Tom G. Christensen wrote:
> FWIW lib/utime.c now fails to build on Solaris < 10 because of
> 0003-stat-failing-with-EOVERFLOW-implies-existence.patch
> (340dcbd879d050aebcd7081ec5f2208f0e2418b6)
>
> gcc -std=gnu11 -DHAVE_CONFIG_H -DEXEEXT=\"\" -DEXEEXT=\"\" -DNO_XMALLOC
> -DEXEEXT=\"\" -I. -I.. -DGNULIB_STRICT_CHECKING=1
> -I/usr/tgcware/include -D_REENTRANT -fvisibility=hidden -g -O2 -MT
> utime.o -MD -MP -MF $depbase.Tpo -c -o utime.o utime.c &&\
> mv -f $depbase.Tpo $depbase.Po
> utime.c: In function 'rpl_utime':
> utime.c:279:38: error: 'errno' undeclared (first use in this function)
> if (stat (name, &buf) == -1 && errno != EOVERFLOW)
> ^
> utime.c:279:38: note: each undeclared identifier is reported only once
> for each function it appears in
> utime.c:279:47: error: 'EOVERFLOW' undeclared (first use in this function)
> if (stat (name, &buf) == -1 && errno != EOVERFLOW)
> ^
> make[3]: *** [utime.o] Error 1
>
> It seems it would need to include <errno.h> in the general case and not
> just for Windows as currently done.
Thanks for the report. Probably it would also fail to compile on macOS 10.13.
2020-12-31 Bruno Haible <bruno@clisp.org>
utime: Fix compilation error on macOS and Solaris 9 (regr. 2020-12-24).
Reported by Tom G. Christensen <tgc@jupiterrise.com> in
<https://lists.gnu.org/archive/html/bug-gnulib/2020-12/msg00295.html>.
* lib/utime.c: Include <errno.h>.
diff --git a/lib/utime.c b/lib/utime.c
index bf7d7c5..3372179 100644
--- a/lib/utime.c
+++ b/lib/utime.c
@@ -261,6 +261,7 @@ utime (const char *name, const struct utimbuf *ts)
#else
+# include <errno.h>
# include <sys/stat.h>
# include "filename.h"
- Re: [PATCH 5/6] canonicalize: prefer signed integer types, (continued)
Re: [PATCH 1/6] canonicalize-lgpl: fix EOVERFLOW bug, Adhemerval Zanella, 2020/12/11
- Re: [PATCH 1/6] canonicalize-lgpl: fix EOVERFLOW bug, Paul Eggert, 2020/12/17
- Re: [PATCH 1/6] canonicalize-lgpl: fix EOVERFLOW bug, Adhemerval Zanella, 2020/12/18
- Re: [PATCH 1/6] canonicalize-lgpl: fix EOVERFLOW bug, Adhemerval Zanella, 2020/12/18
- Re: [PATCH 1/6] canonicalize-lgpl: fix EOVERFLOW bug, Paul Eggert, 2020/12/18
- Re: [PATCH 1/6] canonicalize-lgpl: fix EOVERFLOW bug, Paul Eggert, 2020/12/24
- Re: [PATCH 1/6] canonicalize-lgpl: fix EOVERFLOW bug, Tom G. Christensen, 2020/12/31
- Re: [PATCH 1/6] canonicalize-lgpl: fix EOVERFLOW bug,
Bruno Haible <=