diff --git a/include/NTMakefile b/include/NTMakefile index cd64a5275..e54b07138 100644 --- a/include/NTMakefile +++ b/include/NTMakefile @@ -43,8 +43,18 @@ INCFILES= \ $(INCDIR)\krb5-types.h \ $(INCDIR)\version.h +!ifdef USE_STATIC_KRB5_TYPES $(INCDIR)\krb5-types.h: krb5-types.h.w32 $(CP) $** $@ +!else +$(INCDIR)\krb5-types.h: $(OBJ)\bits.exe + $(OBJ)\bits.exe $(INCDIR)\krb5-types.h + +$(OBJ)\bits.exe: $(OBJ)\bits.obj + $(EXECONLINK) + $(EXEPREP_NODIST) + +!endif $(INCDIR)\config.h: config.h.w32 ..\windows\NTMakefile.config NTMakefile $(PERL) << < config.h.w32 > $@ @@ -73,9 +83,10 @@ while(<>) { } elsif (m/\@VERSION_OPTDEFS\@/) { if ("$(VER_PRERELEASE)") { print "#define VER_PRERELEASE 1\n"; } - if ("$(VER_PRIVATE)") { print "#define VER_PRIVATE \"$(VER_PRIVATE)\""; } - if ("$(VER_SPECIAL)") { print "#define VER_SPECIAL \"$(VER_SPECIAL)\""; } + if ("$(VER_PRIVATE)") { print "#define VER_PRIVATE \"$(VER_PRIVATE)\"\n"; } + if ("$(VER_SPECIAL)") { print "#define VER_SPECIAL \"$(VER_SPECIAL)\"\n"; } if ("$(BUILD)" =~ "dbg") { print "#define VER_DEBUG 1\n"; } + print "#define HOST \"$(COMPUTERNAME)\"\n"; } else { diff --git a/include/bits.c b/include/bits.c index e0348a504..f2ee2b9fa 100644 --- a/include/bits.c +++ b/include/bits.c @@ -39,6 +39,9 @@ RCSID("$Id$"); #include #include #include +#ifdef WIN32 +#include +#endif #define BITSIZE(TYPE) \ { \ @@ -157,7 +160,11 @@ int main(int argc, char **argv) fprintf(f, "#include \n"); #endif #ifdef HAVE_SOCKLEN_T +#ifndef WIN32 fprintf(f, "#include \n"); +#else + fprintf(f, "#include \n"); +#endif #endif fprintf(f, "\n"); @@ -236,7 +243,6 @@ int main(int argc, char **argv) fprintf(f, "\n"); #if defined(_WIN32) - #include fprintf(f, "typedef SOCKET krb5_socket_t;\n"); #else fprintf(f, "typedef int krb5_socket_t;\n");