On Sun, Nov 8, 2020 at 1:26 PM Pádraig Brady <p...@draigbrady.com> wrote: > On 08/11/2020 18:52, Jim Meyering wrote: > > On Sat, Nov 7, 2020 at 2:08 PM Pádraig Brady <p...@draigbrady.com> wrote: > >> * m4/jm-macros.m4: Check for setitimer. > >> * src/timeout.c: Use setitimer if timer_settime is not available. > >> * NEWS: Mention the improvement. > > > > Thanks! The patch looks fine and I confirmed it works. > > I encountered a few hurdles to make everything build using Xcode-12.1: > > - I had brew's bison-2.3, but that didn't work (failed to create > > lib/parse-datetime.c). fixed by installing bison-3.7.3 > > - compile error due to gnulib's lib/mgetgroups.c. I worked around it > > by adding a gross cast. I doubt that's proper, but I haven't dug > > enough to say more. > > > > diff --git a/lib/mgetgroups.c b/lib/mgetgroups.c > > index 3377d7bb2..a27da05e5 100644 > > --- a/lib/mgetgroups.c > > +++ b/lib/mgetgroups.c > > @@ -93,7 +93,7 @@ mgetgroups (char const *username, gid_t gid, gid_t > > **groups) > > int last_n_groups = max_n_groups; > > > > /* getgrouplist updates max_n_groups to num required. */ > > - ng = getgrouplist (username, gid, g, &max_n_groups); > > + ng = getgrouplist (username, gid, (int *) g, &max_n_groups); > > > > /* Some systems (like Darwin) have a bug where they > > never increase max_n_groups. */ > > > > - finally, I normally configure with --enable-gcc-warnings, but that > > evokes the attached errors, so I got past that by building with > > WERROR_CFLAGS= > > > > Thanks for all the checking. > I just used a dist tarball to check. > > Re getgrouplist, that was looked extensively at in: > https://bugs.gnu.org/20923 > Is the __GNUC__ define used there different for your case?
Yes, this version of xcode declares itself as GCC 4.2.1: [Two other solutions: use GCC or do not to use --enable-gcc-warnings] $ :|gcc -E -dD -|grep GNUC #define __GNUC__ 4 #define __GNUC_MINOR__ 2 #define __GNUC_PATCHLEVEL__ 1 #define __GNUC_STDC_INLINE__ 1