Current-Users archive

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

Testing for SA_SIGINFO in src/{regress,tests}/lib/libc/gen Makefile

While converting some tests from the old src/regress style to atf, I ran across the following code in the Makefile. Presumably, the intent was to only build and install the t_siginfo test on systems that have a <signal.h> which defines SA_SIGINFO to 0x0040. (I transposed this code virtually unchanged into the Makefile for the atf version of the test.)

.if !make(obj) && !make(cleandir)
HAVE_SIGINFO != if (echo "\#include <signal.h>" && echo "SA_SIGINFO") |
${CC} -E -I${DESTDIR}/usr/include - | grep -sq 0x0040; then echo yes;
else echo no; fi

.if make(obj) || make(cleandir) || (${HAVE_SIGINFO} == "yes")
TESTS_C+=       t_siginfo

It appears that we always install both src/include/signal.h and src/include/sys/signal.h on all platforms. The first of these includes the second, and the second defines SA_SIGINFO to 0x0040. So it would appear that the Makefile stuff is really unnecessary - the result is to always build the t_siginfo test.

Am I missing something? Is there any ${MACHINE} for which this code will not build t_siginfo? Or can this stuff be removed?

| Paul Goyette     | PGP Key fingerprint:     | E-mail addresses:       |
| Customer Service | FA29 0E3B 35AF E8AE 6651 | paul at    |
| Network Engineer | 0786 F758 55DE 53BA 7731 | pgoyette at |
| Kernel Developer |                          | pgoyette at  |

Home | Main Index | Thread Index | Old Index