|
From: | Mike Fulton |
Subject: | Re: m4-discuss Digest, Vol 127, Issue 3 |
Date: | Mon, 9 Aug 2021 11:16:55 -0700 |
Send m4-discuss mailing list submissions to
m4-discuss@gnu.org
To subscribe or unsubscribe via the World Wide Web, visit
https://lists.gnu.org/mailman/listinfo/m4-discuss
or, via email, send a message with subject or body 'help' to
m4-discuss-request@gnu.org
You can reach the person managing the list at
m4-discuss-owner@gnu.org
When replying, please edit your Subject line so it is more specific
than "Re: Contents of m4-discuss digest..."
Today's Topics:
1. Re: request for minor change to canonicalize-lgpl.c (Bruno Haible)
----------------------------------------------------------------------
Message: 1
Date: Sun, 08 Aug 2021 22:14:49 +0200
From: Bruno Haible <bruno@clisp.org>
To: bug-gnulib@gnu.org
Cc: Eric Blake <eblake@redhat.com>, Mike Fulton
<mikefultonpersonal@gmail.com>, m4-discuss@gnu.org
Subject: Re: request for minor change to canonicalize-lgpl.c
Message-ID: <2362755.OTe8FqAysV@omega>
Content-Type: text/plain; charset="us-ascii"
Mike Fulton wrote:
> > I am building m4 (latest) on the z/OS operating system and for the most
> > part, things are going very well.
> > I am not sure of the best place to request this - whether as a 'bug' report
> > (which this is not) or as a discussion topic, so I decided on 'discussion'.
> >
> > The problem I have hit for z/OS is that canonicalize-lgpl.c is defining
> > __stat to stat, i.e.
> > #define __stat stat
> >
> > Unfortunately, on z/OS, the system header <sys/stat.h> uses __stat as a
> > wrapper for the header file to test if the header has been included or not,
> > e.g.
> >
> > #ifndef __stat
> > #define __stat 1
> > <header file contents>
> > #endif
Thanks for the explanation. Sending an explanation without a patch is
better than sending a patch without an explanation :)
Eric Blake wrote:
> we will get it fixed to quit
> using the identifier __stat for our own uses now that we know system
> headers are using it.
Done as follows:
2021-08-08 Bruno Haible <bruno@clisp.org>
canonicalize-lgpl: Fix conflict with z/OS <sys/stat.h>.
Reported by Mike Fulton <mikefultonpersonal@gmail.com> in
<https://lists.gnu.org/archive/html/m4-discuss/2021-08/msg00000.html>
via Eric Blake.
* lib/canonicalize-lgpl.c (__stat): Remove macro.
(file_accessible): Use 'stat' instead.
diff --git a/lib/canonicalize-lgpl.c b/lib/canonicalize-lgpl.c
index c6fef17..92e9639 100644
--- a/lib/canonicalize-lgpl.c
+++ b/lib/canonicalize-lgpl.c
@@ -74,7 +74,6 @@
# define __pathconf pathconf
# define __rawmemchr rawmemchr
# define __readlink readlink
-# define __stat stat
# if IN_RELOCWRAPPER
/* When building the relocatable program wrapper, use the system's memmove
function, not the gnulib override, otherwise we would get a link error.
@@ -105,7 +104,7 @@ file_accessible (char const *file)
return __faccessat (AT_FDCWD, file, F_OK, AT_EACCESS) == 0;
# else
struct stat st;
- return __stat (file, &st) == 0 || errno == EOVERFLOW;
+ return stat (file, &st) == 0 || errno == EOVERFLOW;
# endif
}
End of m4-discuss Digest, Vol 127, Issue 3
******************************************
[Prev in Thread] | Current Thread | [Next in Thread] |