]> git.lyx.org Git - lyx.git/blobdiff - src/support/socktools.C
src/support/filename.C: add assertion to ensure that no Windows-style
[lyx.git] / src / support / socktools.C
index eb6e17f4e837e548fe08b135aee1bbc351de1f27..6649df6fa9c544a9197f3ff168ce8894f32471b6 100644 (file)
@@ -11,8 +11,9 @@
 #include <config.h>
 
 #include "support/socktools.h"
+#include "support/filename.h"
 
-#if !defined (HAVE_SOCKET)
+#if !defined (HAVE_FCNTL)
 // We provide stubs because we don't (yet?) support the native OS API.
 
 namespace lyx {
@@ -34,7 +35,7 @@ int accept(int)
 } // namespace support
 } // namespace lyx
 
-#else // defined (HAVE_SOCKET)
+#else // defined (HAVE_FCNTL)
 
 #include "support/lyxlib.h"
 
@@ -114,7 +115,7 @@ int listen(string const & name, int queue)
                lyxerr << "lyx: Could not bind address '" << name
                       << "' to socket descriptor: " << strerror(errno) << endl;
                ::close(fd);
-               lyx::support::unlink(name);
+               unlink(FileName(name));
                return -1;
        }
 
@@ -127,7 +128,7 @@ int listen(string const & name, int queue)
                lyxerr << "lyx: Could not put socket in 'listen' state: "
                       << strerror(errno) << endl;
                ::close(fd);
-               lyx::support::unlink(name);
+               unlink(FileName(name));
                return -1;
        }
 
@@ -163,4 +164,4 @@ int accept(int sd)
 } // namespace support
 } // namespace lyx
 
-#endif // defined (HAVE_SOCKET)
+#endif // defined (HAVE_FCNTL)