]> git.lyx.org Git - lyx.git/blobdiff - src/support/socktools.cpp
Expose python 3 support to some testing
[lyx.git] / src / support / socktools.cpp
index 662739f2720a16d5628fac0472c6cf14b92a723a..d4aab38f5fec0306766a8cca0394d48e5eb114e2 100644 (file)
@@ -3,7 +3,7 @@
  * This file is part of LyX, the document processor.
  * Licence details can be found in the file COPYING.
  *
- * \author João Luis M. Assirati
+ * \author João Luis M. Assirati
  *
  * Full author contact details are available in file CREDITS.
  */
@@ -37,10 +37,11 @@ int accept(int)
 
 #else // defined (HAVE_FCNTL)
 
-#include "support/lyxlib.h"
-
-#include "debug.h"
+#include "support/debug.h"
 
+#ifdef HAVE_SYS_TYPES_H
+# include <sys/types.h>
+#endif
 #include <sys/socket.h>
 #include <sys/un.h>
 #include <fcntl.h>
@@ -49,12 +50,12 @@ int accept(int)
 #endif
 
 #include <cerrno>
+#include <string>
+//needed for Mac OSX 10.5.2 Leopard
+#include <cstring>
 
-using std::string;
+using namespace std;
 
-#ifndef CXX_GLOBAL_CSTD
-using std::strerror;
-#endif
 
 // This MACRO eppears to be defined only on Linux.
 #if !defined(SUN_LEN)
@@ -81,7 +82,7 @@ int listen(FileName const & name, int queue)
        string::size_type len = localname.size();
        // the field sun_path in sockaddr_un is a char[108]
        if (len > 107) {
-               LYXERR0("lyx: Socket address '" << name.absFilename() << "' too long.");
+               LYXERR0("lyx: Socket address '" << name.absFileName() << "' too long.");
                return -1;
        }
        // Synonims for AF_UNIX are AF_LOCAL and AF_FILE
@@ -111,7 +112,7 @@ int listen(FileName const & name, int queue)
        // the socket special file in the filesystem. bind() returns -1
        // in case of error
        if ((::bind (fd, reinterpret_cast<sockaddr *>(&addr), SUN_LEN(&addr))) == -1) {
-               LYXERR0("lyx: Could not bind address '" << name.absFilename()
+               LYXERR0("lyx: Could not bind address '" << name.absFileName()
                       << "' to socket descriptor: " << strerror(errno));
                ::close(fd);
                name.removeFile();