Hi Frederick & list, On 08/30/14 05:31, Frederick Akalin wrote: > Alas, my report comes too late to fix 1.4.0 for OS X 10.9.4, but I > have a few minor issues to report.
I can always release a version 1.4.1. ;-) > The first problem is with POSIX/posix-cflags.sh. Its lines that do > 'echo "-D..."' prints trailing newlines, but if only one POSIX > violation is detected it turns out okay since that trailing newline > gets eaten (I'm guessing by the backticks). However, if both POSIX > violations are triggered, then a newline gets inserted into the middle > of CFLAGS_POSIX, which confuses make: Very interesting. I assumed that all of the \n characters would be eaten and replaced by linear whitespace. > printf %s "-DPOSIXFAIL_MSG_NOSIGNAL " Yes, printf is what I've used elsewhere for constructing lines in parts. > The second less serious problem is that the root Makefile assumes make > == bsdmake. This seems not to cause any problems currently, but I > suggest fixing it anyway, by replacing 'make' with '${MAKE}'. I don't assume that make is bsdmake, only that it is something POSIX-compliant. But you're right that I should use ${MAKE}, in case it isn't in the path. (I don't know if anyone actually gets this right, but if make is not in the path and is invoked via /path/to/make, then ${MAKE} should be "/path/to/make" and not just "make".) Can you try the attached patch? -- Colin Percival Security Officer Emeritus, FreeBSD | The power to serve Founder, Tarsnap | www.tarsnap.com | Online backups for the truly paranoid
diff -ruN spiped-1.4.0/CHANGELOG spiped-1.4.1/CHANGELOG --- spiped-1.4.0/CHANGELOG 2014-08-28 01:29:56.000000000 -0700 +++ spiped-1.4.1/CHANGELOG 2014-08-30 12:15:19.000000000 -0700 @@ -1,3 +1,5 @@ +spiped-1.4.1 +* Fix build on OS X, and improve strict POSIX compliance. spiped-1.4.0 * Add automatic detection of compiler support (at compile-time) and CPU support (at run-time) for x86 "AES New Instructions"; and when available, diff -ruN spiped-1.4.0/Makefile spiped-1.4.1/Makefile --- spiped-1.4.0/Makefile 2014-08-28 01:30:35.000000000 -0700 +++ spiped-1.4.1/Makefile 2014-08-30 12:15:43.000000000 -0700 @@ -11,17 +11,17 @@ ( export CC="${CC}"; cd libcperciva/cpusupport/Build && command -p sh cpusupport.sh ) > cpusupport-config.h; \ . ./cpusupport-config.h; \ for D in ${PROGS}; do \ - ( cd $${D} && make all ) || exit 2; \ + ( cd $${D} && ${MAKE} all ) || exit 2; \ done install: all export BINDIR=$${BINDIR:-${BINDIR_DEFAULT}}; \ for D in ${PROGS}; do \ - ( cd $${D} && make install ) || exit 2; \ + ( cd $${D} && ${MAKE} install ) || exit 2; \ done clean: rm -f cpusupport-config.h for D in ${PROGS}; do \ - ( cd $${D} && make clean ) || exit 2; \ + ( cd $${D} && ${MAKE} clean ) || exit 2; \ done diff -ruN spiped-1.4.0/POSIX/posix-cflags.sh spiped-1.4.1/POSIX/posix-cflags.sh --- spiped-1.4.0/POSIX/posix-cflags.sh 2014-08-28 01:29:56.000000000 -0700 +++ spiped-1.4.1/POSIX/posix-cflags.sh 2014-08-30 12:03:28.000000000 -0700 @@ -1,10 +1,10 @@ # Should be sourced by `command -p sh posix-cflags.sh` from within a Makefile if ! ${CC} -D_POSIX_C_SOURCE=200809L posix-msg_nosignal.c 2>/dev/null; then - echo "-DPOSIXFAIL_MSG_NOSIGNAL" + printf %s "-DPOSIXFAIL_MSG_NOSIGNAL " echo "WARNING: POSIX violation: <sys/socket.h> not defining MSG_NOSIGNAL" >/dev/stderr fi if ! ${CC} -D_POSIX_C_SOURCE=200809L posix-clock_realtime.c 2>/dev/null; then - echo "-DPOSIXFAIL_CLOCK_REALTIME" + printf %s "-DPOSIXFAIL_CLOCK_REALTIME" echo "WARNING: POSIX violation: <time.h> not defining CLOCK_REALTIME" >/dev/stderr fi rm -f a.out