diff options
author | H. Peter Anvin <hpa@zytor.com> | 2008-03-03 20:18:10 -0800 |
---|---|---|
committer | H. Peter Anvin <hpa@zytor.com> | 2008-03-03 20:18:10 -0800 |
commit | 03abbde81db7484ccdb4e1808881e1df20df2fb0 (patch) | |
tree | 6d9722ba6c8373122bb86c7562ac8cd5c6ed1598 /com32/libutil | |
parent | 763bb1f82a4519bdf240fd5d43f7e776c0d5206f (diff) | |
download | syslinux-03abbde81db7484ccdb4e1808881e1df20df2fb0.tar.gz |
Prevent inclusion of system include files when inappropriate
Use "-nostdinc -iwithprefix include" to prevent the inclusion of
system header files, but still permitting *compiler* header files.
Diffstat (limited to 'com32/libutil')
-rw-r--r-- | com32/libutil/Makefile | 8 | ||||
-rw-r--r-- | com32/libutil/sha256crypt.c | 5 | ||||
-rw-r--r-- | com32/libutil/sha512crypt.c | 5 |
3 files changed, 15 insertions, 3 deletions
diff --git a/com32/libutil/Makefile b/com32/libutil/Makefile index 426c3335..d9f2a6c8 100644 --- a/com32/libutil/Makefile +++ b/com32/libutil/Makefile @@ -42,7 +42,11 @@ AR = ar NASM = nasm NASMOPT = -O9999 RANLIB = ranlib -CFLAGS = $(M32) -mregparm=3 -DREGPARM=3 -D__COM32__ -W -Wall -march=i386 -Os -fomit-frame-pointer -I./include -I../include +CFLAGS = $(M32) -mregparm=3 -DREGPARM=3 -W -Wall -march=i386 -Os \ + -fomit-frame-pointer -D__COM32__ \ + -nostdinc -iwithprefix include \ + -I./include -I../include \ + -Wp,-MT,$@,-MD,$(dir $@).$(notdir $@).d SFLAGS = $(M32) -D__COM32__ -march=i386 LDFLAGS = -T ../lib/com32.ld LNXCFLAGS = -I./include -W -Wall -O -g -D_GNU_SOURCE @@ -112,3 +116,5 @@ spotless: clean install: all mkdir -m 755 -p $(INSTALLROOT)$(COM32DIR) install -m 644 libutil_com.a libutil_lnx.a $(INSTALLROOT)$(COM32DIR) + +-include .*.d diff --git a/com32/libutil/sha256crypt.c b/com32/libutil/sha256crypt.c index 7dbd8faf..27f912e7 100644 --- a/com32/libutil/sha256crypt.c +++ b/com32/libutil/sha256crypt.c @@ -10,11 +10,14 @@ #include <stdio.h> #include <stdlib.h> #include <string.h> -#include <sys/param.h> +#include <minmax.h> #include <sys/types.h> #include "xcrypt.h" +#define MIN(x,y) min(x,y) +#define MAX(x,y) max(x,y) + /* Structure to save state of computation between the single steps. */ struct sha256_ctx { diff --git a/com32/libutil/sha512crypt.c b/com32/libutil/sha512crypt.c index 9ff587b8..9553ec1e 100644 --- a/com32/libutil/sha512crypt.c +++ b/com32/libutil/sha512crypt.c @@ -10,11 +10,14 @@ #include <stdio.h> #include <stdlib.h> #include <string.h> -#include <sys/param.h> +#include <minmax.h> #include <sys/types.h> #include "xcrypt.h" +#define MIN(x,y) min(x,y) +#define MAX(x,y) max(x,y) + /* Structure to save state of computation between the single steps. */ struct sha512_ctx { |