PERFORCE change 122620 for review
Peter Wemm
peter at FreeBSD.org
Sun Jul 1 08:11:08 UTC 2007
http://perforce.freebsd.org/chv.cgi?CH=122620
Change 122620 by peter at peter_overcee on 2007/07/01 08:10:07
multi-include protection.
Affected files ...
.. //depot/projects/hammer/include/Makefile#64 edit
Differences ...
==== //depot/projects/hammer/include/Makefile#64 (text+ko) ====
@@ -99,16 +99,19 @@
PARAMFILE=${.CURDIR}/../sys/sys/param.h; \
. ${.CURDIR}/../sys/conf/newvers.sh; \
echo "$$COPYRIGHT" > osreldate.h; \
- echo "#include <sys/cdefs.h>" >> osreldate.h
echo "#ifdef _KERNEL" >> osreldate.h; \
echo "#error \"<osreldate.h> cannot be used in the kernel, use <sys/param.h>\"" >> osreldate.h; \
echo "#else" >> osreldate.h; \
+ echo "#ifndef _OSRELDATE_H" >> osreldate.h
+ echo "#define _OSRELDATE_H" >> osreldate.h
+ echo "#include <sys/cdefs.h>" >> osreldate.h
echo "#undef __FreeBSD_version" >> osreldate.h; \
echo "#define __FreeBSD_version $$RELDATE" >> osreldate.h; \
echo "__BEGIN_DECLS" >> osreldate.h
echo "extern int getosreldate(void);" >> osreldate.h
echo "__END_DECLS" >> osreldate.h
- echo "#endif" >> osreldate.h
+ echo "#endif /* _OSRELDATE_H */" >> osreldate.h
+ echo "#endif /* _KERNEL */" >> osreldate.h
.for i in ${LHDRS}
INCSLINKS+= sys/$i ${INCLUDEDIR}/$i
More information about the p4-projects
mailing list