Commit: e723580aceef6e2bf5a9b413bcd10e8880cb7292 Author: Bastien Montagne Date: Tue Jan 17 15:30:36 2023 +0100 Branches: tmp-flock https://developer.blender.org/rBe723580aceef6e2bf5a9b413bcd10e8880cb7292
BLI_flock: Fix windows code. =================================================================== M source/blender/blenlib/intern/fileops.c =================================================================== diff --git a/source/blender/blenlib/intern/fileops.c b/source/blender/blenlib/intern/fileops.c index 03cb23be5d3..4a37061d936 100644 --- a/source/blender/blenlib/intern/fileops.c +++ b/source/blender/blenlib/intern/fileops.c @@ -304,8 +304,8 @@ bool BLI_flock_shared(const int file_descriptor, const bool is_blocking) return LockFileEx(file_descriptor, (is_blocking ? 0 : LOCKFILE_FAIL_IMMEDIATELY), 0, - MAX_INT, - MAX_INT, + INT_MAX, + INT_MAX, &overlapp_info); } bool BLI_flock_exclusive(const int file_descriptor, const bool is_blocking) @@ -314,8 +314,8 @@ bool BLI_flock_exclusive(const int file_descriptor, const bool is_blocking) return LockFileEx(file_descriptor, LOCKFILE_EXCLUSIVE_LOCK | (is_blocking ? 0 : LOCKFILE_FAIL_IMMEDIATELY), 0, - MAX_INT, - MAX_INT, + INT_MAX, + INT_MAX, &overlapp_info); } bool BLI_flock_release(const int file_descriptor) @@ -850,8 +850,8 @@ static int delete_soft(const char *file, const char **error_message) Class NSStringClass = objc_getClass("NSString"); SEL stringWithUTF8StringSel = sel_registerName("stringWithUTF8String:"); - id pathString = (( - id(*)(Class, SEL, const char *))objc_msgSend)(NSStringClass, stringWithUTF8StringSel, file); + id pathString = ((id(*)(Class, SEL, const char *))objc_msgSend)( + NSStringClass, stringWithUTF8StringSel, file); Class NSFileManagerClass = objc_getClass("NSFileManager"); SEL defaultManagerSel = sel_registerName("defaultManager"); @@ -862,8 +862,8 @@ static int delete_soft(const char *file, const char **error_message) id nsurl = ((id(*)(Class, SEL, id))objc_msgSend)(NSURLClass, fileURLWithPathSel, pathString); SEL trashItemAtURLSel = sel_registerName("trashItemAtURL:resultingItemURL:error:"); - BOOL deleteSuccessful = (( - BOOL(*)(id, SEL, id, id, id))objc_msgSend)(fileManager, trashItemAtURLSel, nsurl, nil, nil); + BOOL deleteSuccessful = ((BOOL(*)(id, SEL, id, id, id))objc_msgSend)( + fileManager, trashItemAtURLSel, nsurl, nil, nil); if (deleteSuccessful) { ret = 0; _______________________________________________ Bf-blender-cvs mailing list Bf-blender-cvs@blender.org List details, subscription details or unsubscribe: https://lists.blender.org/mailman/listinfo/bf-blender-cvs