aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJiří Malák <malak.jiri@gmail.com>2017-01-08 13:39:06 +0100
committerDaniel Stenberg <daniel@haxx.se>2017-01-08 16:24:30 +0100
commit8805be2cf8aba9ed19f57408ea4485e4b41fccdf (patch)
tree372760d185496c87a38b5b027b636cca60a8c300
parent5df25fdce4a697903aa80f0a1b700c914f00cf84 (diff)
lib506: fix build for Open Watcom
Rename symbol lock to locks to not clash with OW CRTL function name. Closes #1196
-rw-r--r--tests/libtest/lib506.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/tests/libtest/lib506.c b/tests/libtest/lib506.c
index 20d94877c..b8db83cb6 100644
--- a/tests/libtest/lib506.c
+++ b/tests/libtest/lib506.c
@@ -5,7 +5,7 @@
* | (__| |_| | _ <| |___
* \___|\___/|_| \_\_____|
*
- * Copyright (C) 1998 - 2016, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2017, Daniel Stenberg, <daniel@haxx.se>, et al.
*
* This software is licensed as described in the file COPYING, which
* you should have received as part of this distribution. The terms
@@ -37,7 +37,7 @@ struct userdata {
int counter;
};
-int lock[3];
+static int locks[3];
/* lock callback */
static void my_lock(CURL *handle, curl_lock_data data,
@@ -69,11 +69,11 @@ static void my_lock(CURL *handle, curl_lock_data data,
}
/* detect locking of locked locks */
- if(lock[locknum]) {
+ if(locks[locknum]) {
printf("lock: double locked %s\n", what);
return;
}
- lock[locknum]++;
+ locks[locknum]++;
printf("lock: %-6s [%s]: %d\n", what, user->text, user->counter);
user->counter++;
@@ -105,11 +105,11 @@ static void my_unlock(CURL *handle, curl_lock_data data, void *useptr)
}
/* detect unlocking of unlocked locks */
- if(!lock[locknum]) {
+ if(!locks[locknum]) {
printf("unlock: double unlocked %s\n", what);
return;
}
- lock[locknum]--;
+ locks[locknum]--;
printf("unlock: %-6s [%s]: %d\n", what, user->text, user->counter);
user->counter++;