X-Git-Url: https://git.lyx.org/gitweb/?a=blobdiff_plain;f=src%2Flyxsocket.C;h=0de947676401945c424931c139dfea79178b6e3b;hb=35204f8f33d7400a5fefeffea533fb4cb4097211;hp=806d06dd900569b1150fe4bf950642071278ed26;hpb=57494b23bac1faa38eeadb630cc0650a6df7f962;p=lyx.git diff --git a/src/lyxsocket.C b/src/lyxsocket.C index 806d06dd90..0de9476764 100644 --- a/src/lyxsocket.C +++ b/src/lyxsocket.C @@ -78,7 +78,7 @@ LyXServerSocket::~LyXServerSocket() { if (fd_ != -1) { theApp->unregisterSocketCallback(fd_); - if (close(fd_) != 0) + if (::close(fd_) != 0) lyxerr << "lyx: Server socket " << fd_ << " IO error on closing: " << strerror(errno); } @@ -168,7 +168,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); + int const written = ::write(fd_, linen.c_str(), size); if (written < size) { // Always mean end of connection. if ((written == -1) && (errno == EPIPE)) { // The program will also receive a SIGPIPE @@ -207,7 +207,7 @@ LyXDataSocket::LyXDataSocket(int fd) LyXDataSocket::~LyXDataSocket() { - if (close(fd_) != 0) + if (::close(fd_) != 0) lyxerr << "lyx: Data socket " << fd_ << " IO error on closing: " << strerror(errno); @@ -231,7 +231,7 @@ bool LyXDataSocket::readln(string & line) int count; // read and store characters in buffer - while ((count = read(fd_, charbuf, charbuf_size - 1)) > 0) { + while ((count = ::read(fd_, charbuf, charbuf_size - 1)) > 0) { buffer_.append(charbuf, charbuf + count); } @@ -265,7 +265,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); + int const written = ::write(fd_, linen.c_str(), size); if (written < size) { // Always mean end of connection. if ((written == -1) && (errno == EPIPE)) { // The program will also receive a SIGPIPE