coreutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH] timeout: support sub-second timeouts on macOS


From: Pádraig Brady
Subject: Re: [PATCH] timeout: support sub-second timeouts on macOS
Date: Sun, 8 Nov 2020 21:26:35 +0000
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:83.0) Gecko/20100101 Thunderbird/83.0

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?

I'll push this to coreutils now.

cheers,
Pádraig



reply via email to

[Prev in Thread] Current Thread [Next in Thread]