[Xfce4-commits] <libxfce4util:nick/abi-changes> Make licenses static.

Nick Schermer noreply at xfce.org
Fri Jun 10 21:20:03 CEST 2011


Updating branch refs/heads/nick/abi-changes
         to b05fd97f745c3ab09a15d96df66971ce5dd5c0b3 (commit)
       from 0b514aa59c7cf5fb5c7076976379fa33c84dbb78 (commit)

commit b05fd97f745c3ab09a15d96df66971ce5dd5c0b3
Author: Nick Schermer <nick at xfce.org>
Date:   Fri Jun 10 20:33:34 2011 +0200

    Make licenses static.
    
    Do not export the license strings, so they are only
    accessible with xfce_get_license_text().

 libxfce4util/libxfce4util.symbols |    5 -----
 libxfce4util/xfce-license.c       |   30 ++++++++++++++++++++++++------
 2 files changed, 24 insertions(+), 11 deletions(-)

diff --git a/libxfce4util/libxfce4util.symbols b/libxfce4util/libxfce4util.symbols
index 19899a7..8d5ed5c 100644
--- a/libxfce4util/libxfce4util.symbols
+++ b/libxfce4util/libxfce4util.symbols
@@ -99,11 +99,6 @@ xfce_kiosk_free
 /* xfce-license variables/functions */
 #if IN_HEADER(__XFCE_LICENSE_H__)
 #if IN_SOURCE(__XFCE_LICENSE_C__)
-#ifdef INCLUDE_VARIABLES
-xfce_builtin_license_BSD
-xfce_builtin_license_GPL
-xfce_builtin_license_LGPL
-#endif
 xfce_get_license_text G_GNUC_PURE
 #endif
 #endif
diff --git a/libxfce4util/xfce-license.c b/libxfce4util/xfce-license.c
index 3093fe4..cb7868e 100644
--- a/libxfce4util/xfce-license.c
+++ b/libxfce4util/xfce-license.c
@@ -26,10 +26,14 @@
 #include <libxfce4util/libxfce4util-private.h>
 #include <libxfce4util/libxfce4util-alias.h>
 
-
-
-/* TODO change these variables to static once we break the ABI next time */
-const gchar xfce_builtin_license_BSD[] =
+#ifdef __SUNPRO_C
+#pragma align 4 (xfce_builtin_license_BSD)
+#endif
+#ifdef __GNUC__
+static const char xfce_builtin_license_BSD[] __attribute__ ((__aligned__ (4))) =
+#else
+static const char xfce_builtin_license_BSD[] =
+#endif
   N_ (" Redistribution and use in source and binary forms, with or without\n"
       " modification, are permitted provided that the following conditions\n"
       " are met:\n"
@@ -51,7 +55,14 @@ const gchar xfce_builtin_license_BSD[] =
       " (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF\n"
       " THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n");
 
-const gchar xfce_builtin_license_GPL[] =
+#ifdef __SUNPRO_C
+#pragma align 4 (xfce_builtin_license_GPL)
+#endif
+#ifdef __GNUC__
+static const char xfce_builtin_license_GPL[] __attribute__ ((__aligned__ (4))) =
+#else
+static const char xfce_builtin_license_GPL[] =
+#endif
   N_ ("This program is free software; you can redistribute it and/or modify it\n"
       "under the terms of the GNU General Public License as published by the Free\n"
       "Software Foundation; either version 2 of the License, or (at your option)\n"
@@ -66,7 +77,14 @@ const gchar xfce_builtin_license_GPL[] =
       "this program; if not, write to the Free Software Foundation, Inc., 51 Franklin\n"
       "Street, Fifth Floor, Boston, MA 02110-1301, USA.\n");
 
-const gchar xfce_builtin_license_LGPL[] =
+#ifdef __SUNPRO_C
+#pragma align 4 (xfce_builtin_license_LGPL)
+#endif
+#ifdef __GNUC__
+static const char xfce_builtin_license_LGPL[] __attribute__ ((__aligned__ (4))) =
+#else
+static const char xfce_builtin_license_LGPL[] =
+#endif
   N_ ("This library is free software; you can redistribute it and/or\n"
       "modify it under the terms of the GNU Library General Public\n"
       "License as published by the Free Software Foundation; either\n"



More information about the Xfce4-commits mailing list