]> git.lyx.org Git - features.git/commitdiff
put back the :: global namespace identifiers.
authorAbdelrazak Younes <younes@lyx.org>
Sat, 21 Oct 2006 08:30:58 +0000 (08:30 +0000)
committerAbdelrazak Younes <younes@lyx.org>
Sat, 21 Oct 2006 08:30:58 +0000 (08:30 +0000)
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@15431 a592a061-630c-0410-9148-cb99ea01b6c8

src/lyxsocket.C
src/support/tempname.C

index 806d06dd900569b1150fe4bf950642071278ed26..0de947676401945c424931c139dfea79178b6e3b 100644 (file)
@@ -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
index cec63fd880ee230a29d422807f0c48c8204525a5..3f3c6e222c330aaade4e4646fa778735b37f9287 100644 (file)
@@ -55,7 +55,7 @@ int make_tempfile(char * templ)
        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
@@ -63,7 +63,7 @@ int make_tempfile(char * templ)
 # 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
@@ -99,11 +99,11 @@ string const lyx::support::tempName(string const & dir, string const & mask)
        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;