rust/cargo-c: update to 0.10.9+cargo-0.85.0
[oi-userland.git] / components / sysutils / open-vm-tools / patches / 03-lock.patch
blob1b8bb2a1da0295bb8d3a789794f752858775f9c4
1 diff -pruN '--exclude=*.orig' open-vm-tools-10.1.15~/lib/file/fileLockPrimitive.c open-vm-tools-10.1.15/lib/file/fileLockPrimitive.c
2 --- open-vm-tools-10.1.15~/lib/file/fileLockPrimitive.c 2017-09-29 21:15:57.000000000 +0000
3 +++ open-vm-tools-10.1.15/lib/file/fileLockPrimitive.c 2017-10-03 09:31:21.681628379 +0000
4 @@ -60,8 +60,8 @@
5 #define LOGLEVEL_MODULE main
6 #include "loglevel_user.h"
8 -#define LOCK_SHARED "S"
9 -#define LOCK_EXCLUSIVE "X"
10 +#define __LOCK_SHARED "S"
11 +#define __LOCK_EXCLUSIVE "X"
12 #define FILELOCK_PROGRESS_DEARTH 8000 // Dearth of progress time in milliseconds
13 #define FILELOCK_PROGRESS_SAMPLE 200 // Progress sampling time in milliseconds
15 @@ -472,8 +472,8 @@ fixedUp:
16 goto corrupt;
19 - if ((strcmp(argv[3], LOCK_SHARED) != 0) &&
20 - (strcmp(argv[3], LOCK_EXCLUSIVE) != 0)) {
21 + if ((strcmp(argv[3], __LOCK_SHARED) != 0) &&
22 + (strcmp(argv[3], __LOCK_EXCLUSIVE) != 0)) {
23 goto corrupt;
26 @@ -1096,8 +1096,8 @@ FileLockWaitForPossession(const char *lo
27 ((memberValues->lamportNumber == myValues->lamportNumber) &&
28 (Unicode_Compare(memberValues->memberName,
29 myValues->memberName) < 0))) &&
30 - ((strcmp(memberValues->lockType, LOCK_EXCLUSIVE) == 0) ||
31 - (strcmp(myValues->lockType, LOCK_EXCLUSIVE) == 0))) {
32 + ((strcmp(memberValues->lockType, __LOCK_EXCLUSIVE) == 0) ||
33 + (strcmp(myValues->lockType, __LOCK_EXCLUSIVE) == 0))) {
34 char *path;
35 uint32 loopCount;
36 Bool thisMachine;
37 @@ -1675,7 +1675,7 @@ FileLockIntrinsicPortable(const char *pa
40 Warning(LGPFX" %s implicit %s lock succeeded on '%s'.\n",
41 - __FUNCTION__, LOCK_SHARED, pathName);
42 + __FUNCTION__, __LOCK_SHARED, pathName);
44 *err = 0;
45 memberFilePath = &implicitReadToken;
46 @@ -1838,7 +1838,7 @@ FileLockIntrinsic(const char *pathName,
47 /* Construct the locking directory path */
48 lockBase = Unicode_Append(pathName, FILELOCK_SUFFIX);
50 - myValues.lockType = exclusivity ? LOCK_EXCLUSIVE : LOCK_SHARED;
51 + myValues.lockType = exclusivity ? __LOCK_EXCLUSIVE : __LOCK_SHARED;
52 myValues.exclusivity = exclusivity;
53 myValues.waitTime = 0;
54 myValues.msecMaxWaitTime = msecMaxWaitTime;