Changeset 864

Show
Ignore:
Timestamp:
01/28/08 21:45:54
Author:
robert
Message:

From Jean-Sebastien Guay, build fixes for Windows

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/src/vpb/FileUtils.cpp

    r861 r864  
    55#ifdef WIN32 
    66 
     7    #define WIN32_LEAN_AND_MEAN 1 
    78    #include <windows.h> 
    89    #include <stdarg.h> 
     
    1213    #include <direct.h> 
    1314    #include <fcntl.h> 
     15    #include <winsock.h> 
    1416    #include <sys/types.h> 
    1517 
     
    2931    int     vpb::lockf(int fildes, int function, off_t size)      { return 0; } 
    3032    int     vpb::ftruncate(int fildes, off_t length)              { return ::_chsize(fildes, length); } 
    31  
    32     // No equivalent to sync() on Win32, could use fsync(fd) on each file. 
    33     void    vpb::sync()                                           { (void) _flushall(); } 
     33    void    vpb::sync()                                           { (void) ::_flushall(); } 
    3434    int     vpb::fsync(int fd)                                    { if (fd) return ::_commit(fd); return 0; } 
    3535    int     vpb::getpid()                                         { return ::_getpid(); } 
  • trunk/src/vpb/MachinePool.cpp

    r829 r864  
    159159int Machine::exec(const std::string& application) 
    160160{ 
    161     bool runningRemotely = getHostName()!=getLocalHostName()
     161    bool runningRemotely = getHostName()!=getLocalHostName() && getHostName()!="localhost"
    162162 
    163163    std::string executionString; 
  • trunk/src/vpb/PropertyFile.cpp

    r831 r864  
    4141            _requiresSync = true; 
    4242 
    43             FILE* file = vpb::fopen(filename.c_str(), "wr"); 
     43            FILE* file = vpb::fopen(filename.c_str(), "w+"); 
    4444 
    4545            vpb::fclose(file);