summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorJohn Kohl <jtkohl@mit.edu>1990-10-29 11:18:27 +0000
committerJohn Kohl <jtkohl@mit.edu>1990-10-29 11:18:27 +0000
commit1e2d1cd08b48a26bd302894baee57d051f1bb863 (patch)
tree2aa7733b7c2f16afda9d03f57b06ad85f5a68a3e /src
parent9ff58ac571e5c7c48a3e39ff93bf66693479d6ad (diff)
downloadkrb5-1e2d1cd08b48a26bd302894baee57d051f1bb863.tar.gz
krb5-1e2d1cd08b48a26bd302894baee57d051f1bb863.tar.xz
krb5-1e2d1cd08b48a26bd302894baee57d051f1bb863.zip
add unifdef stuff
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@1349 dc483132-0cff-0310-8789-dd5450dbe970
Diffstat (limited to 'src')
-rw-r--r--src/config/Project.tmpl59
1 files changed, 59 insertions, 0 deletions
diff --git a/src/config/Project.tmpl b/src/config/Project.tmpl
index 11e827615..5066e4cd1 100644
--- a/src/config/Project.tmpl
+++ b/src/config/Project.tmpl
@@ -12,6 +12,9 @@
#ifndef PerlCmd
#define PerlCmd perl
#endif
+#ifndef UnifdefCmd
+#define UnifdefCmd unifdef
+#endif
#ifndef CompileEtCmd
#define CompileEtCmd $(ETSRC)/compile_et
#endif
@@ -136,6 +139,60 @@ includes:: hfile @@\
#define CopyHeader(hfile,hdir) CopyHeaderNewName(hfile,hdir,hfile)
#endif /* CopyHeader */
+/* Run a header through a preprocessor to generate an architecture/environment
+ specific header file. note that unifdef's exit status will normally be 1,
+ indicating some adjustment of the file took place. */
+#ifndef ProcessStockHeader
+#define ProcessStockHeader(stockname,newname) @@\
+newname: stockname @@\
+ -$(UNIFDEF) $(PROCESS_DEFINES) stockname >newname
+#endif /* ProcessStockHeader */
+
+#if HasPosixTermios
+P_TERMIOS=-DHasPosixTermiosTrue
+#else
+P_TERMIOS=-UHasPosixTermiosTrue
+#endif
+#if HasPosixFileLocks
+P_FLOCKS=-DHasPosixFileLocksTrue
+#else
+P_FLOCKS=-UHasPosixFileLocksTrue
+#endif
+#if HasPosixTypes
+P_TYPES=-DHasPosixTypesTrue
+#else
+P_TYPES=-UHasPosixTypesTrue
+#endif
+#if HasVoidSignalReturn
+P_SIGTYPE=-DHasVoidSignalReturnTrue
+#else
+P_SIGTYPE=-UHasVoidSignalReturnTrue
+#endif
+#if HasStringH
+P_STRINGH=-DHasStringHTrue
+#else
+P_STRINGH=-UHasStringHTrue
+#endif
+#ifdef Bitsize16
+P_BITSIZE=-DBitsize16 -UBitsize32 -UBitsize64
+#endif
+#ifdef Bitsize32
+P_BITSIZE=-DBitsize32 -UBitsize16 -UBitsize64
+#endif
+#ifdef Bitsize64
+P_BITSIZE=-DBitsize64 -UBitsize16 -UBitsize32
+#endif
+#if HasNdbm
+P_DBM=-DHasNdbmTrue
+#else
+P_DBM=-UHasNdbmTrue
+#endif
+#if HasInet
+P_INET=-DHasInetTrue
+#else
+P_INET=-UHasInetTrue
+#endif
+
/*
* Default Definitions.
*/
@@ -152,6 +209,8 @@ includes:: hfile @@\
POSY = PosyCmd
TOUCH = TouchCmd
PERL = PerlCmd
+ UNIFDEF = UnifdefCmd
+ PROCESS_DEFINES = $(P_TERMIOS) $(P_FLOCKS) $(P_TYPES) $(P_SIGTYPE) $(P_STRINGH) $(P_BITSIZE) $(P_DBM) $(P_INET) -DUnifdefRan
DESDEFINES = DesDefines
ETSRC = $(TOP)/comerr
SSSRC = $(TOP)/ss