]> git.lyx.org Git - features.git/commitdiff
MSVC compilation fix.
authorAbdelrazak Younes <younes@lyx.org>
Sat, 21 Oct 2006 07:26:07 +0000 (07:26 +0000)
committerAbdelrazak Younes <younes@lyx.org>
Sat, 21 Oct 2006 07:26:07 +0000 (07:26 +0000)
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@15425 a592a061-630c-0410-9148-cb99ea01b6c8

src/aspell.C
src/aspell_local.h
src/lyxsocket.C
src/support/kill.C
src/support/tempname.C

index 78f677475c0edba278bbf353711bfb29a7194257..f9caa75233a690270ba6c0259b50f89d9f8a69e1 100644 (file)
 
 #include <boost/assert.hpp>
 
-
-namespace lyx {
-
-using docstring;
-
 using std::string;
 
+namespace lyx {
 
 ASpell::ASpell(BufferParams const &, string const & lang)
        : els(0), spell_error_object(0)
index 7ad19946579d082110c9b822329cb373f26a50e8..1b45c704513e3fcf23a9cd9104d9bc93bf62858b 100644 (file)
 #ifndef LYX_ASPELL_H
 #define LYX_ASPELL_H
 
-#include <map>
-
 #include "SpellBase.h"
 
+#include "support/docstring.h"
+
+#include <map>
 
-namespace lyx {
 
 class AspellSpeller;
 class AspellStringEnumeration;
 class AspellCanHaveError;
 class AspellConfig;
 
+namespace lyx {
+
 class BufferParams;
 
 
index 99758de0be11067d78f9b74430852f4a1f74aeda..1a260706913b0d47bf869fb30710b343751df150 100644 (file)
@@ -79,7 +79,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);
        }
@@ -169,7 +169,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
@@ -208,7 +208,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);
 
@@ -232,7 +232,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);
        }
 
@@ -266,7 +266,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 69913e6961beeadf5e533be846ec2f2f2c6a34e7..3d100969a776f25d843d81d44f98f8c025acda12 100644 (file)
@@ -38,7 +38,7 @@ int support::kill(int pid, int sig)
                return -1;
        }
        if (!TerminateProcess(hProcess, sig)) {
-               lyxerr << "kill process failed!" << endl;
+               lyxerr << "kill process failed!" << std::endl;
                CloseHandle(hProcess);
                return -1;
        }
index 16909cd60c59fc2aac770e8e0ac90ee55c33dfa1..6d44e42f67aae5d8a02e5bdf0548af946a9b31a5 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,7 +99,7 @@ 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