]> git.ipfire.org Git - thirdparty/tor.git/commitdiff
Fixed build with GCC < 3.3
authorMartin Hebnes Pedersen <martin.h.pedersen@gmail.com>
Sat, 17 Dec 2011 16:51:07 +0000 (17:51 +0100)
committerNick Mathewson <nickm@torproject.org>
Mon, 19 Dec 2011 16:27:08 +0000 (11:27 -0500)
Preprocessor directives should not be put inside the arguments
of a macro. This is not supported on older GCC releases (< 3.3)
thus broke compilation on Haiku (running gcc2).

changes/portability_01_haiku [new file with mode: 0644]
src/or/main.c

diff --git a/changes/portability_01_haiku b/changes/portability_01_haiku
new file mode 100644 (file)
index 0000000..ab58381
--- /dev/null
@@ -0,0 +1,11 @@
+  o Minor buxfixes:
+    - During configure, search for library containing cos function as
+      libm lives in libcore on some platforms (BeOS/Haiku).
+      Linking against libm was hard-coded before. Bugfix on
+      0.2.2.2-alpha, fixes the first part of bug 4727. Patch and
+      analysis by Martin Hebnes Pedersen.
+    - Preprocessor directives should not be put inside the arguments
+      of a macro. This would break compilation with GCC releases prior
+      to version 3.3. Bugfix on 0.2.3.3-alpha, fixes the other part of
+      bug 4727. Patch and analysis by Martin Hebnes Pedersen.
+
index 74583b2ea0c7f37c8781d7a444f1126b8545a842..1ba33957a66839de548839b0fa5a4d35d023afa1 100644 (file)
@@ -2268,13 +2268,12 @@ tor_init(int argc, char *argv[])
 
   {
     const char *version = get_version();
-    log_notice(LD_GENERAL, "Tor v%s%s running on %s.", version,
 #ifdef USE_BUFFEREVENTS
-               " (with bufferevents)",
+    log_notice(LD_GENERAL, "Tor v%s (with bufferevents) running on %s.",
+                version, get_uname());
 #else
-               "",
+    log_notice(LD_GENERAL, "Tor v%s running on %s.", version, get_uname());
 #endif
-               get_uname());
 
     log_notice(LD_GENERAL, "Tor can't help you if you use it wrong! "
                "Learn how to be safe at "