aboutsummaryrefslogtreecommitdiff
path: root/src/common
diff options
context:
space:
mode:
authorcypherpunks <cypherpunks@torproject.org>2016-09-01 17:50:38 +0000
committerDavid Goulet <dgoulet@torproject.org>2017-02-03 09:37:39 -0500
commit27df23abb675ffeb198bf0c1cc85c4baed77a988 (patch)
tree9fcb0bbb384188f3be58409bcb7fe5f23cbc3a95 /src/common
parent0f79fb51e5653cbc82a0066423c833cafb656542 (diff)
downloadtor-27df23abb675ffeb198bf0c1cc85c4baed77a988.tar.gz
tor-27df23abb675ffeb198bf0c1cc85c4baed77a988.zip
Use the standard OpenBSD preprocessor definition
Diffstat (limited to 'src/common')
-rw-r--r--src/common/backtrace.c2
-rw-r--r--src/common/torgzip.c2
-rw-r--r--src/common/util.c2
3 files changed, 3 insertions, 3 deletions
diff --git a/src/common/backtrace.c b/src/common/backtrace.c
index 81e04e94eb..61096952d8 100644
--- a/src/common/backtrace.c
+++ b/src/common/backtrace.c
@@ -76,7 +76,7 @@ clean_backtrace(void **stack, size_t depth, const ucontext_t *ctx)
#ifdef PC_FROM_UCONTEXT
#if defined(__linux__)
const size_t n = 1;
-#elif defined(__darwin__) || defined(__APPLE__) || defined(__OpenBSD__) \
+#elif defined(__darwin__) || defined(__APPLE__) || defined(OpenBSD) \
|| defined(__FreeBSD__)
const size_t n = 2;
#else
diff --git a/src/common/torgzip.c b/src/common/torgzip.c
index 3353f0ef61..04ae353cf4 100644
--- a/src/common/torgzip.c
+++ b/src/common/torgzip.c
@@ -206,7 +206,7 @@ tor_gzip_compress(char **out, size_t *out_len,
}
done:
*out_len = stream->total_out;
-#ifdef OPENBSD
+#if defined(OpenBSD)
/* "Hey Rocky! Watch me change an unsigned field to a signed field in a
* third-party API!"
* "Oh, that trick will just make people do unsafe casts to the unsigned
diff --git a/src/common/util.c b/src/common/util.c
index 824b4fbc67..180712ad6d 100644
--- a/src/common/util.c
+++ b/src/common/util.c
@@ -79,7 +79,7 @@
#include <malloc/malloc.h>
#endif
#ifdef HAVE_MALLOC_H
-#if !defined(OPENBSD) && !defined(__FreeBSD__)
+#if !defined(OpenBSD) && !defined(__FreeBSD__)
/* OpenBSD has a malloc.h, but for our purposes, it only exists in order to
* scold us for being so stupid as to autodetect its presence. To be fair,
* they've done this since 1996, when autoconf was only 5 years old. */