Revision: 4239
          http://tigervnc.svn.sourceforge.net/tigervnc/?rev=4239&view=rev
Author:   atkac
Date:     2011-01-19 14:11:16 +0000 (Wed, 19 Jan 2011)

Log Message:
-----------
[Bugfix] Don't include unistd.h and don't call access() on Windows.

Modified Paths:
--------------
    trunk/common/rfb/CSecurityTLS.cxx

Modified: trunk/common/rfb/CSecurityTLS.cxx
===================================================================
--- trunk/common/rfb/CSecurityTLS.cxx   2011-01-19 14:06:48 UTC (rev 4238)
+++ trunk/common/rfb/CSecurityTLS.cxx   2011-01-19 14:11:16 UTC (rev 4239)
@@ -29,7 +29,9 @@
 #endif
 
 #include <stdlib.h>
+#ifndef WIN32
 #include <unistd.h>
+#endif
 
 #include <rfb/CSecurityTLS.h>
 #include <rfb/SSecurityVeNCrypt.h> 
@@ -95,11 +97,16 @@
   sprintf(caDefault.buf, "%s/.vnc/x509_certs", homeDir);
   delete [] homeDir;
 
+#ifndef WIN32
   /* XXX Do we need access() check here? */
   if (!access(caDefault.buf, R_OK))
     x509ca.setDefaultStr(strdup(caDefault.buf));
   else
     vlog.error("Failed to open ~/.vnc/x509_certs");
+#else
+  /* Windows doesn't have access() function. */
+  x509ca.setDefaultStr(strdup(caDefault.buf));
+#endif
 }
 
 void CSecurityTLS::shutdown()


This was sent by the SourceForge.net collaborative development platform, the 
world's largest Open Source development site.

------------------------------------------------------------------------------
Protect Your Site and Customers from Malware Attacks
Learn about various malware tactics and how to avoid them. Understand 
malware threats, the impact they can have on your business, and how you 
can protect your company and customers by using code signing.
http://p.sf.net/sfu/oracle-sfdevnl
_______________________________________________
Tigervnc-commits mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/tigervnc-commits

Reply via email to