Update of /cvsroot/monetdb/MonetDB/src/gdk
In directory sc8-pr-cvs16.sourceforge.net:/tmp/cvs-serv22708/src/gdk

Modified Files:
      Tag: GDK-2
        gdk.mx gdk_posix.mx 
Log Message:
propagated changes of Tuesday Aug 14 2007 - Thursday Aug 16 2007
from the development trunk to the GDK-2 branch



Index: gdk_posix.mx
===================================================================
RCS file: /cvsroot/monetdb/MonetDB/src/gdk/gdk_posix.mx,v
retrieving revision 1.141
retrieving revision 1.141.2.1
diff -u -d -r1.141 -r1.141.2.1
--- gdk_posix.mx        31 Jul 2007 14:11:58 -0000      1.141
+++ gdk_posix.mx        15 Aug 2007 22:19:11 -0000      1.141.2.1
@@ -261,11 +261,15 @@
 #endif
 gdk_export int win_stat(const char *, struct stat *);
 gdk_export int win_rmdir(const char *);
+gdk_export int win_rename(const char *, const char *);
+gdk_export int win_unlink(const char *);
 gdk_export int win_mkdir(const char *, const int mode);
 
 #define stat(x,y)      win_stat(x,y)
 #define mkdir          win_mkdir
 #define rmdir          win_rmdir
+#define rename         win_rename
+#define unlink         win_unlink
 #if _WIN32_WINNT >= 0x500
 #define link           win_link
 #endif
@@ -1728,12 +1732,53 @@
        char buf[128], *p = reduce_dir_name(pathname, buf, sizeof(buf));
        int ret = _rmdir(p);
 
+       if (ret < 0) {
+               /* it could be the <expletive deleted> indexing
+                * service which prevents us from doing what we have a
+                * right to do, so try again (once) */
+               IODEBUG THRprintf(GDKout, "#retry rmdir %s\n", pathname);
+               MT_sleep_ms(100); /* wait a little */
+               ret = _rmdir(p);
+       }
        if (p != buf)
                free(p);
        return ret;
 }
 
 int
+win_unlink(const char *pathname)
+{
+       int ret = _unlink(pathname);
+
+       if (ret < 0) {
+               /* it could be the <expletive deleted> indexing
+                * service which prevents us from doing what we have a
+                * right to do, so try again (once) */
+               IODEBUG THRprintf(GDKout, "#retry unlink %s\n", pathname);
+               MT_sleep_ms(100); /* wait a little */
+               ret = _unlink(pathname);
+       }
+       return ret;
+}
+
+#undef rename
+int
+win_rename(const char *old, const char *new)
+{
+       int ret = rename(old, new);
+
+       if (ret < 0) {
+               /* it could be the <expletive deleted> indexing
+                * service which prevents us from doing what we have a
+                * right to do, so try again (once) */
+               IODEBUG THRprintf(GDKout, "#retry rename %s %s\n", old, new);
+               MT_sleep_ms(100); /* wait a little */
+               ret = rename(old, new);
+       }
+       return ret;
+}
+
+int
 win_mkdir(const char *pathname, const int mode)
 {
        char buf[128], *p = reduce_dir_name(pathname, buf, sizeof(buf));

Index: gdk.mx
===================================================================
RCS file: /cvsroot/monetdb/MonetDB/src/gdk/gdk.mx,v
retrieving revision 1.237.2.11
retrieving revision 1.237.2.12
diff -u -d -r1.237.2.11 -r1.237.2.12
--- gdk.mx      15 Aug 2007 13:20:24 -0000      1.237.2.11
+++ gdk.mx      15 Aug 2007 22:19:10 -0000      1.237.2.12
@@ -2320,7 +2320,6 @@
 #include "gdk_bat.h"
 
 #ifdef NATIVE_WIN32
-#define unlink _unlink
 #ifdef _MSC_VER
 #define fileno _fileno
 #endif


-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >>  http://get.splunk.com/
_______________________________________________
Monetdb-checkins mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/monetdb-checkins

Reply via email to