Allow compilation with pcc, which has interesting/broken handling of -W
authorKristaps Dzonsons <kristaps@bsd.lv>
Thu, 24 Feb 2011 14:30:15 +0000 (14:30 +0000)
committerKristaps Dzonsons <kristaps@bsd.lv>
Thu, 24 Feb 2011 14:30:15 +0000 (14:30 +0000)
with missing function prototypes.  Ok joerg@.

Makefile

index f2c03eb6f106aeb549ade1681cea36edf89bd337..ccae26fdd3a477a154e79a909a8c93c95b5d2656 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -333,13 +333,13 @@ config.h: config.h.pre config.h.post
        rm -f config.log
        ( cat config.h.pre; \
        echo; \
-       if $(CC) $(CFLAGS) -Werror -c test-strlcat.c >> config.log 2>&1; then \
+       if $(CC) $(CFLAGS) -Werror -o test-strlcat test-strlcat.c >> config.log 2>&1; then \
                echo '#define HAVE_STRLCAT'; \
-               rm test-strlcat.o; \
+               rm test-strlcat; \
        fi; \
-       if $(CC) $(CFLAGS) -Werror -c test-strlcpy.c >> config.log 2>&1; then \
+       if $(CC) $(CFLAGS) -Werror -o test-strlcpy test-strlcpy.c >> config.log 2>&1; then \
                echo '#define HAVE_STRLCPY'; \
-               rm test-strlcpy.o; \
+               rm test-strlcpy; \
        fi; \
        echo; \
        cat config.h.post \