Generate krb5-types.h instead of using a static one on Windows
This commit is contained in:
@@ -43,8 +43,18 @@ INCFILES= \
|
|||||||
$(INCDIR)\krb5-types.h \
|
$(INCDIR)\krb5-types.h \
|
||||||
$(INCDIR)\version.h
|
$(INCDIR)\version.h
|
||||||
|
|
||||||
|
!ifdef USE_STATIC_KRB5_TYPES
|
||||||
$(INCDIR)\krb5-types.h: krb5-types.h.w32
|
$(INCDIR)\krb5-types.h: krb5-types.h.w32
|
||||||
$(CP) $** $@
|
$(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
|
$(INCDIR)\config.h: config.h.w32 ..\windows\NTMakefile.config NTMakefile
|
||||||
$(PERL) << < config.h.w32 > $@
|
$(PERL) << < config.h.w32 > $@
|
||||||
@@ -73,9 +83,10 @@ while(<>) {
|
|||||||
} elsif (m/\@VERSION_OPTDEFS\@/) {
|
} elsif (m/\@VERSION_OPTDEFS\@/) {
|
||||||
|
|
||||||
if ("$(VER_PRERELEASE)") { print "#define VER_PRERELEASE 1\n"; }
|
if ("$(VER_PRERELEASE)") { print "#define VER_PRERELEASE 1\n"; }
|
||||||
if ("$(VER_PRIVATE)") { print "#define VER_PRIVATE \"$(VER_PRIVATE)\""; }
|
if ("$(VER_PRIVATE)") { print "#define VER_PRIVATE \"$(VER_PRIVATE)\"\n"; }
|
||||||
if ("$(VER_SPECIAL)") { print "#define VER_SPECIAL \"$(VER_SPECIAL)\""; }
|
if ("$(VER_SPECIAL)") { print "#define VER_SPECIAL \"$(VER_SPECIAL)\"\n"; }
|
||||||
if ("$(BUILD)" =~ "dbg") { print "#define VER_DEBUG 1\n"; }
|
if ("$(BUILD)" =~ "dbg") { print "#define VER_DEBUG 1\n"; }
|
||||||
|
print "#define HOST \"$(COMPUTERNAME)\"\n";
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
|
|
||||||
|
@@ -39,6 +39,9 @@ RCSID("$Id$");
|
|||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include <ctype.h>
|
#include <ctype.h>
|
||||||
|
#ifdef WIN32
|
||||||
|
#include <ws2tcpip.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
#define BITSIZE(TYPE) \
|
#define BITSIZE(TYPE) \
|
||||||
{ \
|
{ \
|
||||||
@@ -157,7 +160,11 @@ int main(int argc, char **argv)
|
|||||||
fprintf(f, "#include <netinet/in6_machtypes.h>\n");
|
fprintf(f, "#include <netinet/in6_machtypes.h>\n");
|
||||||
#endif
|
#endif
|
||||||
#ifdef HAVE_SOCKLEN_T
|
#ifdef HAVE_SOCKLEN_T
|
||||||
|
#ifndef WIN32
|
||||||
fprintf(f, "#include <sys/socket.h>\n");
|
fprintf(f, "#include <sys/socket.h>\n");
|
||||||
|
#else
|
||||||
|
fprintf(f, "#include <ws2tcpip.h>\n");
|
||||||
|
#endif
|
||||||
#endif
|
#endif
|
||||||
fprintf(f, "\n");
|
fprintf(f, "\n");
|
||||||
|
|
||||||
@@ -236,7 +243,6 @@ int main(int argc, char **argv)
|
|||||||
fprintf(f, "\n");
|
fprintf(f, "\n");
|
||||||
|
|
||||||
#if defined(_WIN32)
|
#if defined(_WIN32)
|
||||||
#include <ws2tcpip.h>
|
|
||||||
fprintf(f, "typedef SOCKET krb5_socket_t;\n");
|
fprintf(f, "typedef SOCKET krb5_socket_t;\n");
|
||||||
#else
|
#else
|
||||||
fprintf(f, "typedef int krb5_socket_t;\n");
|
fprintf(f, "typedef int krb5_socket_t;\n");
|
||||||
|
Reference in New Issue
Block a user