Browse Source

Forward-port SGI Compatibility patches from Jan Schaumann

svn:r3517
Nick Mathewson 20 years ago
parent
commit
e4b21c97f7
2 changed files with 5 additions and 0 deletions
  1. 1 0
      src/common/compat.c
  2. 4 0
      src/common/compat.h

+ 1 - 0
src/common/compat.c

@@ -774,6 +774,7 @@ void tor_mutex_free(tor_mutex_t *m)
 }
 }
 #else
 #else
 struct tor_mutex_t {
 struct tor_mutex_t {
+  int _unused;
 };
 };
 tor_mutex_t *tor_mutex_new(void) { return NULL; }
 tor_mutex_t *tor_mutex_new(void) { return NULL; }
 void tor_mutex_acquire(tor_mutex_t *m) { }
 void tor_mutex_acquire(tor_mutex_t *m) { }

+ 4 - 0
src/common/compat.h

@@ -53,6 +53,10 @@
 #define __FUNCTION__ "???"
 #define __FUNCTION__ "???"
 #endif
 #endif
 
 
+#if defined(__sgi) && !defined(__GNUC__) && defined(__c99)
+#define __FUNCTION__ __func__
+#endif
+
 /* ===== String compatibility */
 /* ===== String compatibility */
 #ifdef MS_WINDOWS
 #ifdef MS_WINDOWS
 /* Windows names string functions differently from most other platforms. */
 /* Windows names string functions differently from most other platforms. */