r467 - trunk

DONOTREPLY at icculus.org DONOTREPLY at icculus.org
Fri Jan 25 01:24:21 EST 2008


Author: icculus
Date: 2008-01-25 01:24:21 -0500 (Fri, 25 Jan 2008)
New Revision: 467

Added:
   trunk/platform_beos.cpp
Removed:
   trunk/platform_beos.c
Modified:
   trunk/CMakeLists.txt
Log:
Renamed platform_beos.c to platform_beos.cpp, so we can use system C++ classes
 on BeOS.


Modified: trunk/CMakeLists.txt
===================================================================
--- trunk/CMakeLists.txt	2008-01-25 02:31:01 UTC (rev 466)
+++ trunk/CMakeLists.txt	2008-01-25 06:24:21 UTC (rev 467)
@@ -204,12 +204,17 @@
     checksum_md5.c
     checksum_sha1.c
     platform_unix.c
-    platform_beos.c
     platform_windows.c
     lua_glue.c
     ${LUA_SRCS}
 )
 
+# Have to separate this, so CMake doesn't try to link in C++ support on other
+#  platforms.
+IF(BEOS)
+    SET(MOJOSETUP_SRCS ${MOJOSETUP_SRCS} platform_beos.cpp)
+ENDIF(BEOS)
+
 SET(MOJOLUAC_SRCS
     ${LUA_SRCS}
     ${LUA_PARSER_SRCS}

Deleted: trunk/platform_beos.c
===================================================================
--- trunk/platform_beos.c	2008-01-25 02:31:01 UTC (rev 466)
+++ trunk/platform_beos.c	2008-01-25 06:24:21 UTC (rev 467)
@@ -1,53 +0,0 @@
-/**
- * MojoSetup; a portable, flexible installation application.
- *
- * Please see the file LICENSE.txt in the source's root directory.
- *
- *  This file written by Ryan C. Gordon.
- */
-
-// You also need to compile unix.c, but this lets us add some things that
-//  cause conflicts between the Be headers and MojoSetup, and use C++. These
-//  are largely POSIX things that are missing from BeOS 5...keeping them here
-//  even on Zeta lets us be binary compatible across everything, I think.
-
-#if PLATFORM_BEOS
-
-#include <stdio.h>
-#include <be/kernel/image.h>
-#include <be/kernel/OS.h>
-
-void *beos_dlopen(const char *fname, int unused)
-{
-    const image_id lib = load_add_on(fname);
-    (void) unused;
-    if (lib < 0)
-        return NULL;
-    return (void *) lib;
-} // beos_dlopen
-
-
-void *beos_dlsym(void *lib, const char *sym)
-{
-    void *addr = NULL;
-    if (get_image_symbol((image_id) lib, sym, B_SYMBOL_TYPE_TEXT, &addr))
-        return NULL;
-    return addr;
-} // beos_dlsym
-
-
-void beos_dlclose(void *lib)
-{
-    unload_add_on((image_id) lib);
-} // beos_dlclose
-
-
-void beos_usleep(unsigned long microseconds)
-{
-    snooze(microseconds);
-} // beos_usleep
-
-#endif  // PLATFORM_BEOS
-
-// end of beos.c ...
-

Copied: trunk/platform_beos.cpp (from rev 466, trunk/platform_beos.c)
===================================================================
--- trunk/platform_beos.cpp	                        (rev 0)
+++ trunk/platform_beos.cpp	2008-01-25 06:24:21 UTC (rev 467)
@@ -0,0 +1,53 @@
+/**
+ * MojoSetup; a portable, flexible installation application.
+ *
+ * Please see the file LICENSE.txt in the source's root directory.
+ *
+ *  This file written by Ryan C. Gordon.
+ */
+
+// You also need to compile unix.c, but this lets us add some things that
+//  cause conflicts between the Be headers and MojoSetup, and use C++. These
+//  are largely POSIX things that are missing from BeOS 5...keeping them here
+//  even on Zeta lets us be binary compatible across everything, I think.
+
+#if PLATFORM_BEOS
+
+#include <stdio.h>
+#include <be/kernel/image.h>
+#include <be/kernel/OS.h>
+
+void *beos_dlopen(const char *fname, int unused)
+{
+    const image_id lib = load_add_on(fname);
+    (void) unused;
+    if (lib < 0)
+        return NULL;
+    return (void *) lib;
+} // beos_dlopen
+
+
+void *beos_dlsym(void *lib, const char *sym)
+{
+    void *addr = NULL;
+    if (get_image_symbol((image_id) lib, sym, B_SYMBOL_TYPE_TEXT, &addr))
+        return NULL;
+    return addr;
+} // beos_dlsym
+
+
+void beos_dlclose(void *lib)
+{
+    unload_add_on((image_id) lib);
+} // beos_dlclose
+
+
+void beos_usleep(unsigned long microseconds)
+{
+    snooze(microseconds);
+} // beos_usleep
+
+#endif  // PLATFORM_BEOS
+
+// end of beos.c ...
+




More information about the mojosetup-commits mailing list