Hi Thanks for the patch - it looks reasonable to me! Unfortunately, I can't test off the m4 dev line yet - I am just starting work on getting tools on the system and the 'dev' build requires several that I don't have yet, but I will test out the change when m4 1.4.20 is available.
On Mon, Aug 9, 2021 at 9:04 AM <[email protected]> wrote: > Send m4-discuss mailing list submissions to > [email protected] > > 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 > [email protected] > > You can reach the person managing the list at > [email protected] > > 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 <[email protected]> > To: [email protected] > Cc: Eric Blake <[email protected]>, Mike Fulton > <[email protected]>, [email protected] > 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 <[email protected]> > > canonicalize-lgpl: Fix conflict with z/OS <sys/stat.h>. > Reported by Mike Fulton <[email protected]> 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 > ****************************************** >
