[Pkg-clamav-commits] [SCM] Debian repository for ClamAV branch, debian/unstable, updated. debian/0.95+dfsg-1-6156-g094ec9b

aCaB acab at clamav.net
Sun Apr 4 01:17:00 UTC 2010


The following commit has been merged in the debian/unstable branch:
commit f323cfbe135dd6dff2e71244d5242b67e217b6b1
Author: aCaB <acab at clamav.net>
Date:   Tue Jan 26 18:05:43 2010 +0100

    do version.h in js, not in perl

diff --git a/win32/configure.js b/win32/configure.js
index 2ee82d1..faf30cd 100644
--- a/win32/configure.js
+++ b/win32/configure.js
@@ -1,182 +1,3 @@
-var confs = new Array();
-confs['AC_APPLE_UNIVERSAL_BUILD'] = -1;
-confs['ANONYMOUS_MAP'] = -1;
-confs['BIND_8_COMPAT'] = -1;
-confs['BUILD_CLAMD'] = '1';
-confs['CLAMAVGROUP'] = '"clamav"';
-confs['CLAMAVUSER'] = '"clamav"';
-confs['CLAMUKO'] = -1;
-confs['CL_DEBUG'] = -1;
-confs['CL_EXPERIMENTAL'] = -1;
-confs['CL_THREAD_SAFE'] = '1';
-confs['CONFDIR'] = '"C:\\\\ClamAV"';
-confs['CURSES_INCLUDE'] = -1;
-confs['C_AIX'] = -1;
-confs['C_BEOS'] = -1;
-confs['C_BIGSTACK'] = -1;
-confs['C_BSD'] = -1;
-confs['C_DARWIN'] = -1;
-confs['C_GNU_HURD'] = -1;
-confs['C_HPUX'] = -1;
-confs['C_INTERIX'] = -1;
-confs['C_IRIX'] = -1;
-confs['C_KFREEBSD_GNU'] = -1;
-confs['C_LINUX'] = -1;
-confs['C_OS2'] = -1;
-confs['C_OSF'] = -1;
-confs['C_QNX6'] = -1;
-confs['C_SOLARIS'] = -1;
-confs['DATADIR'] = '"c:\\\\ClamAV\\\\db"';
-confs['DEFAULT_FD_SETSIZE'] = '1024';
-confs['FDPASS_NEED_XOPEN'] = -1;
-confs['FILEBUFF'] = '8192';
-confs['FPU_WORDS_BIGENDIAN'] = '0';
-confs['FRESHCLAM_DNS_FIX'] = -1;
-confs['FRESHCLAM_NO_CACHE'] = -1;
-confs['HAVE_ARGZ_ADD'] = -1;
-confs['HAVE_ARGZ_APPEND'] = -1;
-confs['HAVE_ARGZ_COUNT'] = -1;
-confs['HAVE_ARGZ_CREATE_SEP'] = -1;
-confs['HAVE_ARGZ_H'] = -1;
-confs['HAVE_ARGZ_INSERT'] = -1;
-confs['HAVE_ARGZ_NEXT'] = -1;
-confs['HAVE_ARGZ_STRINGIFY'] = -1;
-confs['HAVE_ATTRIB_ALIGNED'] = -1;
-confs['HAVE_ATTRIB_PACKED'] = -1;
-confs['HAVE_BZLIB_H'] = '1';
-confs['HAVE_CLOSEDIR'] = '1';
-confs['HAVE_CONTROL_IN_MSGHDR'] = '1' /* FIXME */;
-confs['HAVE_CTIME_R'] = '1' /* FIXME */;
-confs['HAVE_CTIME_R_2'] = '1' /* FIXME */;
-confs['HAVE_CTIME_R_3'] = -1;
-confs['HAVE_DECL_CYGWIN_CONV_PATH'] = -1;
-confs['HAVE_DIRENT_H'] = '1';
-confs['HAVE_DLD'] = -1;
-confs['HAVE_DLD_H'] = -1;
-confs['HAVE_DLERROR'] = '1' /* FIXME */;
-confs['HAVE_DLFCN_H'] = '1';
-confs['HAVE_DL_H'] = -1;
-confs['HAVE_DYLD'] = -1;
-confs['HAVE_ERROR_T'] = '1' /* FIXME */;
-confs['HAVE_FD_PASSING'] = -1;
-confs['HAVE_FSEEKO'] = '1' /* FIXME */;
-confs['HAVE_GETADDRINFO'] = '1';
-confs['HAVE_GETPAGESIZE'] = '1';
-confs['HAVE_GRP_H'] = -1;
-confs['HAVE_ICONV'] = -1;
-confs['HAVE_INET_NTOP'] = '1';
-confs['HAVE_INITGROUPS'] = -1;
-confs['HAVE_INTTYPES_H'] = -1;
-confs['HAVE_IN_ADDR_T'] = -1;
-confs['HAVE_IN_PORT_T'] = '1';
-confs['HAVE_LIBCHECK'] = -1;
-confs['HAVE_LIBDL'] = '1' /* FIXME */;
-confs['HAVE_LIBDLLOADER'] = '1' /* FIXME */;
-confs['HAVE_LIBMILTER_MFAPI_H'] = -1;
-confs['HAVE_LIBNCURSES'] = -1;
-confs['HAVE_LIBPDCURSES'] = -1;
-confs['HAVE_LIBZ'] = '1';
-confs['HAVE_LIMITS_H'] = '1' /* FIXME */;
-confs['HAVE_LTDL'] = '1';
-confs['HAVE_MACH_O_DYLD_H'] = -1;
-confs['HAVE_MADVISE'] = -1;
-confs['HAVE_MALLINFO'] = -1;
-confs['HAVE_MALLOC_H'] = '1';
-confs['HAVE_MEMCPY'] = '1';
-confs['HAVE_MEMORY_H'] = '1' /* FIXME */;
-confs['HAVE_MKSTEMP'] = '1' /* FIXME */;
-confs['HAVE_MMAP'] = -1;
-confs['HAVE_NDIR_H'] = -1;
-confs['HAVE_OPENDIR'] = '1';
-confs['HAVE_POLL'] = '1';
-confs['HAVE_POLL_H'] = '1';
-confs['HAVE_PRAGMA_PACK'] = '1';
-confs['HAVE_PRAGMA_PACK_HPPA'] = -1;
-confs['HAVE_PRELOADED_SYMBOLS'] = '1' /* FIXME */;
-confs['HAVE_PTHREAD_YIELD'] = '1';
-confs['HAVE_PWD_H'] = -1;
-confs['HAVE_READDIR'] = '1';
-confs['HAVE_READDIR_R_2'] = -1;
-confs['HAVE_READDIR_R_3'] = -1;
-confs['HAVE_RECVMSG'] = '1' /* FIXME */;
-confs['HAVE_RESOLV_H'] = '1';
-confs['HAVE_SAR'] = '1';
-confs['HAVE_SCHED_YIELD'] = -1;
-confs['HAVE_SENDMSG'] = '1';
-confs['HAVE_SETGROUPS'] = '1' /* FIXME */;
-confs['HAVE_SETSID'] = '1';
-confs['HAVE_SHL_LOAD'] = -1;
-confs['HAVE_SNPRINTF'] = '1';
-confs['HAVE_STDBOOL_H'] = -1;
-confs['HAVE_STDINT_H'] = -1;
-confs['HAVE_STDLIB_H'] = '1';
-confs['HAVE_STRCASESTR'] = -1 /* FIXME */;
-confs['HAVE_STRERROR_R'] = '1' /* FIXME */;
-confs['HAVE_STRINGS_H'] = -1;
-confs['HAVE_STRING_H'] = '1';
-confs['HAVE_STRLCAT'] = -1 /* FIXME */;
-confs['HAVE_STRLCPY'] = -1 /* FIXME */;
-confs['HAVE_SYSCONF_SC_PAGESIZE'] = -1;
-confs['HAVE_SYSTEM_TOMMATH'] = -1;
-confs['HAVE_SYS_DL_H'] = -1;
-confs['HAVE_SYS_FILIO_H'] = -1;
-confs['HAVE_SYS_INTTYPES_H'] = -1;
-confs['HAVE_SYS_INT_TYPES_H'] = -1;
-confs['HAVE_SYS_MMAN_H'] = -1;
-confs['HAVE_SYS_PARAM_H'] = -1;
-confs['HAVE_SYS_SELECT_H'] = -1;
-confs['HAVE_SYS_STAT_H'] = '1';
-confs['HAVE_SYS_TYPES_H'] = '1';
-confs['HAVE_SYS_UIO_H'] = -1;
-confs['HAVE_TERMIOS_H'] = -1;
-confs['HAVE_UNISTD_H'] = -1;
-confs['HAVE_VSNPRINTF'] = '1';
-confs['HAVE_WORKING_ARGZ'] = -1;
-confs['LIBCLAMAV_FULLVER'] = '"6.0.4"';
-confs['LIBCLAMAV_MAJORVER'] = '6';
-confs['LTDL_DLOPEN_DEPLIBS'] = -1;
-confs['LT_DLSEARCH_PATH'] = '""';
-confs['LT_LIBEXT'] = '"dll"';
-confs['LT_MODULE_EXT'] = '".dll"';
-confs['LT_MODULE_PATH_VAR'] = '"LD_LIBRARY_PATH"';
-confs['LT_OBJDIR'] = '""';
-confs['NDEBUG'] = '1';
-confs['NEED_USCORE'] = -1;
-confs['NOBZ2PREFIX'] = -1;
-confs['NO_FD_SET'] = -1;
-confs['PACKAGE'] = 'PACKAGE_NAME';
-confs['PACKAGE_BUGREPORT'] = '"http://bugs.clamav.net/"';
-confs['PACKAGE_NAME'] = '"ClamAV"';
-confs['PACKAGE_STRING'] = '"ClamAV devel"';
-confs['PACKAGE_TARNAME'] = '"clamav"';
-confs['PACKAGE_URL'] = '"http://www.clamav.net/"';
-confs['PACKAGE_VERSION'] = '"devel"';
-confs['SCANBUFF'] = '131072';
-confs['SETPGRP_VOID'] = '1';
-confs['SIZEOF_INT'] = '4';
-confs['SIZEOF_LONG'] = '4';
-confs['SIZEOF_LONG_LONG'] = '8';
-confs['SIZEOF_SHORT'] = '2';
-confs['SIZEOF_VOID_P'] = '4';
-confs['STDC_HEADERS'] = '1';
-confs['SUPPORT_IPv6'] = -1;
-confs['USE_MPOOL'] = -1;
-confs['USE_SYSLOG'] = -1;
-confs['VERSION_SUFFIX'] = '""';
-confs['WORDS_BIGENDIAN'] = '0';
-confs['_LARGEFILE_SOURCE'] = -1;
-confs['_POSIX_PII_SOCKET'] = -1;
-confs['_REENTRANT'] = '1' /* FIXME */;
-confs['_THREAD_SAFE'] = -1;
-confs['__error_t_defined'] = -1;
-confs['const'] = -1;
-confs['error_t'] = -1;
-confs['inline'] = '_inline';
-confs['off_t'] = -1;
-confs['restrict'] = -1;
-confs['socklen_t'] = -1;
-
-
 var W = WScript;
 var F;
 try {
@@ -201,66 +22,6 @@ try {
 	W.Quit(1);
 }
 var dir_root = f.ParentFolder;
-var file_clconfin = dir_root + '\\clamav-config.h.in';
-try {
-	f = F.OpenTextFile(file_clconfin, 1, false)
-} catch (e) {
-	W.Echo('Cannot open '+file_clconfin+' for reading: '+ e.message);
-	W.Quit(1);
-}
-var file_clconftmp = dir_root + '\\win32\\clamav-config.h.tmp';
-var of;
-try {
-	of = F.CreateTextFile(file_clconftmp, true);
-} catch(e) {
-	W.Echo('Cannot open '+file_clconftmp+' for writing: ' + e.message);
-	W.Quit(1);
-}
-W.Echo('Generating clamav-config.h...');
-
-of.WriteLine('/* AUTOMATICALLY GENERATED BY configure.js */');
-var rx = new RegExp('^#\\s*undef (.*)');
-while(!f.AtEndOfStream) {
-	var ln = f.ReadLine();
-	if(!rx.exec(ln)) {
-		of.WriteLine(ln);
-		continue;
-	}
-	var c = RegExp.$1;
-	if(c == 'VERSION') {
-		var D = new Date();
-		var y = D.getYear() + '';
-		var m = (D.getMonth()+1) + '';
-		var d = (D.getDay()+1) + '';
-		if(m.length == 1) m = '0' + m;
-		if(d.length == 1) d = '0' + d;
-		of.WriteLine('#define VERSION "devel-' + y + m + d + '"');
-		continue;
-	}
-	if(!confs[c]) {
-		W.Echo('WARNING: Config option "' + c + '" is unknown');
-		of.WriteLine('/* #undef ' + c + ' */');
-		continue;
-	}
-	if(confs[c] == -1) {
-		of.WriteLine('/* #undef ' + c + ' */');
-	} else {
-		of.WriteLine('#define ' + c + ' ' + confs[c]);
-	}	
-}
-f.close();
-of.close();
-var file_clconfout = dir_root + '\\win32\\clamav-config.h';
-if(F.FileExists(file_clconfout))
-	F.DeleteFile(file_clconfout, true);
-
-try {
-	F.MoveFile(file_clconftmp, file_clconfout);
-} catch(e) {
-	W.Echo('Cannot rename '+ file_clconftmp +' to ' + file_clconfout + ': ' + e.message);
-	W.Quit(1);
-}
-
 var file_versionsta = dir_root + '\\libclamav\\version.h.static';
 var file_versionout = dir_root + '\\libclamav\\version.h';
 
diff --git a/win32/update-win32.pl b/win32/update-win32.pl
index ae65236..0638557 100644
--- a/win32/update-win32.pl
+++ b/win32/update-win32.pl
@@ -270,14 +270,15 @@ sub ugly_print {
 	$haveatt = 1;
     }
 
+    my $is_stupid_tag = $t->gi =~ /^(File|ToolFiles|References|Globals|Filter)$/;
     if($haveatt) {
 	print $fh "\t" x $t->level;
-	print $fh "\t" if($t->children);
+	print $fh "\t" if $t->children || $is_stupid_tag;
     }
-    print $fh "/" unless $t->children;
+    print $fh "/" unless $t->children || $is_stupid_tag;
     print $fh ">\n";
     ugly_print($t->first_child, $fh);
-    if($t->children) {
+    if($t->children || $is_stupid_tag) {
 	print $fh "\t" x $t->level;
 	print $fh "</".$t->gi.">\n";
     }
@@ -334,18 +335,6 @@ while(<IN>) {
 }
 close OUT;
 close IN;
-print "clamav-config.h generated ($w warnings)\n";
-
-if(-e "$BASE_DIR/libclamav/version.h.static") {
-    print "Skipping regeneration of libclamav/version.h (static version found)\n";
-} else {
-    print "Generating libclamav/version.h...\n";
-    open OUT, "> $BASE_DIR/libclamav/version.h" || die "Cannot open clamav-config.h: $!\n";
-    print OUT "/* Automatically generated by update-win32 */\n\n#define REPO_VERSION \"$VER\"\n";
-    close OUT;
-    print "libclamav/version.h generated\n";
-}
-
 
 foreach (@PROJECTS) {
     my %proj = %$_;
@@ -414,6 +403,5 @@ foreach (@PROJECTS) {
     print $fh "<?xml version=\"1.0\" encoding=\"Windows-1252\"?>\n";
     ugly_print($xml->root, $fh);
     close $fh;
-    move($filename, "$proj{'output'}.new");
-    exit;
+    move($filename, "$proj{'output'}");
 }

-- 
Debian repository for ClamAV



More information about the Pkg-clamav-commits mailing list