PKCS11: Move syslog2stderr.c to programs/test

This commit is contained in:
Andrzej Kurek 2018-03-01 09:20:34 -05:00
parent b91a393a31
commit d851033e6c
4 changed files with 7 additions and 6 deletions

2
programs/.gitignore vendored
View File

@ -49,7 +49,7 @@ test/ssl_cert_test
test/udp_proxy
util/pem2der
util/strerror
util/syslog2stderr.so
test/syslog2stderr.so
x509/cert_app
x509/cert_req
x509/crl_app

View File

@ -278,14 +278,15 @@ x509/req_app$(EXEXT): x509/req_app.c $(DEP)
$(CC) $(LOCAL_CFLAGS) $(CFLAGS) x509/req_app.c $(LOCAL_LDFLAGS) $(LDFLAGS) -o $@
ifndef WINDOWS
util/syslog2stderr.so: util/syslog2stderr.c
echo " CC util/syslog2stderr.c"
test/syslog2stderr.so: test/syslog2stderr.c
echo " CC test/syslog2stderr.c"
$(CC) $(CFLAGS) -fPIC -shared -o $@ $< -ldl
endif
clean:
ifndef WINDOWS
rm -f $(APPS)
rm -f test/syslog2stderr.so
else
del /S /Q /F *.o *.exe
endif

View File

@ -17,13 +17,13 @@ fi
# The SoftHSM library sends error messages to the system logs. If possible, send
# the messages to standard error instead, by overloading the logging functions.
if [ -n "${TOPDIR+1}" ] &&
make -C "$TOPDIR/programs" util/syslog2stderr.so >/dev/null 2>&1
make -C "$TOPDIR/programs" test/syslog2stderr.so >/dev/null 2>&1
then
case $(uname) in
Darwin)
export DYLD_PRELOAD="${DYLD_PRELOAD-}:$TOPDIR/programs/util/syslog2stderr.so";;
export DYLD_PRELOAD="${DYLD_PRELOAD-}:$TOPDIR/programs/test/syslog2stderr.so";;
*)
export LD_PRELOAD="${LD_PRELOAD-}:$TOPDIR/programs/util/syslog2stderr.so";;
export LD_PRELOAD="${LD_PRELOAD-}:$TOPDIR/programs/test/syslog2stderr.so";;
esac
fi