Browse code

Patch for OS/2

git-svn-id: file:///var/lib/svn/clamav-devel/trunk/clamav-devel@1209 77e5149b-7576-45b1-b177-96237e5ba77b

Nigel Horne authored on 2004/12/22 01:44:49
Showing 2 changed files
... ...
@@ -1,3 +1,7 @@
1
+Tue Dec 21 16:44:13 GMT 2004 (njh)
2
+----------------------------------
3
+  * libclamav/blob.c:	Support for OS/2 - patch by TK
4
+
1 5
 Tue Dec 21 04:11:48 CET 2004 (tk)
2 6
 ---------------------------------
3 7
   * freshclam: DNSDatabaseInfo: optimised and hardcoded
... ...
@@ -16,6 +16,9 @@
16 16
  *  Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
17 17
  *
18 18
  * $Log: blob.c,v $
19
+ * Revision 1.28  2004/12/21 16:42:10  nigelhorne
20
+ * Patch for OS/2
21
+ *
19 22
  * Revision 1.27  2004/12/16 15:29:51  nigelhorne
20 23
  * Tidy
21 24
  *
... ...
@@ -83,7 +86,7 @@
83 83
  * Change LOG to Log
84 84
  *
85 85
  */
86
-static	char	const	rcsid[] = "$Id: blob.c,v 1.27 2004/12/16 15:29:51 nigelhorne Exp $";
86
+static	char	const	rcsid[] = "$Id: blob.c,v 1.28 2004/12/21 16:42:10 nigelhorne Exp $";
87 87
 
88 88
 #if HAVE_CONFIG_H
89 89
 #include "clamav-config.h"
... ...
@@ -524,6 +527,9 @@ fileblobSetFilename(fileblob *fb, const char *dir, const char *filename)
524 524
 		snprintf(stub, sizeof(stub), "%s%s", fullname, suffix);
525 525
 #ifdef	C_LINUX
526 526
 		rename(stub, fullname);
527
+#elif	defined(defined(C_CYGWIN) || defined(C_INTERIX) || defined(C_OS2)
528
+		if(cli_filecopy(stub, filename) == 0)
529
+			unlink(stub);
527 530
 #else
528 531
 		link(stub, fullname);
529 532
 		unlink(stub);
... ...
@@ -560,7 +566,7 @@ sanitiseName(char *name)
560 560
 #ifdef	C_DARWIN
561 561
 		*name &= '\177';
562 562
 #endif
563
-#if	defined(MSDOS) || defined(C_CYGWIN) || defined(WIN32)
563
+#if	defined(MSDOS) || defined(C_CYGWIN) || defined(WIN32) || defined(C_OS2)
564 564
 		if(strchr("/*?<>|\\\"+=,;: ", *name))
565 565
 #else
566 566
 		if(*name == '/')