mirror of
https://github.com/facebook/sapling.git
synced 2024-10-04 22:07:44 +03:00
use the compiler-defined _WIN32 define
Summary: WIN32 is defined by windows.h. _WIN32 is defined by the compiler. The latter is more reliable under refactoring. Reviewed By: xavierd Differential Revision: D47528663 fbshipit-source-id: 494f18d94968d9c8ea38fe395881e87c0368728e
This commit is contained in:
parent
f4dfef01d0
commit
05ab2eb53d
@ -176,7 +176,7 @@ int main(int argc, char** argv) {
|
||||
return 1;
|
||||
}
|
||||
|
||||
#ifdef WIN32
|
||||
#ifdef _WIN32
|
||||
if (shouldRecordFilesystemSamples(FLAGS_interface)) {
|
||||
std::cerr << "Filesystem sha1 not currently supported" << std::endl;
|
||||
return 1;
|
||||
|
@ -122,7 +122,7 @@ inline fattr3 statToFattr3(const struct stat& stat) {
|
||||
return fattr3{
|
||||
/*type*/ modeToFtype3(stat.st_mode),
|
||||
/*mode*/ modeToNfsMode(stat.st_mode),
|
||||
#ifndef WIN32
|
||||
#ifndef _WIN32
|
||||
/*nlink*/ folly::to_narrow(stat.st_nlink),
|
||||
/*uid*/ stat.st_uid,
|
||||
/*gid*/ stat.st_gid,
|
||||
@ -132,7 +132,7 @@ inline fattr3 statToFattr3(const struct stat& stat) {
|
||||
/*gid*/ uint32_t(stat.st_gid),
|
||||
#endif
|
||||
/*size*/ folly::to_unsigned(stat.st_size),
|
||||
#ifndef WIN32
|
||||
#ifndef _WIN32
|
||||
/*used*/ folly::to_unsigned(stat.st_blocks) * 512u,
|
||||
#else
|
||||
/*used*/ 0,
|
||||
|
Loading…
Reference in New Issue
Block a user