{
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);
}
{
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
LyXDataSocket::~LyXDataSocket()
{
- if (close(fd_) != 0)
+ if (::close(fd_) != 0)
lyxerr << "lyx: Data socket " << fd_
<< " IO error on closing: " << strerror(errno);
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);
}
{
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
return ::mkstemp(templ);
#elif defined(HAVE_MKTEMP)
// This probably just barely works...
- mktemp(templ);
+ ::mktemp(templ);
# if defined (HAVE_OPEN)
# if (!defined S_IRUSR)
# define S_IRUSR S_IREAD
# endif
return ::open(templ, O_RDWR | O_CREAT | O_EXCL, S_IRUSR | S_IWUSR);
# elif defined (HAVE__OPEN)
- return _open(templ,
+ return ::_open(templ,
_O_RDWR | _O_CREAT | _O_EXCL,
_S_IREAD | _S_IWRITE);
# else
if (tmpf != -1) {
string const t(tmpl.get());
#if defined (HAVE_CLOSE)
- close(tmpf);
+ ::close(tmpf);
#elif defined (HAVE__CLOSE)
::_close(tmpf);
#else
-# error No close() function.
+# error No x() function.
#endif
lyxerr[Debug::FILES] << "Temporary file `" << t
<< "' created." << endl;