This patch against 1.2.2 fixes some problems with locks with the distcc
client on Cygwin.

2002-09-29  Christopher January <[EMAIL PROTECTED]>

        * lock.c (dcc_make_lock_filename): Change ':' in filename to '_'; Windows
doesn't support ':'
          in filenames.
         (dcc_lock_host): On Cygwin EACCES means a lock is busy.

--- ../../orig/distcc-1.2.2/src/lock.c  2003-02-25 00:28:33.000000000 +0000
+++ lock.c      2003-03-01 19:54:01.000000000 +0000
@@ -102,7 +102,7 @@ static char * dcc_make_lock_filename(con
     if (host->mode == DCC_MODE_LOCAL) {
         asprintf(&buf, "%s/lock_%s_localhost_%d", tempdir, lockname, iter);
     } else if (host->mode == DCC_MODE_TCP) {
-        asprintf(&buf, "%s/lock_%s_tcp_%s:%d_%d", tempdir, lockname,
host->hostname,
+        asprintf(&buf, "%s/lock_%s_tcp_%s_%d_%d", tempdir, lockname,
host->hostname,
                  host->port, iter);
     } else if (host->mode == DCC_MODE_SSH) {
         asprintf(&buf, "%s/lock_%s_ssh_%s_%d", tempdir, lockname,
host->hostname, iter);
@@ -215,6 +215,9 @@ int dcc_lock_host(const char *lockname,
 #if defined(EAGAIN) && EAGAIN != EWOULDBLOCK
         case EAGAIN:
 #endif
+#if defined(__CYGWIN__)
+        case EACCES:
+#endif
             rs_trace("%s is busy", fname);
             ret = EXIT_BUSY;
             break;

---
Christopher January www.atomice.com
__ 
distcc mailing list            http://distcc.samba.org/
To unsubscribe or change options: 
http://lists.samba.org/cgi-bin/mailman/listinfo/distcc

Reply via email to