3681. [port] Update the Windows build system to support feature

selection and WIN64 builds.  This is a work in
                        progress. [RT #34160]

(cherry picked from commit c3c8823fed)

Conflicts:
	CHANGES
	bin/check/win32/checktool.dsp.in
	bin/dnssec/win32/dnssectool.dsp.in
	bin/dnssec/win32/importkey.dsp.in
	bin/dnssec/win32/importkey.mak.in
	bin/named/geoip.c
	bin/named/include/named/geoip.h
	bin/tools/win32/rrchecker.dsp.in
	bin/tools/win32/rrchecker.mak.in
	config.h.win32
	lib/dns/geoip.c
	lib/dns/master.c
	lib/dns/win32/libdns.dsp.in
	lib/dns/win32/libdns.mak.in
	lib/isc/mem.c
	lib/isc/stats.c
	lib/isc/win32/file.c
	lib/isc/win32/libisc.def.in
	lib/isc/win32/libisc.mak.in
	lib/isc/win32/stdio.c
	lib/isccc/cc.c
	win32utils/BuildAll.bat
	win32utils/BuildSetup.bat
	win32utils/legacy/BINDBuild.dsw.in
	win32utils/makeversion.pl
	win32utils/setpk11provider.pl
	win32utils/updatelibxml2.pl
	win32utils/win32-build.txt
This commit is contained in:
Mark Andrews
2013-12-04 13:48:45 +11:00
parent 5a91e2b5d4
commit 3b38a23089
442 changed files with 29064 additions and 4604 deletions

View File

@@ -31,7 +31,11 @@
#include <time.h>
#include <unistd.h>
#ifndef WIN32
#include <sys/wait.h>
#else
#include <direct.h>
#endif
#include <isc/boolean.h>
#include <isc/commandline.h>
@@ -84,6 +88,9 @@ static char T_tvec[T_MAXTESTS / 8];
static char * T_env[T_MAXENV + 1];
static char T_buf[T_BIGBUF];
static char * T_dir;
#ifdef WIN32
static testspec_t T_testlist[T_MAXTESTS];
#endif
static int
t_initconf(const char *path);
@@ -111,20 +118,31 @@ t_sighandler(int sig) {
}
int
main(int argc, char **argv) {
#ifndef WIN32
main(int argc, char **argv)
#else
t_main(int argc, char **argv)
#endif
{
int c;
int tnum;
#ifndef WIN32
int subprocs;
pid_t deadpid;
int status;
#endif
int len;
isc_boolean_t first;
testspec_t *pts;
#ifndef WIN32
struct sigaction sa;
#endif
isc_mem_debugging = ISC_MEM_DEBUGRECORD;
first = ISC_TRUE;
#ifndef WIN32
subprocs = 1;
#endif
T_timeout = T_TCTOUT;
/*
@@ -203,7 +221,9 @@ main(int argc, char **argv) {
exit(0);
}
else if (c == 'x') {
#ifndef WIN32
subprocs = 0;
#endif
}
else if (c == 'q') {
T_timeout = atoi(isc_commandline_argument);
@@ -240,12 +260,14 @@ main(int argc, char **argv) {
* Setup signals.
*/
#ifndef WIN32
sa.sa_flags = 0;
sigfillset(&sa.sa_mask);
sa.sa_handler = t_sighandler;
(void)sigaction(SIGINT, &sa, NULL);
(void)sigaction(SIGALRM, &sa, NULL);
#endif
/*
* Output start stanza to journal.
@@ -275,6 +297,7 @@ main(int argc, char **argv) {
pts = &T_testlist[0];
while (*pts->pfv != NULL) {
if (T_tvec[tnum / 8] & (0x01 << (tnum % 8))) {
#ifndef WIN32
if (subprocs) {
T_pid = fork();
if (T_pid == 0) {
@@ -327,6 +350,9 @@ main(int argc, char **argv) {
else {
(*pts->pfv)();
}
#else
(*pts->pfv)();
#endif
}
++pts;
++tnum;
@@ -525,7 +551,7 @@ t_fgetbs(FILE *fp) {
p = buf;
while ((c = fgetc(fp)) != EOF) {
if (c == '\n')
if ((c == '\r') || (c == '\n'))
break;
*p++ = c;
@@ -801,3 +827,20 @@ t_eval(const char *filename, int (*func)(char **), int nargs) {
return (result);
}
#ifdef WIN32
void
t_settests(const testspec_t list[]) {
int tnum;
const testspec_t *pts;
memset(T_testlist, 0, sizeof(T_testlist));
pts = &list[0];
for (tnum = 0; tnum < T_MAXTESTS - 1; pts++, tnum++) {
if (*pts->pfv == NULL)
break;
T_testlist[tnum] = *pts;
}
}
#endif