]> git.lyx.org Git - lyx.git/blobdiff - src/lyxsocket.C
Fix bug 2195: Slowness in rendering inside insets, especially on the Mac
[lyx.git] / src / lyxsocket.C
index 29a2480aa04438ae2d7ebe6c1453c4d50dcb47d1..bade99cb65d34267409c7c9fadc1fd9ed6671067 100644 (file)
@@ -12,6 +12,8 @@
  * Full author contact details are available in file CREDITS.
  */
 
+#include <config.h>
+
 #include "lyxsocket.h"
 
 #include "debug.h"
 
 #include <cerrno>
 
+#if defined (_WIN32)
+# include <io.h>
+#endif
+
 using boost::shared_ptr;
 
 using std::auto_ptr;
@@ -157,7 +163,7 @@ void LyXServerSocket::writeln(string const & line)
        string const linen(line + '\n');
        int const size = linen.size();
        int const written = ::write(fd_, linen.c_str(), size);
-       if (written < size) { // Allways mean end of connection.
+       if (written < size) { // Always mean end of connection.
                if ((written == -1) && (errno == EPIPE)) {
                        // The program will also receive a SIGPIPE
                        // that must be caught
@@ -252,7 +258,7 @@ void LyXDataSocket::writeln(string const & line)
        string const linen(line + '\n');
        int const size = linen.size();
        int const written = ::write(fd_, linen.c_str(), size);
-       if (written < size) { // Allways mean end of connection.
+       if (written < size) { // Always mean end of connection.
                if ((written == -1) && (errno == EPIPE)) {
                        // The program will also receive a SIGPIPE
                        // that must be catched