mark the license text as used so it never gets stripped xonotic-v0.6.0
authorRudolf Polzer <divverent@alientrap.org>
Sat, 25 Feb 2012 19:49:50 +0000 (20:49 +0100)
committerRudolf Polzer <divverent@alientrap.org>
Sat, 25 Feb 2012 19:49:50 +0000 (20:49 +0100)
d0.c
d0.h
sha2.c

diff --git a/d0.c b/d0.c
index 17934f0..c8920b4 100644 (file)
--- a/d0.c
+++ b/d0.c
@@ -1,9 +1,11 @@
+#include "d0.h"
+
 /*
  * include the license notice into the dynamic library to "reproduce the
  * copyright notice" automatically, so the application developer does not have
  * to care about this term
  */
-const char *d0_bsd_license_notice = "\n"
+const char *d0_bsd_license_notice D0_USED = "\n"
 "/*\n"
 " * FILE:      d0.c\n"
 " * AUTHOR:    Rudolf Polzer - divVerent@xonotic.org\n"
@@ -39,8 +41,6 @@ const char *d0_bsd_license_notice = "\n"
 " * $Id$\n"
 " */\n";
 
-#include "d0.h"
-
 #include <stdlib.h>
 
 //#define MUTEX_DEBUG
diff --git a/d0.h b/d0.h
index 0f9b419..6c55afe 100644 (file)
--- a/d0.h
+++ b/d0.h
@@ -39,6 +39,7 @@
 #include <unistd.h> // size_t
 
 #define D0_EXPORT __attribute__((__visibility__("default")))
+#define D0_USED __attribute__((used))
 #define D0_WARN_UNUSED_RESULT __attribute__((warn_unused_result))
 #define D0_BOOL int
 
diff --git a/sha2.c b/sha2.c
index e88b47d..1ca0f81 100644 (file)
--- a/sha2.c
+++ b/sha2.c
@@ -1,9 +1,11 @@
+#include "d0.h"
+
 /*
  * include the license notice into the dynamic library to "reproduce the
  * copyright notice" automatically, so the application developer does not have
  * to care about this term
  */
-const char *d0_sha2_c_bsd_license_notice = "\n"
+const char *d0_sha2_c_bsd_license_notice D0_USED = "\n"
 "/*\n"
 " * FILE:      sha2.c\n"
 " * AUTHOR:    Aaron D. Gifford - http://www.aarongifford.com/\n"