mirror of
https://github.com/isc-projects/bind9.git
synced 2026-06-11 17:20:00 -04:00
[v9_9] include SRCID in windows builds
3446. [port] win32: Add source ID (see change #3400) to build.
[RT #31683]
(cherry picked from commit 2dd959aa18)
This commit is contained in:
parent
ce35e5cf0b
commit
43d1c03ee3
4 changed files with 91 additions and 1 deletions
3
CHANGES
3
CHANGES
|
|
@ -1,3 +1,6 @@
|
|||
3446. [port] win32: Add source ID (see change #3400) to build.
|
||||
[RT #31683]
|
||||
|
||||
3445. [bug] Reject zone files with blank owner names immediately
|
||||
after $ORIGIN directives. [RT #31848]
|
||||
|
||||
|
|
|
|||
|
|
@ -278,3 +278,6 @@ typedef long off_t;
|
|||
|
||||
/* Define to enable rpz-nsip rules. */
|
||||
#define ENABLE_RPZ_NSIP
|
||||
|
||||
/* Get SRCID */
|
||||
#include "srcid.h"
|
||||
|
|
|
|||
|
|
@ -31,8 +31,10 @@ perl updatelibxml2.pl
|
|||
rem Generate the version information
|
||||
perl makeversion.pl
|
||||
|
||||
rem Generate header files for lib/dns
|
||||
rem Generate the SRCID information
|
||||
perl makesrcid.pl
|
||||
|
||||
rem Generate header files for lib/dns
|
||||
call dnsheadergen.bat
|
||||
|
||||
rem Make sure that the Build directories are there.
|
||||
|
|
|
|||
82
win32utils/makesrcid.pl
Normal file
82
win32utils/makesrcid.pl
Normal file
|
|
@ -0,0 +1,82 @@
|
|||
#!/usr/bin/perl
|
||||
#
|
||||
# Copyright (C) 2004, 2007, 2012 Internet Systems Consortium, Inc. ("ISC")
|
||||
# Copyright (C) 2001 Internet Software Consortium.
|
||||
#
|
||||
# Permission to use, copy, modify, and/or distribute this software for any
|
||||
# purpose with or without fee is hereby granted, provided that the above
|
||||
# copyright notice and this permission notice appear in all copies.
|
||||
#
|
||||
# THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES WITH
|
||||
# REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
|
||||
# AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR ANY SPECIAL, DIRECT,
|
||||
# INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
|
||||
# LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
|
||||
# OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
||||
# PERFORMANCE OF THIS SOFTWARE.
|
||||
|
||||
# $Id$
|
||||
|
||||
# This script converts the SRCID information in ../srcid into a srcid.h
|
||||
# file, defining SRCID, which can be included by config.h.
|
||||
|
||||
open (SRCIDH, ">../srcid.h") or die "cannot open srcid.h: $!";
|
||||
|
||||
my $srcid = "unset";
|
||||
|
||||
if (open (SRCIDFILE, "../srcid")) {
|
||||
LOOP: while (<SRCIDFILE>) {
|
||||
chomp;
|
||||
($data) = split(/\#/);
|
||||
if($data) {
|
||||
($name, $value) = split(/=/,$data);
|
||||
($name) = split(/\s+/, $name);
|
||||
($value) = split(/\s+/, $value);
|
||||
next LOOP if ($name != "SRCID");
|
||||
$srcid = $value;
|
||||
}
|
||||
}
|
||||
close(SRCIDFILE);
|
||||
}
|
||||
|
||||
# Now set up the output version file
|
||||
|
||||
$ThisDate = scalar localtime();
|
||||
|
||||
#Standard Header
|
||||
|
||||
print SRCIDH '/*
|
||||
* Copyright (C) 2012 Internet Software Consortium.
|
||||
*
|
||||
* Permission to use, copy, modify, and distribute this software for any
|
||||
* purpose with or without fee is hereby granted, provided that the above
|
||||
* copyright notice and this permission notice appear in all copies.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS" AND INTERNET SOFTWARE CONSORTIUM
|
||||
* DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL
|
||||
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL
|
||||
* INTERNET SOFTWARE CONSORTIUM BE LIABLE FOR ANY SPECIAL, DIRECT,
|
||||
* INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING
|
||||
* FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT,
|
||||
* NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION
|
||||
* WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||
*/
|
||||
|
||||
';
|
||||
|
||||
print SRCIDH "/*\n";
|
||||
print SRCIDH " * srcid.h";
|
||||
print SRCIDH " * Generated automatically by makesrcid.pl.\n";
|
||||
print SRCIDH " * Date generated: $ThisDate\n";
|
||||
print SRCIDH " */\n\n";
|
||||
|
||||
print SRCIDH '
|
||||
#ifndef SRCID_H
|
||||
#define SRCID_H 1
|
||||
';
|
||||
|
||||
print "BIND SRCID: $srcid\n";
|
||||
|
||||
print SRCIDH "#define SRCID\t\"$srcid\"\n";
|
||||
print SRCIDH "#endif /* SRCID_H */\n";
|
||||
close SRCIDH;
|
||||
Loading…
Reference in a new issue