[Scummvm-cvs-logs] scummvm master -> dcf9daf4cff0c74fd8533436d479d7c224bfb246

bluegr md5 at scummvm.org
Sat May 14 11:34:24 CEST 2011


This automated email contains information about 1 new commit which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .

Summary:
dcf9daf4cf SWORD25 (LUA): Some compilation optimizations


Commit: dcf9daf4cff0c74fd8533436d479d7c224bfb246
    https://github.com/scummvm/scummvm/commit/dcf9daf4cff0c74fd8533436d479d7c224bfb246
Author: md5 (md5 at scummvm.org)
Date: 2011-05-14T02:32:34-07:00

Commit Message:
SWORD25 (LUA): Some compilation optimizations

For Android, define stroll() inside luaconf.h
For PS2, don't use the visibility attribute, as the PS2 gcc isn't
particularly happy about it...

Changed paths:
    engines/sword25/util/lua/luaconf.h
    engines/sword25/util/lua/lvm.cpp



diff --git a/engines/sword25/util/lua/luaconf.h b/engines/sword25/util/lua/luaconf.h
index 669b0e7..ddd6c81 100644
--- a/engines/sword25/util/lua/luaconf.h
+++ b/engines/sword25/util/lua/luaconf.h
@@ -18,6 +18,14 @@
 ** ===================================================================
 */
 
+#if defined(__ANDROID__)
+/* Android is missing strcoll().
+** For more information, refer to:
+** http://www.damonkohler.com/2008/12/lua-on-android.html
+*/
+#define strcoll strcmp
+#endif
+
 
 /*
 @@ LUA_ANSI controls the use of non-ansi features.
@@ -183,7 +191,11 @@
 #define LUAI_DATA	/* empty */
 
 #elif defined(__GNUC__) && ((__GNUC__*100 + __GNUC_MINOR__) >= 302) && \
-      defined(__ELF__)
+      defined(__ELF__) && !defined(__PLAYSTATION2__)
+/*
+** The PS2 gcc compiler doesn't like the visibility attribute, so
+** we use the normal "extern" definitions in the block below
+*/
 #define LUAI_FUNC	__attribute__((visibility("hidden"))) extern
 #define LUAI_DATA	LUAI_FUNC
 
diff --git a/engines/sword25/util/lua/lvm.cpp b/engines/sword25/util/lua/lvm.cpp
index aee3106..ae70fe2 100644
--- a/engines/sword25/util/lua/lvm.cpp
+++ b/engines/sword25/util/lua/lvm.cpp
@@ -202,14 +202,7 @@ static int l_strcmp (const TString *ls, const TString *rs) {
   const char *r = getstr(rs);
   size_t lr = rs->tsv.len;
   for (;;) {
-#if defined(__ANDROID__)
-    // Android is missing strcoll().
-    // For more information, refer to:
-    // http://www.damonkohler.com/2008/12/lua-on-android.html
-    int temp = strcmp(l, r);
-#else
     int temp = strcoll(l, r);
-#endif
     if (temp != 0) return temp;
     else {  /* strings are equal up to a `\0' */
       size_t len = strlen(l);  /* index of first `\0' in both strings */






More information about the Scummvm-git-logs mailing list