"Fossies" - the Fresh Open Source Software archive

Member "patch/dcc-1.3.61.patch" of archive SpamAssassin-3.2.3.5-win32-src.zip:


diff -Nabur -F^sub dcc-1.3.61\dcclib\fnm2path.c dcc-1.3.61-win32\dcclib\fnm2path.c
--- dcc-1.3.61\dcclib\fnm2path.c	Wed Oct 12 14:38:52 2005
+++ dcc-1.3.61-win32\dcclib\fnm2path.c	Sat Sep 29 23:15:05 2007
@@ -40,6 +40,7 @@
 #include "dcc_defs.h"
 #ifdef DCC_WIN32
 #include <direct.h>
+#include <string.h>
 #endif
 
 DCC_PATH dcc_homedir;
@@ -200,6 +201,16 @@
 	u_char result;
 
 	result = 1;
+#ifdef DCC_WIN32
+    if (!newdir) {
+        LPCTSTR varname = "USERPROFILE";
+        LPTSTR homepath = "                                                                                                                                                                                                                                                                ";
+        DWORD varsize = 256;
+        
+        GetEnvironmentVariable(varname, homepath, varsize);
+        newdir = strcat(homepath, DCC_HOMEDIR);
+    }
+#endif
 	if (!newdir)
 		newdir = DCC_HOMEDIR;
 
diff -Nabur -F^sub dcc-1.3.61\include\dcc_config.h dcc-1.3.61-win32\include\dcc_config.h
--- dcc-1.3.61\include\dcc_config.h	Tue Sep 25 14:02:08 2007
+++ dcc-1.3.61-win32\include\dcc_config.h	Sat Sep 29 23:15:05 2007
@@ -48,7 +48,7 @@
 #undef UNIX
 #define DCC_WIN32 1
 
-#define DCC_HOMEDIR "c:\\Program Files\\DCC"
+#define DCC_HOMEDIR "\\.spamassassin"
 #undef DCC_LIBEXECDIR
 #define DCC_RUNDIR	"/var/run/dcc"
 
diff -Nabur -F^sub dcc-1.3.61\include\dcc_defs.h dcc-1.3.61-win32\include\dcc_defs.h
--- dcc-1.3.61\include\dcc_defs.h	Tue Sep 25 14:01:12 2007
+++ dcc-1.3.61-win32\include\dcc_defs.h	Sat Sep 29 23:15:05 2007
@@ -608,8 +608,10 @@
 extern const char *path2fnm(const char *);
 extern u_char dcc_cdhome(DCC_EMSG, const char *);
 
+#ifndef WIN32
 extern uid_t dcc_real_uid, dcc_effective_uid;
 extern gid_t dcc_real_gid, dcc_effective_gid;
+#endif
 extern void dcc_get_priv(void);
 extern u_char dcc_get_priv_home(const char *);
 extern void dcc_rel_priv(void);
diff -Nabur -F^sub dcc-1.3.61\Makefile dcc-1.3.61-win32\Makefile
--- dcc-1.3.61\Makefile	Wed Dec 31 16:00:00 1969
+++ dcc-1.3.61-win32\Makefile	Sat Sep 29 23:15:05 2007
@@ -0,0 +1,63 @@
+# Makefile for cdcc, dccproc, and someday dccifd for WIN32
+
+# For Microsoft Visual C 6.0 compiler
+
+# Copyright (c) 2006 by Rhyolite Software, LLC
+#
+# This agreement is not applicable to any entity which sells anti-spam
+# solutions to others or provides an anti-spam solution as part of a
+# security solution sold to other entities, or to a private network
+# which employs the DCC or uses data provided by operation of the DCC
+# but does not provide corresponding data to other users.
+#
+# 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.
+#
+# Parties not eligible to receive a license under this agreement can
+# obtain a commercial license to use DCC and permission to use
+# U.S. Patent 6,330,590 by contacting Commtouch at http://www.commtouch.com/
+# or by email to nospam@commtouch.com.
+#
+# A commercial license would be for Distributed Checksum and Reputation
+# Clearinghouse software.  That software includes additional features.  This
+# free license for Distributed ChecksumClearinghouse Software does not in any
+# way grant permision to use Distributed Checksum and Reputation Clearinghouse
+# software
+#
+# THE SOFTWARE IS PROVIDED "AS IS" AND RHYOLITE SOFTWARE, LLC DISCLAIMS ALL
+# WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES
+# OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL RHYOLITE SOFTWARE, LLC
+# 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.
+
+# Rhyolite Software DCC 1.3.58-1.6 $Revision$
+
+DIRT    =*.obj *.lib *.exe
+SUBDIRS= dcclib cdcc dccproc
+SUBCMD  =for %d in ($(SUBDIRS)) do cd %d && $(MAKE) -f win32.mak $* && cd ..
+
+all:    dcclib.lib cdcc.exe dccproc.exe
+
+clean:
+    del $(DIRT)
+    $(SUBCMD)
+
+
+dcclib.lib:
+    cd dcclib
+    $(MAKE) -f win32.mak
+    cd ..
+
+cdcc.exe:
+    cd cdcc
+    $(MAKE) -f win32.mak
+    cd ..
+
+dccproc.exe:
+    cd dccproc
+    $(MAKE) -f win32.mak
+    cd ..
diff -Nabur -F^sub dcc-1.3.61\win32.makinc1 dcc-1.3.61-win32\win32.makinc1
--- dcc-1.3.61\win32.makinc1	Mon Mar 21 14:05:38 2005
+++ dcc-1.3.61-win32\win32.makinc1	Sat Sep 29 23:15:05 2007
@@ -69,4 +69,4 @@
 !endif
 
 
-DIRT	=*.obj *.lib *.csm
+DIRT    =*.obj *.lib *.exe