bug-coreutils
[Top][All Lists]
Advanced

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

Re: Test fails on darwin


From: Jim Meyering
Subject: Re: Test fails on darwin
Date: Tue, 15 Feb 2005 09:24:36 +0100

Sébastien Maret <address@hidden> wrote:
> Here is the result.
> %  cd tests/misc
> % env VERBOSE=yes make check TESTS=nice
...

Thank you.

That test failure was due to Darwin's definition of the NZERO macro:

    $ grep NZERO /usr/include/sys/param.h
    #define NZERO   0               /* default "nice" */

That conflicts with the POSIX requirement that its value be at least 20:

   XSI           {NZERO}
                     Default process priority.
                     Minimum Acceptable Value: 20

Here's the fix:

        * src/nice.c (NZERO) [NZERO == 0]: Undefine and define to 20,
        to work around the invalid definition from Darwin 7.7.0.
        Test failure reported by Sébastien Maret.

Index: src/nice.c
===================================================================
RCS file: /fetish/cu/src/nice.c,v
retrieving revision 1.76
diff -u -p -r1.76 nice.c
--- src/nice.c  26 Jul 2004 06:08:50 -0000      1.76
+++ src/nice.c  15 Feb 2005 07:50:41 -0000
@@ -53,6 +53,12 @@
 # define NZERO 20
 #endif
 
+/* This is required for Darwin Kernel Version 7.7.0.  */
+#if NZERO == 0
+# undef  NZERO
+# define NZERO 20
+#endif
+
 /* The name this program was run with. */
 char *program_name;
 




reply via email to

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