]> git.lyx.org Git - lyx.git/blobdiff - src/client/client.C
hopefully fix tex2lyx linking.
[lyx.git] / src / client / client.C
index 8339c1fe598b0aadc3ca4346fd1ae2006fd57bc9..424f78623480d7588b0e1811514e441207b5e575 100644 (file)
@@ -13,6 +13,7 @@
 #include <config.h>
 
 #include "debug.h"
+#include "support/unicode.h"
 #include "support/lstrings.h"
 
 #include <boost/filesystem/operations.hpp>
 #include <boost/scoped_ptr.hpp>
 
 // getpid(), getppid()
-#include <sys/types.h>
-#include <unistd.h>
+#ifdef HAVE_SYS_TYPES_H
+# include <sys/types.h>
+#endif
+#ifdef HAVE_UNISTD_H
+# include <unistd.h>
+#endif
+
+// struct timeval
+#ifdef HAVE_SYS_TIME_H
+# include <sys/time.h>
+#endif
 
 // select()
-#include <sys/select.h>
+#ifdef HAVE_SYS_SELECT_H
+# include <sys/select.h>
+#endif
 
 // socket(), connect()
-#include <sys/socket.h>
+#ifdef HAVE_SYS_SOCKET_H
+# include <sys/socket.h>
+#endif
 #include <sys/un.h>
 
 // fcntl()
@@ -40,6 +54,9 @@
 #include <map>
 #include <iostream>
 
+
+namespace lyx {
+
 using lyx::support::prefixIs;
 
 using boost::scoped_ptr;
@@ -53,6 +70,13 @@ using std::cin;
 using std::endl;
 
 
+IconvProcessor & utf8ToUcs4()
+{
+       static IconvProcessor iconv(ucs4_codeset, "UTF-8");
+       return iconv;
+}
+
+
 namespace support {
 
 string itoa(unsigned int i)
@@ -80,7 +104,7 @@ vector<fs::path> lyxSockets(string const & dir, string const & pid)
 
        for (; beg != end; ++beg) {
                if (prefixIs(beg->leaf(), "lyx_tmpdir" + pid)) {
-                       fs::path lyxsocket = *beg / "lyxsocket";
+                       fs::path lyxsocket = beg->path() / "lyxsocket";
                        if (fs::exists(lyxsocket)) {
                                dirlist.push_back(lyxsocket);
                        }
@@ -482,12 +506,12 @@ int p(vector<char *> const & arg)
 
 } // namespace cmdline
 
-
-
+} // namespace lyx
 
 
 int main(int argc, char * argv[])
 {
+       using namespace lyx;
        lyxerr.rdbuf(cerr.rdbuf());
 
        CmdLineParser args;
@@ -597,3 +621,15 @@ int main(int argc, char * argv[])
 
        return EXIT_SUCCESS;
 }
+
+
+namespace boost {
+
+void assertion_failed(char const* a, char const* b, char const* c, long d)
+{
+       lyx::lyxerr << "Assertion failed: " << a << ' ' << b << ' ' << c << ' '
+               << d << '\n';
+}
+
+} // namespace boost
+