#include <cerrno>
+#if defined (_WIN32)
+# include <io.h>
+#endif
+
using boost::shared_ptr;
using std::auto_ptr;
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
bool LyXDataSocket::readln(string & line)
{
int const charbuf_size = 100;
- char charbuf[charbuf_size]; // buffer for the ::read() system call
+ char charbuf[charbuf_size]; // buffer for the ::read() system call
int count;
// read and store characters in buffer
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