2
0
mirror of https://github.com/boostorg/bpm.git synced 2026-01-19 04:02:14 +00:00

Merge pull request #4 from eldiener/develop

Changes for Embarcadero C++ clang-based compilers, targeting Boost 1.74
This commit is contained in:
Peter Dimov
2020-05-06 16:19:53 +03:00
committed by GitHub
2 changed files with 21 additions and 1 deletions

View File

@@ -152,7 +152,11 @@ static bool make_relative( std::string const & link, std::string & target )
#include <direct.h>
#include <fcntl.h>
#include <sys/stat.h>
#if defined(__CODEGEARC__) && defined(__clang__) // This has been reported to Embarcadero
#include <utime.h>
#else
#include <sys/utime.h>
#endif
#include <windows.h>
int fs_creat( std::string const & path, int mode )
@@ -198,6 +202,20 @@ int fs_stat( std::string const & path, int & mode, std::time_t & mtime, std::tim
return r;
}
#if defined(__CODEGEARC__) && defined(__clang__) // Reported to Embarcadero
int fs_utime( std::string const & path, std::time_t mtime, std::time_t atime )
{
utimbuf ut;
ut.actime = atime;
ut.modtime = mtime;
return utime( path.c_str(), &ut );
}
#else
int fs_utime( std::string const & path, std::time_t mtime, std::time_t atime )
{
_utimbuf ut;
@@ -208,6 +226,8 @@ int fs_utime( std::string const & path, std::time_t mtime, std::time_t atime )
return _utime( path.c_str(), &ut );
}
#endif
int fs_rmdir( std::string const & path )
{
return _rmdir( path.c_str() );

View File

@@ -81,7 +81,7 @@ typedef unsigned long UInt64;
#else
#if defined(_MSC_VER) || defined(__BORLANDC__)
#if defined(_MSC_VER) || defined(__BORLANDC__) && !defined(__clang__)
typedef __int64 Int64;
typedef unsigned __int64 UInt64;
#define UINT64_CONST(n) n