[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:07:55 UTC 2010


The following commit has been merged in the debian/unstable branch:
commit ccbb51829641363cc0be2f67eda737a9af45337e
Author: aCaB <acab at clamav.net>
Date:   Wed Oct 14 18:59:38 2009 +0200

    preliminary winsock support files

diff --git a/ChangeLog b/ChangeLog
index 2c96963..938e22c 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+Wed Oct 14 18:59:13 CEST 2009 (acab)
+------------------------------------
+ * win32: preliminary winsock support files
+
 Wed Oct 14 01:26:47 CEST 2009 (acab)
 ------------------------------------
  * win32: unrar support
diff --git a/win32/ClamAV.sln b/win32/ClamAV.sln
index 907a8e8..d98a9ca 100644
--- a/win32/ClamAV.sln
+++ b/win32/ClamAV.sln
@@ -15,6 +15,8 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libclamunrar_iface", "libcl
 EndProject
 Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libclamunrar", "libclamunrar.vcproj", "{41B2E193-92E3-429C-8DAC-9B287E3D7182}"
 EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "freshclam", "freshclam.vcproj", "{CEA52DD8-0418-42AD-B640-F33CC7C600CE}"
+EndProject
 Global
 	GlobalSection(SolutionConfigurationPlatforms) = preSolution
 		Debug|Win32 = Debug|Win32
@@ -37,6 +39,9 @@ Global
 		{41B2E193-92E3-429C-8DAC-9B287E3D7182}.Debug|Win32.Build.0 = Debug|Win32
 		{41B2E193-92E3-429C-8DAC-9B287E3D7182}.Release|Win32.ActiveCfg = Release|Win32
 		{41B2E193-92E3-429C-8DAC-9B287E3D7182}.Release|Win32.Build.0 = Release|Win32
+		{CEA52DD8-0418-42AD-B640-F33CC7C600CE}.Debug|Win32.ActiveCfg = Debug|Win32
+		{CEA52DD8-0418-42AD-B640-F33CC7C600CE}.Release|Win32.ActiveCfg = Release|Win32
+		{CEA52DD8-0418-42AD-B640-F33CC7C600CE}.Release|Win32.Build.0 = Release|Win32
 	EndGlobalSection
 	GlobalSection(SolutionProperties) = preSolution
 		HideSolutionNode = FALSE
diff --git a/win32/clamav-config.h b/win32/clamav-config.h
index 087f49e..711d286 100644
--- a/win32/clamav-config.h
+++ b/win32/clamav-config.h
@@ -83,7 +83,7 @@
 /* #undef C_SOLARIS */
 
 /* Path to virus database directory. */
-#define DATADIR "/usr/local/share/clamav"
+#define DATADIR "c:\\db"
 
 /* "default FD_SETSIZE value" */
 #define DEFAULT_FD_SETSIZE 1024
diff --git a/win32/clamscan.vcproj b/win32/clamscan.vcproj
index 875d3a9..0aefcca 100644
--- a/win32/clamscan.vcproj
+++ b/win32/clamscan.vcproj
@@ -48,7 +48,7 @@
 				RuntimeLibrary="3"
 				UsePrecompiledHeader="0"
 				WarningLevel="3"
-				DebugInformationFormat="4"
+				DebugInformationFormat="3"
 				CompileAs="1"
 				DisableSpecificWarnings="4996;4244;4018;4090;4333;4101;4146"
 			/>
@@ -120,6 +120,7 @@
 				AdditionalIncludeDirectories="&quot;$(SolutionDir)&quot;;&quot;$(SolutionDir)..\libclamav&quot;;&quot;$(SolutionDir)compat&quot;;&quot;$(SolutionDir)3rdparty\zlib&quot;;&quot;$(SolutionDir)3rdparty\pthreads&quot;;&quot;$(SolutionDir)3rdparty\bzip2&quot;;&quot;$(SolutionDir)..&quot;"
 				PreprocessorDefinitions="WIN32_LEAN_AND_MEAN;HAVE_CONFIG_H"
 				RuntimeLibrary="2"
+				BufferSecurityCheck="false"
 				EnableFunctionLevelLinking="true"
 				UsePrecompiledHeader="0"
 				WarningLevel="3"
@@ -189,6 +190,14 @@
 				>
 			</File>
 			<Filter
+				Name="compat"
+				>
+				<File
+					RelativePath=".\compat\libgen.c"
+					>
+				</File>
+			</Filter>
+			<Filter
 				Name="shared"
 				>
 				<File
@@ -212,14 +221,6 @@
 					>
 				</File>
 			</Filter>
-			<Filter
-				Name="compat"
-				>
-				<File
-					RelativePath=".\compat\libgen.c"
-					>
-				</File>
-			</Filter>
 		</Filter>
 		<Filter
 			Name="Header Files"
diff --git a/win32/compat/net.c b/win32/compat/net.c
new file mode 100644
index 0000000..ad3a92b
--- /dev/null
+++ b/win32/compat/net.c
@@ -0,0 +1,222 @@
+#include <winsock2.h>
+#include "w32_errno.h"
+
+static void wsock2errno() {
+    switch(WSAGetLastError()) {
+	case WSA_INVALID_HANDLE:
+	case WSA_INVALID_PARAMETER: 
+	case WSAVERNOTSUPPORTED: 
+	case WSANOTINITIALISED: 
+	case WSAEINVALIDPROCTABLE: 
+	case WSAEINVALIDPROVIDER: 
+	case WSAEPROVIDERFAILEDINIT:
+	case WSASYSCALLFAILURE:
+	case WSASERVICE_NOT_FOUND:
+	case WSATYPE_NOT_FOUND:
+	    errno = EINVAL;
+	    break;
+	case WSA_OPERATION_ABORTED: 
+	case WSAENOMORE: 
+	case WSAECANCELLED: 
+	case WSA_E_NO_MORE: 
+	case WSA_E_CANCELLED: 
+	case WSA_IO_INCOMPLETE: 
+	case WSA_IO_PENDING: 
+	case WSAEREFUSED: 
+	case WSA_QOS_RECEIVERS: 
+	case WSA_QOS_SENDERS: 
+	case WSA_QOS_NO_SENDERS: 
+	case WSA_QOS_NO_RECEIVERS: 
+	case WSA_QOS_REQUEST_CONFIRMED: 
+	case WSA_QOS_ADMISSION_FAILURE: 
+	case WSA_QOS_POLICY_FAILURE: 
+	case WSA_QOS_BAD_STYLE: 
+	case WSA_QOS_BAD_OBJECT: 
+	case WSA_QOS_TRAFFIC_CTRL_ERROR: 
+	case WSA_QOS_GENERIC_ERROR: 
+	case WSA_QOS_ESERVICETYPE: 
+	case WSA_QOS_EFLOWSPEC: 
+	case WSA_QOS_EPROVSPECBUF: 
+	case WSA_QOS_EFILTERSTYLE: 
+	case WSA_QOS_EFILTERTYPE: 
+	case WSA_QOS_EFILTERCOUNT: 
+	case WSA_QOS_EOBJLENGTH: 
+	case WSA_QOS_EFLOWCOUNT: 
+	case WSA_QOS_EUNKOWNPSOBJ: 
+	case WSA_QOS_EPOLICYOBJ: 
+	case WSA_QOS_EFLOWDESC: 
+	case WSA_QOS_EPSFLOWSPEC: 
+	case WSA_QOS_EPSFILTERSPEC: 
+	case WSA_QOS_ESDMODEOBJ: 
+	case WSA_QOS_ESHAPERATEOBJ: 
+	case WSA_QOS_RESERVED_PETYPE: 
+	    errno = EBOGUSWSOCK;
+	    break;
+	case WSA_NOT_ENOUGH_MEMORY: 
+	    errno = ENOMEM;
+	    break;
+	case WSAEINTR: 
+	    errno = EINTR;
+	    break;
+	case WSAEBADF: 
+	    errno = EBADF;
+	    break;
+	case WSAEACCES: 
+	    errno = EACCES;
+	    break;
+	case WSAEFAULT: 
+	    errno = EFAULT;
+	    break;
+	case WSAEINVAL: 
+	    errno = EINVAL;
+	    break;
+	case WSAEMFILE: 
+	    errno = EMFILE;
+	    break;
+	case WSAEWOULDBLOCK: 
+	    errno = EAGAIN;
+	    break;
+	case WSAEINPROGRESS: 
+	    errno = EINPROGRESS;
+	    break;
+	case WSAEALREADY: 
+	    errno = EALREADY;
+	    break;
+	case WSAENOTSOCK: 
+	    errno = ENOTSOCK;
+	    break;
+	case WSAEDESTADDRREQ: 
+	    errno = EDESTADDRREQ;
+	    break;
+	case WSAEMSGSIZE: 
+	    errno = EMSGSIZE;
+	    break;
+	case WSAEPROTOTYPE: 
+	    errno = EPROTOTYPE;
+	    break;
+	case WSAENOPROTOOPT: 
+	    errno = ENOPROTOOPT;
+	    break;
+	case WSAEPROTONOSUPPORT: 
+	    errno = EPROTONOSUPPORT;
+	    break;
+	case WSAESOCKTNOSUPPORT: 
+	    errno = ESOCKTNOSUPPORT;
+	    break;
+	case WSAEOPNOTSUPP: 
+	    errno = EOPNOTSUPP;
+	    break;
+	case WSAEPFNOSUPPORT: 
+	    errno = EPFNOSUPPORT;
+	    break;
+	case WSAEAFNOSUPPORT: 
+	    errno = EAFNOSUPPORT;
+	    break;
+	case WSAEADDRINUSE: 
+	    errno = EADDRINUSE;
+	    break;
+	case WSAEADDRNOTAVAIL: 
+	    errno = EADDRNOTAVAIL;
+	    break;
+	case WSASYSNOTREADY:
+	case WSAENETDOWN: 
+	    errno = ENETDOWN;
+	    break;
+	case WSAENETUNREACH: 
+	    errno = ENETUNREACH;
+	    break;
+	case WSAENETRESET: 
+	    errno = ENETRESET;
+	    break;
+	case WSAECONNABORTED: 
+	    errno = ECONNABORTED;
+	    break;
+	case WSAECONNRESET:
+	case WSAEDISCON:
+	    errno = ECONNRESET;
+	    break;
+	case WSAENOBUFS: 
+	    errno = ENOBUFS;
+	    break;
+	case WSAEISCONN: 
+	    errno = EISCONN;
+	    break;
+	case WSAENOTCONN: 
+	    errno = ENOTCONN;
+	    break;
+	case WSAESHUTDOWN: 
+	    errno = ESHUTDOWN;
+	    break;
+	case WSAETOOMANYREFS: 
+	    errno = ETOOMANYREFS;
+	    break;
+	case WSAETIMEDOUT: 
+	    errno = ETIMEDOUT;
+	    break;
+	case WSAECONNREFUSED: 
+	    errno = ECONNREFUSED;
+	    break;
+	case WSAELOOP: 
+	    errno = ELOOP;
+	    break;
+	case WSAENAMETOOLONG: 
+	    errno = ENAMETOOLONG;
+	    break;
+	case WSAEHOSTDOWN: 
+	    errno = EHOSTDOWN;
+	    break;
+	case WSAEHOSTUNREACH: 
+	    errno = EHOSTUNREACH;
+	    break;
+	case WSAENOTEMPTY: 
+	    errno = ENOTEMPTY;
+	    break;
+	case WSAEPROCLIM: 
+	case WSAEUSERS: 
+	    errno = EUSERS;
+	    break;
+	case WSAEDQUOT: 
+	    errno = EDQUOT;
+	    break;
+	case WSAESTALE: 
+	    errno = ESTALE;
+	    break;
+	case WSAEREMOTE: 
+	    errno = EREMOTE;
+	    break;
+    }
+}
+
+int w32_send(int sockfd, const void *buf, size_t len, int flags) {
+    int ret;
+    if(WSASend((SOCKET)sockfd, (LPWSABUF)buf, (DWORD)len, (LPDWORD)&ret, (DWORD)flags, NULL, NULL)) {
+	wsock2errno();
+	return -1;
+    }
+    return ret;
+}
+
+/*
+int w32_gethostbyname(const char *name) {
+    struct hostent *h = gethostbyname(name);
+    h_errno = 0;
+    if(!h) {
+	switch(WSAGetLastError()) {
+	    case WSAHOST_NOT_FOUND:
+		*h_errno = HOST_NOT_FOUND;
+		break;
+	    case WSATRY_AGAIN:
+		*h_errno = TRY_AGAIN;
+		break;
+	    case WSANO_RECOVERY:
+		*h_errno = NO_RECOVERY;
+		break;
+	    case WSANO_DATA:
+		*h_errno = NO_DATA;
+		break;
+	}
+    }
+    return h;
+}
+
+*/
\ No newline at end of file
diff --git a/win32/compat/snprintf.h b/win32/compat/net.h
similarity index 85%
copy from win32/compat/snprintf.h
copy to win32/compat/net.h
index 14de256..1bcd1a9 100644
--- a/win32/compat/snprintf.h
+++ b/win32/compat/net.h
@@ -18,9 +18,9 @@
  *  MA 02110-1301, USA.
  */
 
-#ifndef __SNPRINTF_H
-#define __SNPRINTF_H
+#ifndef __NET_H
+#define __NET_H
 
-int snprintf(char *str, size_t size, const char *format, ...);
+int w32_send(int sockfd, const void *buf, size_t len, int flags);
 
-#endif /* __SNPRINTF_H */
\ No newline at end of file
+#endif
diff --git a/win32/compat/referrno.txt b/win32/compat/referrno.txt
new file mode 100644
index 0000000..e5245ba
--- /dev/null
+++ b/win32/compat/referrno.txt
@@ -0,0 +1,131 @@
+EPERM|1|Operation not permitted
+ENOENT|2|No such file or directory
+ESRCH|3|No such process
+EINTR|4|Interrupted function call
+EIO|5|Input/output error
+ENXIO|6|No such device or address
+E2BIG|7|Argument list too long
+ENOEXEC|8|Executable file format error
+EBADF|9|Bad file descriptor
+ECHILD|10|No child process
+EAGAIN|11|Resource temporarily unavailable, try again
+ENOMEM|12|Not enough space
+EACCES|13|Permission denied
+EFAULT|14|Bad address
+ENOTBLK|15|Block device required
+EBUSY|16|Device or resource busy
+EEXIST|17|File exists
+EXDEV|18|Improper link
+ENODEV|19|No such device
+ENOTDIR|20|Not a directory
+EISDIR|21|Is a directory
+EINVAL|22|Invalid argument
+ENFILE|23|Too many files open in system
+EMFILE|24|Too many open files
+ENOTTY|25|Inappropriate I/O control operation
+ETXTBSY|26|Text file busy
+EFBIG|27|File too large
+ENOSPC|28|No space left on a device
+ESPIPE|29|Invalid seek
+EROFS|30|Read-only file system
+EMLINK|31|Too many links
+EPIPE|32|Broken pipe
+EDOM|33|Mathematics argument out of domain of function
+ERANGE|34|Result too large or too small
+EDEADLK|35|Resource deadlock would occur
+ENAMETOOLONG|36|Filename too long
+ENOLCK|37|No locks available
+ENOSYS|38|Function not implemented
+ENOTEMPTY|39|Directory not empty
+ELOOP|40|Too many levels of symbolic links
+EWOULDBLOCK|41|Operation would block
+ENOMSG|42|No message of the desired type
+EIDRM|43|Identifier removed
+ECHRNG|44|Channel number out of range
+EL2NSYNC|45|Level 2 not synchronized
+EL3HLT|46|Level 3 halted
+EL3RST|47|Level 3 reset
+ELNRNG|48|Link number out of range
+EUNATCH|49|Protocol driver not attached
+ENOCSI|50|No CSI structure available
+EL2HLT|51|Level 2 halted
+EBADE|52|Invalid exchange
+EBADR|53|Invalid request descriptor
+EXFULL|54|Exchange full
+ENOANO|55|No anode
+EBADRQC|56|Invalid request code
+EBADSLT|57|Invalid slot
+EDEADLOCK|58|Resource deadlock
+EBFONT|59|Bad font file format
+ENOSTR|60|Not a STREAM
+ENODATA|61|No message available
+ETIME|62|STREAM ioctl() timeout
+ENOSR|63|No STREAM resources
+ENONET|64|Machine is not on the network
+ENOPKG|65|Package not installed
+EREMOTE|66|Object is remote
+ENOLINK|67|Reserved
+EADV|68|Advertise error
+ESRMNT|69|Srmount error
+ECOMM|70|Communication error on send
+EPROTO|71|Protocol error
+EMULTIHOP|72|Reserved
+EDOTDOT|73|RFS specific error
+EBADMSG|74|Bad Message
+EOVERFLOW|75|Value too large to be stored in data type
+ENOTUNIQ|76|Name not unique on network
+EBADFD|77|File descriptor in bad state
+EREMCHG|78|Remote address changed
+ELIBACC|79|Can not access a needed shared library
+ELIBBAD|80|Accessing a corrupted shared library
+ELIBSCN|81|.lib section in a.out corrupted
+ELIBMAX|82|Attempting to link in too many shared libraries
+ELIBEXEC|83|Cannot exec a shared library directly
+EILSEQ|84|Illegal byte sequence
+ERESTART|85|Interrupted system call should be restarted
+ESTRPIPE|86|Streams pipe error
+EUSERS|87|Too many users
+ENOTSOCK|88|Not a socket
+EDESTADDRREQ|89|Destination address required
+EMSGSIZE|90|Message too large
+EPROTOTYPE|91|Socket type not supported
+ENOPROTOOPT|92|Protocol not available
+EPROTONOSUPPORT|93|Protocol not supported
+ESOCKTNOSUPPORT|94|Socket type not supported
+EOPNOTSUPP|95|Operation not supported on socket
+EPFNOSUPPORT|96|Protocol family not supported
+EAFNOSUPPORT|97|Address family not supported
+EADDRINUSE|98|Address in use
+EADDRNOTAVAIL|99|Address not available
+ENETDOWN|100|Network is down
+ENETUNREACH|101|Network unreachable
+ENETRESET|102|Network dropped connection because of reset
+ECONNABORTED|103|Connection aborted
+ECONNRESET|104|Connection reset
+ENOBUFS|105|No buffer space available
+EISCONN|106|Socket is connected
+ENOTCONN|107|Socket not connected
+ESHUTDOWN|108|Cannot send after transport endpoint shutdown
+ETOOMANYREFS|109|Too many references: cannot splice
+ETIMEDOUT|110|Connection timed out
+ECONNREFUSED|111|Connection refused
+EHOSTDOWN|112|Host is down
+EHOSTUNREACH|113|Host is unreachable
+EALREADY|114|Connection already in progress
+EINPROGRESS|115|Operation in progress
+ESTALE|116|Reserved
+EUCLEAN|117|Structure needs cleaning
+ENOTNAM|118|Not a XENIX named type file
+ENAVAIL|119|No XENIX semaphores available
+EISNAM|120|Is a named type file
+EREMOTEIO|121|Remote I/O error
+EDQUOT|122|Reserved
+ENOMEDIUM|123|No medium found
+EMEDIUMTYPE|124|Wrong medium type
+ECANCELED|125|Operation canceled
+ENOKEY|126|Required key not available
+EKEYEXPIRED|127|Key has expired
+EKEYREVOKED|128|Key has been revoked
+EKEYREJECTED|129|Key was rejected by service
+EOWNERDEAD|130|Owner died
+ENOTRECOVERABLE|131|State not recoverable
diff --git a/win32/compat/regen_errno_defs.sh b/win32/compat/regen_errno_defs.sh
new file mode 100644
index 0000000..762937f
--- /dev/null
+++ b/win32/compat/regen_errno_defs.sh
@@ -0,0 +1,57 @@
+#!/bin/bash
+
+IFS='
+'
+GIT_DIR=$(git rev-parse --git-dir)
+if [ -z "$GIT_DIR" ]; then
+	echo "run me from a git path"
+	exit 1
+fi
+
+BASEDIR="$GIT_DIR/.."
+pushd "$BASEDIR" > /dev/null
+
+GIT_DIR=$(git rev-parse --git-dir)
+BASEDIR="$GIT_DIR/.."
+
+DATE=`date`
+OUTFILE="$BASEDIR/win32/compat/w32_errno_defs.c"
+INFILE="$BASEDIR/win32/compat/referrno.txt"
+
+if [ ! -f "$INFILE" ]; then
+	echo "reference file missing"
+	exit 1
+fi
+
+
+cat > "$OUTFILE" <<EOH
+/* Automatically generated on $DATE */
+
+#include <errno.h>
+
+static const struct errno_struct {
+	int err;
+	const char *strerr;
+} w32_errnos[] = {
+EOH
+
+maxerr=0
+
+for pippo in `cat "$INFILE"`; do
+	symbol=`echo $pippo | cut -d'|' -f1`
+	value=`echo $pippo | cut -d'|' -f2`
+	value=$((value+1000))
+	[ $value -gt $maxerr ] && maxerr=$value
+	descr=`echo $pippo | cut -d'|' -f3`
+	git grep $symbol > /dev/null
+	used=$?
+	[ $used -ne 0 ] && echo "#ifdef __ERRNO_INCLUDE_UNUSED" >> "$OUTFILE"
+	echo -e "#ifndef $symbol\n#define $symbol $value\n#endif\n{ $symbol, \"$descr\" }," >> "$OUTFILE"
+	[ $used -ne 0 ] && echo "#endif /* __ERRNO_INCLUDE_UNUSED */" >> "$OUTFILE"
+done
+maxerr=$((maxerr+1))
+echo -e "#ifndef EBOGUSWSOCK\n#define EBOGUSWSOCK $maxerr\n#endif\n{ EBOGUSWSOCK, \"WinSock error\"}\n};" >> "$OUTFILE"
+
+popd >/dev/null
+
+
diff --git a/libclamav/7z.h b/win32/compat/w32_errno.c
similarity index 87%
copy from libclamav/7z.h
copy to win32/compat/w32_errno.c
index cdc11fd..b51273c 100644
--- a/libclamav/7z.h
+++ b/win32/compat/w32_errno.c
@@ -1,7 +1,7 @@
 /*
  *  Copyright (C) 2009 Sourcefire, Inc.
  *
- *  Authors: aCaB
+ *  Authors: aCaB <acab at clamav.net>
  *
  *  This program is free software; you can redistribute it and/or modify
  *  it under the terms of the GNU General Public License version 2 as
@@ -18,15 +18,11 @@
  *  MA 02110-1301, USA.
  */
 
-#ifndef __7Z_H
-#define __7Z_H
-
 #if HAVE_CONFIG_H
 #include "clamav-config.h"
 #endif
 
-#include "others.h"
+#include "w32_errno.h"
+
 
-int cli_7unz (int, cli_ctx *);
 
-#endif
diff --git a/win32/compat/snprintf.h b/win32/compat/w32_errno.h
similarity index 85%
copy from win32/compat/snprintf.h
copy to win32/compat/w32_errno.h
index 14de256..cf91e96 100644
--- a/win32/compat/snprintf.h
+++ b/win32/compat/w32_errno.h
@@ -18,9 +18,10 @@
  *  MA 02110-1301, USA.
  */
 
-#ifndef __SNPRINTF_H
-#define __SNPRINTF_H
+#ifndef __W32_ERRNO_H
+#define __W32_ERRNO_H
 
-int snprintf(char *str, size_t size, const char *format, ...);
+#include <errno.h>
+#include "w32_errno_defs.c"
 
-#endif /* __SNPRINTF_H */
\ No newline at end of file
+#endif
\ No newline at end of file
diff --git a/win32/compat/w32_errno_defs.c b/win32/compat/w32_errno_defs.c
new file mode 100644
index 0000000..f68dba1
--- /dev/null
+++ b/win32/compat/w32_errno_defs.c
@@ -0,0 +1,649 @@
+/* Automatically generated on Wed Oct 14 14:49:39 GMT 2009 */
+
+#include <errno.h>
+
+static const struct errno_struct {
+	int err;
+	const char *strerr;
+} w32_errnos[] = {
+#ifndef EPERM
+#define EPERM 1001
+#endif
+{ EPERM, "Operation not permitted" },
+#ifndef ENOENT
+#define ENOENT 1002
+#endif
+{ ENOENT, "No such file or directory" },
+#ifndef ESRCH
+#define ESRCH 1003
+#endif
+{ ESRCH, "No such process" },
+#ifndef EINTR
+#define EINTR 1004
+#endif
+{ EINTR, "Interrupted function call" },
+#ifndef EIO
+#define EIO 1005
+#endif
+{ EIO, "Input/output error" },
+#ifndef ENXIO
+#define ENXIO 1006
+#endif
+{ ENXIO, "No such device or address" },
+#ifndef E2BIG
+#define E2BIG 1007
+#endif
+{ E2BIG, "Argument list too long" },
+#ifndef ENOEXEC
+#define ENOEXEC 1008
+#endif
+{ ENOEXEC, "Executable file format error" },
+#ifndef EBADF
+#define EBADF 1009
+#endif
+{ EBADF, "Bad file descriptor" },
+#ifndef ECHILD
+#define ECHILD 1010
+#endif
+{ ECHILD, "No child process" },
+#ifndef EAGAIN
+#define EAGAIN 1011
+#endif
+{ EAGAIN, "Resource temporarily unavailable, try again" },
+#ifndef ENOMEM
+#define ENOMEM 1012
+#endif
+{ ENOMEM, "Not enough space" },
+#ifndef EACCES
+#define EACCES 1013
+#endif
+{ EACCES, "Permission denied" },
+#ifndef EFAULT
+#define EFAULT 1014
+#endif
+{ EFAULT, "Bad address" },
+#ifdef __ERRNO_INCLUDE_UNUSED
+#ifndef ENOTBLK
+#define ENOTBLK 1015
+#endif
+{ ENOTBLK, "Block device required" },
+#endif /* __ERRNO_INCLUDE_UNUSED */
+#ifndef EBUSY
+#define EBUSY 1016
+#endif
+{ EBUSY, "Device or resource busy" },
+#ifndef EEXIST
+#define EEXIST 1017
+#endif
+{ EEXIST, "File exists" },
+#ifndef EXDEV
+#define EXDEV 1018
+#endif
+{ EXDEV, "Improper link" },
+#ifndef ENODEV
+#define ENODEV 1019
+#endif
+{ ENODEV, "No such device" },
+#ifndef ENOTDIR
+#define ENOTDIR 1020
+#endif
+{ ENOTDIR, "Not a directory" },
+#ifndef EISDIR
+#define EISDIR 1021
+#endif
+{ EISDIR, "Is a directory" },
+#ifndef EINVAL
+#define EINVAL 1022
+#endif
+{ EINVAL, "Invalid argument" },
+#ifndef ENFILE
+#define ENFILE 1023
+#endif
+{ ENFILE, "Too many files open in system" },
+#ifndef EMFILE
+#define EMFILE 1024
+#endif
+{ EMFILE, "Too many open files" },
+#ifndef ENOTTY
+#define ENOTTY 1025
+#endif
+{ ENOTTY, "Inappropriate I/O control operation" },
+#ifdef __ERRNO_INCLUDE_UNUSED
+#ifndef ETXTBSY
+#define ETXTBSY 1026
+#endif
+{ ETXTBSY, "Text file busy" },
+#endif /* __ERRNO_INCLUDE_UNUSED */
+#ifndef EFBIG
+#define EFBIG 1027
+#endif
+{ EFBIG, "File too large" },
+#ifndef ENOSPC
+#define ENOSPC 1028
+#endif
+{ ENOSPC, "No space left on a device" },
+#ifndef ESPIPE
+#define ESPIPE 1029
+#endif
+{ ESPIPE, "Invalid seek" },
+#ifndef EROFS
+#define EROFS 1030
+#endif
+{ EROFS, "Read-only file system" },
+#ifndef EMLINK
+#define EMLINK 1031
+#endif
+{ EMLINK, "Too many links" },
+#ifndef EPIPE
+#define EPIPE 1032
+#endif
+{ EPIPE, "Broken pipe" },
+#ifndef EDOM
+#define EDOM 1033
+#endif
+{ EDOM, "Mathematics argument out of domain of function" },
+#ifndef ERANGE
+#define ERANGE 1034
+#endif
+{ ERANGE, "Result too large or too small" },
+#ifndef EDEADLK
+#define EDEADLK 1035
+#endif
+{ EDEADLK, "Resource deadlock would occur" },
+#ifndef ENAMETOOLONG
+#define ENAMETOOLONG 1036
+#endif
+{ ENAMETOOLONG, "Filename too long" },
+#ifndef ENOLCK
+#define ENOLCK 1037
+#endif
+{ ENOLCK, "No locks available" },
+#ifndef ENOSYS
+#define ENOSYS 1038
+#endif
+{ ENOSYS, "Function not implemented" },
+#ifndef ENOTEMPTY
+#define ENOTEMPTY 1039
+#endif
+{ ENOTEMPTY, "Directory not empty" },
+#ifndef ELOOP
+#define ELOOP 1040
+#endif
+{ ELOOP, "Too many levels of symbolic links" },
+#ifndef EWOULDBLOCK
+#define EWOULDBLOCK 1041
+#endif
+{ EWOULDBLOCK, "Operation would block" },
+#ifdef __ERRNO_INCLUDE_UNUSED
+#ifndef ENOMSG
+#define ENOMSG 1042
+#endif
+{ ENOMSG, "No message of the desired type" },
+#endif /* __ERRNO_INCLUDE_UNUSED */
+#ifdef __ERRNO_INCLUDE_UNUSED
+#ifndef EIDRM
+#define EIDRM 1043
+#endif
+{ EIDRM, "Identifier removed" },
+#endif /* __ERRNO_INCLUDE_UNUSED */
+#ifdef __ERRNO_INCLUDE_UNUSED
+#ifndef ECHRNG
+#define ECHRNG 1044
+#endif
+{ ECHRNG, "Channel number out of range" },
+#endif /* __ERRNO_INCLUDE_UNUSED */
+#ifdef __ERRNO_INCLUDE_UNUSED
+#ifndef EL2NSYNC
+#define EL2NSYNC 1045
+#endif
+{ EL2NSYNC, "Level 2 not synchronized" },
+#endif /* __ERRNO_INCLUDE_UNUSED */
+#ifdef __ERRNO_INCLUDE_UNUSED
+#ifndef EL3HLT
+#define EL3HLT 1046
+#endif
+{ EL3HLT, "Level 3 halted" },
+#endif /* __ERRNO_INCLUDE_UNUSED */
+#ifdef __ERRNO_INCLUDE_UNUSED
+#ifndef EL3RST
+#define EL3RST 1047
+#endif
+{ EL3RST, "Level 3 reset" },
+#endif /* __ERRNO_INCLUDE_UNUSED */
+#ifdef __ERRNO_INCLUDE_UNUSED
+#ifndef ELNRNG
+#define ELNRNG 1048
+#endif
+{ ELNRNG, "Link number out of range" },
+#endif /* __ERRNO_INCLUDE_UNUSED */
+#ifdef __ERRNO_INCLUDE_UNUSED
+#ifndef EUNATCH
+#define EUNATCH 1049
+#endif
+{ EUNATCH, "Protocol driver not attached" },
+#endif /* __ERRNO_INCLUDE_UNUSED */
+#ifdef __ERRNO_INCLUDE_UNUSED
+#ifndef ENOCSI
+#define ENOCSI 1050
+#endif
+{ ENOCSI, "No CSI structure available" },
+#endif /* __ERRNO_INCLUDE_UNUSED */
+#ifdef __ERRNO_INCLUDE_UNUSED
+#ifndef EL2HLT
+#define EL2HLT 1051
+#endif
+{ EL2HLT, "Level 2 halted" },
+#endif /* __ERRNO_INCLUDE_UNUSED */
+#ifdef __ERRNO_INCLUDE_UNUSED
+#ifndef EBADE
+#define EBADE 1052
+#endif
+{ EBADE, "Invalid exchange" },
+#endif /* __ERRNO_INCLUDE_UNUSED */
+#ifdef __ERRNO_INCLUDE_UNUSED
+#ifndef EBADR
+#define EBADR 1053
+#endif
+{ EBADR, "Invalid request descriptor" },
+#endif /* __ERRNO_INCLUDE_UNUSED */
+#ifdef __ERRNO_INCLUDE_UNUSED
+#ifndef EXFULL
+#define EXFULL 1054
+#endif
+{ EXFULL, "Exchange full" },
+#endif /* __ERRNO_INCLUDE_UNUSED */
+#ifdef __ERRNO_INCLUDE_UNUSED
+#ifndef ENOANO
+#define ENOANO 1055
+#endif
+{ ENOANO, "No anode" },
+#endif /* __ERRNO_INCLUDE_UNUSED */
+#ifdef __ERRNO_INCLUDE_UNUSED
+#ifndef EBADRQC
+#define EBADRQC 1056
+#endif
+{ EBADRQC, "Invalid request code" },
+#endif /* __ERRNO_INCLUDE_UNUSED */
+#ifdef __ERRNO_INCLUDE_UNUSED
+#ifndef EBADSLT
+#define EBADSLT 1057
+#endif
+{ EBADSLT, "Invalid slot" },
+#endif /* __ERRNO_INCLUDE_UNUSED */
+#ifndef EDEADLOCK
+#define EDEADLOCK 1058
+#endif
+{ EDEADLOCK, "Resource deadlock" },
+#ifdef __ERRNO_INCLUDE_UNUSED
+#ifndef EBFONT
+#define EBFONT 1059
+#endif
+{ EBFONT, "Bad font file format" },
+#endif /* __ERRNO_INCLUDE_UNUSED */
+#ifdef __ERRNO_INCLUDE_UNUSED
+#ifndef ENOSTR
+#define ENOSTR 1060
+#endif
+{ ENOSTR, "Not a STREAM" },
+#endif /* __ERRNO_INCLUDE_UNUSED */
+#ifdef __ERRNO_INCLUDE_UNUSED
+#ifndef ENODATA
+#define ENODATA 1061
+#endif
+{ ENODATA, "No message available" },
+#endif /* __ERRNO_INCLUDE_UNUSED */
+#ifndef ETIME
+#define ETIME 1062
+#endif
+{ ETIME, "STREAM ioctl() timeout" },
+#ifdef __ERRNO_INCLUDE_UNUSED
+#ifndef ENOSR
+#define ENOSR 1063
+#endif
+{ ENOSR, "No STREAM resources" },
+#endif /* __ERRNO_INCLUDE_UNUSED */
+#ifdef __ERRNO_INCLUDE_UNUSED
+#ifndef ENONET
+#define ENONET 1064
+#endif
+{ ENONET, "Machine is not on the network" },
+#endif /* __ERRNO_INCLUDE_UNUSED */
+#ifdef __ERRNO_INCLUDE_UNUSED
+#ifndef ENOPKG
+#define ENOPKG 1065
+#endif
+{ ENOPKG, "Package not installed" },
+#endif /* __ERRNO_INCLUDE_UNUSED */
+#ifndef EREMOTE
+#define EREMOTE 1066
+#endif
+{ EREMOTE, "Object is remote" },
+#ifdef __ERRNO_INCLUDE_UNUSED
+#ifndef ENOLINK
+#define ENOLINK 1067
+#endif
+{ ENOLINK, "Reserved" },
+#endif /* __ERRNO_INCLUDE_UNUSED */
+#ifdef __ERRNO_INCLUDE_UNUSED
+#ifndef EADV
+#define EADV 1068
+#endif
+{ EADV, "Advertise error" },
+#endif /* __ERRNO_INCLUDE_UNUSED */
+#ifdef __ERRNO_INCLUDE_UNUSED
+#ifndef ESRMNT
+#define ESRMNT 1069
+#endif
+{ ESRMNT, "Srmount error" },
+#endif /* __ERRNO_INCLUDE_UNUSED */
+#ifdef __ERRNO_INCLUDE_UNUSED
+#ifndef ECOMM
+#define ECOMM 1070
+#endif
+{ ECOMM, "Communication error on send" },
+#endif /* __ERRNO_INCLUDE_UNUSED */
+#ifndef EPROTO
+#define EPROTO 1071
+#endif
+{ EPROTO, "Protocol error" },
+#ifdef __ERRNO_INCLUDE_UNUSED
+#ifndef EMULTIHOP
+#define EMULTIHOP 1072
+#endif
+{ EMULTIHOP, "Reserved" },
+#endif /* __ERRNO_INCLUDE_UNUSED */
+#ifdef __ERRNO_INCLUDE_UNUSED
+#ifndef EDOTDOT
+#define EDOTDOT 1073
+#endif
+{ EDOTDOT, "RFS specific error" },
+#endif /* __ERRNO_INCLUDE_UNUSED */
+#ifdef __ERRNO_INCLUDE_UNUSED
+#ifndef EBADMSG
+#define EBADMSG 1074
+#endif
+{ EBADMSG, "Bad Message" },
+#endif /* __ERRNO_INCLUDE_UNUSED */
+#ifdef __ERRNO_INCLUDE_UNUSED
+#ifndef EOVERFLOW
+#define EOVERFLOW 1075
+#endif
+{ EOVERFLOW, "Value too large to be stored in data type" },
+#endif /* __ERRNO_INCLUDE_UNUSED */
+#ifdef __ERRNO_INCLUDE_UNUSED
+#ifndef ENOTUNIQ
+#define ENOTUNIQ 1076
+#endif
+{ ENOTUNIQ, "Name not unique on network" },
+#endif /* __ERRNO_INCLUDE_UNUSED */
+#ifdef __ERRNO_INCLUDE_UNUSED
+#ifndef EBADFD
+#define EBADFD 1077
+#endif
+{ EBADFD, "File descriptor in bad state" },
+#endif /* __ERRNO_INCLUDE_UNUSED */
+#ifdef __ERRNO_INCLUDE_UNUSED
+#ifndef EREMCHG
+#define EREMCHG 1078
+#endif
+{ EREMCHG, "Remote address changed" },
+#endif /* __ERRNO_INCLUDE_UNUSED */
+#ifdef __ERRNO_INCLUDE_UNUSED
+#ifndef ELIBACC
+#define ELIBACC 1079
+#endif
+{ ELIBACC, "Can not access a needed shared library" },
+#endif /* __ERRNO_INCLUDE_UNUSED */
+#ifdef __ERRNO_INCLUDE_UNUSED
+#ifndef ELIBBAD
+#define ELIBBAD 1080
+#endif
+{ ELIBBAD, "Accessing a corrupted shared library" },
+#endif /* __ERRNO_INCLUDE_UNUSED */
+#ifdef __ERRNO_INCLUDE_UNUSED
+#ifndef ELIBSCN
+#define ELIBSCN 1081
+#endif
+{ ELIBSCN, ".lib section in a.out corrupted" },
+#endif /* __ERRNO_INCLUDE_UNUSED */
+#ifdef __ERRNO_INCLUDE_UNUSED
+#ifndef ELIBMAX
+#define ELIBMAX 1082
+#endif
+{ ELIBMAX, "Attempting to link in too many shared libraries" },
+#endif /* __ERRNO_INCLUDE_UNUSED */
+#ifdef __ERRNO_INCLUDE_UNUSED
+#ifndef ELIBEXEC
+#define ELIBEXEC 1083
+#endif
+{ ELIBEXEC, "Cannot exec a shared library directly" },
+#endif /* __ERRNO_INCLUDE_UNUSED */
+#ifndef EILSEQ
+#define EILSEQ 1084
+#endif
+{ EILSEQ, "Illegal byte sequence" },
+#ifdef __ERRNO_INCLUDE_UNUSED
+#ifndef ERESTART
+#define ERESTART 1085
+#endif
+{ ERESTART, "Interrupted system call should be restarted" },
+#endif /* __ERRNO_INCLUDE_UNUSED */
+#ifdef __ERRNO_INCLUDE_UNUSED
+#ifndef ESTRPIPE
+#define ESTRPIPE 1086
+#endif
+{ ESTRPIPE, "Streams pipe error" },
+#endif /* __ERRNO_INCLUDE_UNUSED */
+#ifndef EUSERS
+#define EUSERS 1087
+#endif
+{ EUSERS, "Too many users" },
+#ifndef ENOTSOCK
+#define ENOTSOCK 1088
+#endif
+{ ENOTSOCK, "Not a socket" },
+#ifndef EDESTADDRREQ
+#define EDESTADDRREQ 1089
+#endif
+{ EDESTADDRREQ, "Destination address required" },
+#ifndef EMSGSIZE
+#define EMSGSIZE 1090
+#endif
+{ EMSGSIZE, "Message too large" },
+#ifndef EPROTOTYPE
+#define EPROTOTYPE 1091
+#endif
+{ EPROTOTYPE, "Socket type not supported" },
+#ifndef ENOPROTOOPT
+#define ENOPROTOOPT 1092
+#endif
+{ ENOPROTOOPT, "Protocol not available" },
+#ifndef EPROTONOSUPPORT
+#define EPROTONOSUPPORT 1093
+#endif
+{ EPROTONOSUPPORT, "Protocol not supported" },
+#ifndef ESOCKTNOSUPPORT
+#define ESOCKTNOSUPPORT 1094
+#endif
+{ ESOCKTNOSUPPORT, "Socket type not supported" },
+#ifndef EOPNOTSUPP
+#define EOPNOTSUPP 1095
+#endif
+{ EOPNOTSUPP, "Operation not supported on socket" },
+#ifndef EPFNOSUPPORT
+#define EPFNOSUPPORT 1096
+#endif
+{ EPFNOSUPPORT, "Protocol family not supported" },
+#ifndef EAFNOSUPPORT
+#define EAFNOSUPPORT 1097
+#endif
+{ EAFNOSUPPORT, "Address family not supported" },
+#ifndef EADDRINUSE
+#define EADDRINUSE 1098
+#endif
+{ EADDRINUSE, "Address in use" },
+#ifndef EADDRNOTAVAIL
+#define EADDRNOTAVAIL 1099
+#endif
+{ EADDRNOTAVAIL, "Address not available" },
+#ifndef ENETDOWN
+#define ENETDOWN 1100
+#endif
+{ ENETDOWN, "Network is down" },
+#ifndef ENETUNREACH
+#define ENETUNREACH 1101
+#endif
+{ ENETUNREACH, "Network unreachable" },
+#ifndef ENETRESET
+#define ENETRESET 1102
+#endif
+{ ENETRESET, "Network dropped connection because of reset" },
+#ifndef ECONNABORTED
+#define ECONNABORTED 1103
+#endif
+{ ECONNABORTED, "Connection aborted" },
+#ifndef ECONNRESET
+#define ECONNRESET 1104
+#endif
+{ ECONNRESET, "Connection reset" },
+#ifndef ENOBUFS
+#define ENOBUFS 1105
+#endif
+{ ENOBUFS, "No buffer space available" },
+#ifndef EISCONN
+#define EISCONN 1106
+#endif
+{ EISCONN, "Socket is connected" },
+#ifndef ENOTCONN
+#define ENOTCONN 1107
+#endif
+{ ENOTCONN, "Socket not connected" },
+#ifndef ESHUTDOWN
+#define ESHUTDOWN 1108
+#endif
+{ ESHUTDOWN, "Cannot send after transport endpoint shutdown" },
+#ifndef ETOOMANYREFS
+#define ETOOMANYREFS 1109
+#endif
+{ ETOOMANYREFS, "Too many references: cannot splice" },
+#ifndef ETIMEDOUT
+#define ETIMEDOUT 1110
+#endif
+{ ETIMEDOUT, "Connection timed out" },
+#ifndef ECONNREFUSED
+#define ECONNREFUSED 1111
+#endif
+{ ECONNREFUSED, "Connection refused" },
+#ifndef EHOSTDOWN
+#define EHOSTDOWN 1112
+#endif
+{ EHOSTDOWN, "Host is down" },
+#ifndef EHOSTUNREACH
+#define EHOSTUNREACH 1113
+#endif
+{ EHOSTUNREACH, "Host is unreachable" },
+#ifndef EALREADY
+#define EALREADY 1114
+#endif
+{ EALREADY, "Connection already in progress" },
+#ifndef EINPROGRESS
+#define EINPROGRESS 1115
+#endif
+{ EINPROGRESS, "Operation in progress" },
+#ifndef ESTALE
+#define ESTALE 1116
+#endif
+{ ESTALE, "Reserved" },
+#ifdef __ERRNO_INCLUDE_UNUSED
+#ifndef EUCLEAN
+#define EUCLEAN 1117
+#endif
+{ EUCLEAN, "Structure needs cleaning" },
+#endif /* __ERRNO_INCLUDE_UNUSED */
+#ifdef __ERRNO_INCLUDE_UNUSED
+#ifndef ENOTNAM
+#define ENOTNAM 1118
+#endif
+{ ENOTNAM, "Not a XENIX named type file" },
+#endif /* __ERRNO_INCLUDE_UNUSED */
+#ifdef __ERRNO_INCLUDE_UNUSED
+#ifndef ENAVAIL
+#define ENAVAIL 1119
+#endif
+{ ENAVAIL, "No XENIX semaphores available" },
+#endif /* __ERRNO_INCLUDE_UNUSED */
+#ifdef __ERRNO_INCLUDE_UNUSED
+#ifndef EISNAM
+#define EISNAM 1120
+#endif
+{ EISNAM, "Is a named type file" },
+#endif /* __ERRNO_INCLUDE_UNUSED */
+#ifdef __ERRNO_INCLUDE_UNUSED
+#ifndef EREMOTEIO
+#define EREMOTEIO 1121
+#endif
+{ EREMOTEIO, "Remote I/O error" },
+#endif /* __ERRNO_INCLUDE_UNUSED */
+#ifndef EDQUOT
+#define EDQUOT 1122
+#endif
+{ EDQUOT, "Reserved" },
+#ifdef __ERRNO_INCLUDE_UNUSED
+#ifndef ENOMEDIUM
+#define ENOMEDIUM 1123
+#endif
+{ ENOMEDIUM, "No medium found" },
+#endif /* __ERRNO_INCLUDE_UNUSED */
+#ifdef __ERRNO_INCLUDE_UNUSED
+#ifndef EMEDIUMTYPE
+#define EMEDIUMTYPE 1124
+#endif
+{ EMEDIUMTYPE, "Wrong medium type" },
+#endif /* __ERRNO_INCLUDE_UNUSED */
+#ifdef __ERRNO_INCLUDE_UNUSED
+#ifndef ECANCELED
+#define ECANCELED 1125
+#endif
+{ ECANCELED, "Operation canceled" },
+#endif /* __ERRNO_INCLUDE_UNUSED */
+#ifdef __ERRNO_INCLUDE_UNUSED
+#ifndef ENOKEY
+#define ENOKEY 1126
+#endif
+{ ENOKEY, "Required key not available" },
+#endif /* __ERRNO_INCLUDE_UNUSED */
+#ifdef __ERRNO_INCLUDE_UNUSED
+#ifndef EKEYEXPIRED
+#define EKEYEXPIRED 1127
+#endif
+{ EKEYEXPIRED, "Key has expired" },
+#endif /* __ERRNO_INCLUDE_UNUSED */
+#ifdef __ERRNO_INCLUDE_UNUSED
+#ifndef EKEYREVOKED
+#define EKEYREVOKED 1128
+#endif
+{ EKEYREVOKED, "Key has been revoked" },
+#endif /* __ERRNO_INCLUDE_UNUSED */
+#ifdef __ERRNO_INCLUDE_UNUSED
+#ifndef EKEYREJECTED
+#define EKEYREJECTED 1129
+#endif
+{ EKEYREJECTED, "Key was rejected by service" },
+#endif /* __ERRNO_INCLUDE_UNUSED */
+#ifdef __ERRNO_INCLUDE_UNUSED
+#ifndef EOWNERDEAD
+#define EOWNERDEAD 1130
+#endif
+{ EOWNERDEAD, "Owner died" },
+#endif /* __ERRNO_INCLUDE_UNUSED */
+#ifdef __ERRNO_INCLUDE_UNUSED
+#ifndef ENOTRECOVERABLE
+#define ENOTRECOVERABLE 1131
+#endif
+{ ENOTRECOVERABLE, "State not recoverable" },
+#endif /* __ERRNO_INCLUDE_UNUSED */
+#ifndef EBOGUSWSOCK
+#define EBOGUSWSOCK 1132
+#endif
+{ EBOGUSWSOCK, "WinSock error"}
+};
diff --git a/win32/clamscan.vcproj b/win32/freshclam.vcproj
similarity index 82%
copy from win32/clamscan.vcproj
copy to win32/freshclam.vcproj
index 875d3a9..93876bf 100644
--- a/win32/clamscan.vcproj
+++ b/win32/freshclam.vcproj
@@ -2,9 +2,9 @@
 <VisualStudioProject
 	ProjectType="Visual C++"
 	Version="9,00"
-	Name="clamscan"
-	ProjectGUID="{F79E7CA7-E49D-479E-8D68-0EA9CB585575}"
-	RootNamespace="clamscan"
+	Name="freshclam"
+	ProjectGUID="{CEA52DD8-0418-42AD-B640-F33CC7C600CE}"
+	RootNamespace="freshclam"
 	Keyword="Win32Proj"
 	TargetFrameworkVersion="196613"
 	>
@@ -48,7 +48,7 @@
 				RuntimeLibrary="3"
 				UsePrecompiledHeader="0"
 				WarningLevel="3"
-				DebugInformationFormat="4"
+				DebugInformationFormat="3"
 				CompileAs="1"
 				DisableSpecificWarnings="4996;4244;4018;4090;4333;4101;4146"
 			/>
@@ -120,6 +120,7 @@
 				AdditionalIncludeDirectories="&quot;$(SolutionDir)&quot;;&quot;$(SolutionDir)..\libclamav&quot;;&quot;$(SolutionDir)compat&quot;;&quot;$(SolutionDir)3rdparty\zlib&quot;;&quot;$(SolutionDir)3rdparty\pthreads&quot;;&quot;$(SolutionDir)3rdparty\bzip2&quot;;&quot;$(SolutionDir)..&quot;"
 				PreprocessorDefinitions="WIN32_LEAN_AND_MEAN;HAVE_CONFIG_H"
 				RuntimeLibrary="2"
+				BufferSecurityCheck="false"
 				EnableFunctionLevelLinking="true"
 				UsePrecompiledHeader="0"
 				WarningLevel="3"
@@ -177,49 +178,33 @@
 			UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}"
 			>
 			<File
-				RelativePath="..\clamscan\clamscan.c"
+				RelativePath="..\freshclam\dns.c"
 				>
 			</File>
 			<File
-				RelativePath="..\clamscan\manager.c"
+				RelativePath="..\freshclam\execute.c"
 				>
 			</File>
 			<File
-				RelativePath="..\clamscan\others.c"
+				RelativePath="..\freshclam\freshclam.c"
 				>
 			</File>
-			<Filter
-				Name="shared"
+			<File
+				RelativePath="..\freshclam\manager.c"
 				>
-				<File
-					RelativePath="..\shared\actions.c"
-					>
-				</File>
-				<File
-					RelativePath="..\shared\getopt.c"
-					>
-				</File>
-				<File
-					RelativePath="..\shared\misc.c"
-					>
-				</File>
-				<File
-					RelativePath="..\shared\optparser.c"
-					>
-				</File>
-				<File
-					RelativePath="..\shared\output.c"
-					>
-				</File>
-			</Filter>
-			<Filter
-				Name="compat"
+			</File>
+			<File
+				RelativePath="..\freshclam\mirman.c"
 				>
-				<File
-					RelativePath=".\compat\libgen.c"
-					>
-				</File>
-			</Filter>
+			</File>
+			<File
+				RelativePath="..\freshclam\nonblock.c"
+				>
+			</File>
+			<File
+				RelativePath="..\freshclam\notify.c"
+				>
+			</File>
 		</Filter>
 		<Filter
 			Name="Header Files"
diff --git a/win32/libclamav.def b/win32/libclamav.def
index 99ed064..0e56f08 100644
--- a/win32/libclamav.def
+++ b/win32/libclamav.def
@@ -33,6 +33,6 @@ EXPORTS snprintf
 ; winsock - bridging for now
 EXPORTS htonl
 EXPORTS htons
-EXPORTS send
+EXPORTS w32_send
 EXPORTS select
 EXPORTS gethostbyname
diff --git a/win32/libclamav.vcproj b/win32/libclamav.vcproj
index e92019d..0078786 100644
--- a/win32/libclamav.vcproj
+++ b/win32/libclamav.vcproj
@@ -48,7 +48,7 @@
 				RuntimeLibrary="3"
 				UsePrecompiledHeader="0"
 				WarningLevel="3"
-				DebugInformationFormat="4"
+				DebugInformationFormat="3"
 				CompileAs="1"
 				DisableSpecificWarnings="4996;4244;4018;4090;4333;4101;4146"
 			/>
@@ -123,6 +123,7 @@
 				AdditionalIncludeDirectories="&quot;$(SolutionDir)&quot;;&quot;$(SolutionDir)..\libclamav&quot;;&quot;$(SolutionDir)compat&quot;;&quot;$(SolutionDir)3rdparty\zlib&quot;;&quot;$(SolutionDir)3rdparty\pthreads&quot;;&quot;$(SolutionDir)3rdparty\bzip2&quot;;&quot;$(SolutionDir)..&quot;"
 				PreprocessorDefinitions="WIN32_LEAN_AND_MEAN;HAVE_CONFIG_H"
 				RuntimeLibrary="2"
+				BufferSecurityCheck="false"
 				EnableFunctionLevelLinking="true"
 				UsePrecompiledHeader="0"
 				WarningLevel="3"
@@ -779,9 +780,25 @@
 					>
 				</File>
 				<File
+					RelativePath=".\compat\net.c"
+					>
+				</File>
+				<File
+					RelativePath=".\compat\net.h"
+					>
+				</File>
+				<File
 					RelativePath=".\compat\snprintf.c"
 					>
 				</File>
+				<File
+					RelativePath=".\compat\w32_errno.c"
+					>
+				</File>
+				<File
+					RelativePath=".\compat\w32_errno.h"
+					>
+				</File>
 			</Filter>
 		</Filter>
 		<Filter
diff --git a/win32/libclamunrar.vcproj b/win32/libclamunrar.vcproj
index 66f334e..22c585d 100644
--- a/win32/libclamunrar.vcproj
+++ b/win32/libclamunrar.vcproj
@@ -48,7 +48,7 @@
 				RuntimeLibrary="3"
 				UsePrecompiledHeader="0"
 				WarningLevel="3"
-				DebugInformationFormat="4"
+				DebugInformationFormat="3"
 				CompileAs="1"
 				DisableSpecificWarnings="4996;4244;4018;4146"
 			/>
@@ -121,6 +121,7 @@
 				AdditionalIncludeDirectories="&quot;$(SolutionDir)&quot;;&quot;$(SolutionDir)compat&quot;;&quot;$(SolutionDir)..&quot;"
 				PreprocessorDefinitions="WIN32_LEAN_AND_MEAN;HAVE_CONFIG_H"
 				RuntimeLibrary="2"
+				BufferSecurityCheck="false"
 				EnableFunctionLevelLinking="true"
 				UsePrecompiledHeader="0"
 				WarningLevel="3"
diff --git a/win32/libclamunrar_iface.vcproj b/win32/libclamunrar_iface.vcproj
index ae91fab..ba8f57c 100644
--- a/win32/libclamunrar_iface.vcproj
+++ b/win32/libclamunrar_iface.vcproj
@@ -48,7 +48,7 @@
 				RuntimeLibrary="3"
 				UsePrecompiledHeader="0"
 				WarningLevel="3"
-				DebugInformationFormat="4"
+				DebugInformationFormat="3"
 				CompileAs="1"
 				DisableSpecificWarnings="4996"
 			/>
@@ -121,6 +121,7 @@
 				AdditionalIncludeDirectories="&quot;$(SolutionDir)&quot;;&quot;$(SolutionDir)compat&quot;;&quot;$(SolutionDir)..&quot;"
 				PreprocessorDefinitions="WIN32_LEAN_AND_MEAN;HAVE_CONFIG_H"
 				RuntimeLibrary="2"
+				BufferSecurityCheck="false"
 				EnableFunctionLevelLinking="true"
 				UsePrecompiledHeader="0"
 				WarningLevel="3"
diff --git a/win32/platform.h b/win32/platform.h
index ee23b44..98a435d 100644
--- a/win32/platform.h
+++ b/win32/platform.h
@@ -7,9 +7,11 @@
 #include <stdlib.h>
 #include <io.h>
 #include <direct.h>
+#include <Ws2tcpip.h>
 
 #include "gettimeofday.h"
 #include "snprintf.h"
+#include "net.h"
 
 typedef int ssize_t;
 typedef unsigned short mode_t;
@@ -18,9 +20,14 @@ typedef unsigned short mode_t;
 #define mkdir(path, mode) mkdir(path)
 #define lstat stat
 
+#define socket w32_socket
+#define connect w32_connect
+#define send w32_send
+//#define getsockopt(sock, lvl, name, val, len) getsockopt(sock, lvl, name, (char *)(val), len)
+
 /* FIXME: need to wrap all win32 and winsock functions and map
     (WSA)GetLastError to errno */
-#define EWOULDBLOCK         31337
+#define EWOULDBLOCK EAGAIN
 
 #define PATH_MAX 32767
 

-- 
Debian repository for ClamAV



More information about the Pkg-clamav-commits mailing list