diff options
author | Kevin Koch <kpkoch@mit.edu> | 2008-03-18 17:40:04 +0000 |
---|---|---|
committer | Kevin Koch <kpkoch@mit.edu> | 2008-03-18 17:40:04 +0000 |
commit | f62112276c2147b1334585322db40cd45da30ace (patch) | |
tree | 0f4e9313801d5a9347841306e731f37448157dd9 | |
parent | 70c7c2cc98973d526de7e1e7f87f2b7e06e58867 (diff) | |
download | krb5-f62112276c2147b1334585322db40cd45da30ace.tar.gz krb5-f62112276c2147b1334585322db40cd45da30ace.tar.xz krb5-f62112276c2147b1334585322db40cd45da30ace.zip |
Detect if the Vista version of ntsecapi.h is present
TargetVersion: 1.7
Component: krb5-libs
Ticket: 19569
tAGS: PULLUP
Subj: Tweaks for 1.7 build on Windows.
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@20277 dc483132-0cff-0310-8789-dd5450dbe970
-rw-r--r-- | src/windows/Makefile.in | 17 | ||||
-rw-r--r-- | src/windows/build/bkw.pl | 5 | ||||
-rw-r--r-- | src/windows/ntsecapitest.c | 11 | ||||
-rw-r--r-- | src/windows/ntsecapitest.pl | 11 |
4 files changed, 42 insertions, 2 deletions
diff --git a/src/windows/Makefile.in b/src/windows/Makefile.in index 3ba9da6e4..f1a46c0df 100644 --- a/src/windows/Makefile.in +++ b/src/windows/Makefile.in @@ -4,7 +4,7 @@ NO_OUTPRE=1 # # Makefile that recurses into cns subdirectory. # -all-windows:: +all-windows:: ntsecapitest @echo Making in windows\lib cd lib $(MAKE) -$(MFLAGS) @@ -16,6 +16,7 @@ all-windows:: $(MAKE) -$(MFLAGS) @echo Making in windows\gss cd ..\gss + cd $(MAKE) -$(MFLAGS) @echo Making in windows\gina cd ..\gina @@ -33,7 +34,7 @@ all-windows:: !endif cd .. -clean-windows:: +clean-windows:: clean-ntsecapitest @echo Making clean in windows\lib cd lib $(MAKE) -$(MFLAGS) clean @@ -61,3 +62,15 @@ clean-windows:: $(MAKE) -$(MFLAGS) clean !endif cd .. + +# If ntsecapi.h contains the string that indicates it came from the Vista SDK, +# then ntsecapitest.i will be left behind. If the string is not present, +# ntsecapitest.i will be deleted. +ntsecapitest:: ntsecapitest.i + ntsecapitest.pl + +clean-ntsecapitest:: + $(RM) ntsecapitest.i + +{}.c{}.i: + @$(C_RULE) -P diff --git a/src/windows/build/bkw.pl b/src/windows/build/bkw.pl index 24c32a035..c1e33d28f 100644 --- a/src/windows/build/bkw.pl +++ b/src/windows/build/bkw.pl @@ -687,6 +687,11 @@ sub main { system("rm -rf $out/a.tmp"); ## Clean up junk. system("rm -rf $out/ziptemp"); ## Clean up junk. + print "Now check for ntsecapitest.i.\n"; + $dir = "$wd\\athena\\auth\\krb5\\src\\windows"; + chdir($dir) or die "Fatal -- Couldn't cd to $dir"; + print "Info -- chdir to ".`cd`."\n" if ($verbose); + # End logging: if ($odr->{logfile}->{def}) {$l->stop;} diff --git a/src/windows/ntsecapitest.c b/src/windows/ntsecapitest.c new file mode 100644 index 000000000..7fbbacbaa --- /dev/null +++ b/src/windows/ntsecapitest.c @@ -0,0 +1,11 @@ +/* Simple program to show what is in ntsecapi.h.
+ Compile -P to generate preprocessor output.
+ */
+
+#include "ntsecapi.h"
+
+#ifdef TRUST_ATTRIBUTE_TRUST_USES_AES_KEYS
+VISTA_SDK_VERSION
+#else
+NT_SDK_VERSION
+#endif
\ No newline at end of file diff --git a/src/windows/ntsecapitest.pl b/src/windows/ntsecapitest.pl new file mode 100644 index 000000000..c5306ea8d --- /dev/null +++ b/src/windows/ntsecapitest.pl @@ -0,0 +1,11 @@ +#!perl -w
+
+$filename = "ntsecapitest.i";
+$string = "VISTA_SDK_VERSION";
+
+if (system("grep $string $filename")) {
+ print "$string not found; deleting $filename.\n";
+ system("rm $filename");
+ }
+
+exit(0);
\ No newline at end of file |