r416 - in trunk/code: qcommon unix

DONOTREPLY at icculus.org DONOTREPLY at icculus.org
Sun Dec 4 20:11:42 EST 2005


Author: icculus
Date: 2005-12-04 20:11:41 -0500 (Sun, 04 Dec 2005)
New Revision: 416

Modified:
   trunk/code/qcommon/q_platform.h
   trunk/code/unix/unix_main.c
Log:

Look for correct filename extension when loading native DLLs.



Modified: trunk/code/qcommon/q_platform.h
===================================================================
--- trunk/code/qcommon/q_platform.h	2005-12-05 00:58:47 UTC (rev 415)
+++ trunk/code/qcommon/q_platform.h	2005-12-05 01:11:41 UTC (rev 416)
@@ -89,6 +89,8 @@
 
 #define Q3_LITTLE_ENDIAN
 
+#define DLL_EXT ".dll"
+
 #endif
 
 //============================================================== MAC OS X ===
@@ -112,6 +114,8 @@
 #define Q3_LITTLE_ENDIAN
 #endif
 
+#define DLL_EXT ".dylib"
+
 #endif
 
 //================================================================= LINUX ===
@@ -158,6 +162,8 @@
 #define Q3_LITTLE_ENDIAN
 #endif
 
+#define DLL_EXT ".so"
+
 #endif
 
 //=============================================================== FreeBSD ===
@@ -182,6 +188,8 @@
 #define Q3_LITTLE_ENDIAN
 #endif
 
+#define DLL_EXT ".so"
+
 #endif
 
 //================================================================= SUNOS ===
@@ -207,6 +215,8 @@
 #define Q3_LITTLE_ENDIAN
 #endif
 
+#define DLL_EXT ".so"
+
 #endif
 
 //================================================================== Q3VM ===
@@ -219,6 +229,8 @@
 
 #define ARCH_STRING "bytecode"
 
+#define DLL_EXT ".qvm"
+
 #endif
 
 //===========================================================================
@@ -240,7 +252,11 @@
 #error "PATH_SEP not defined"
 #endif
 
+#ifndef DLL_EXT
+#error "DLL_EXT not defined"
+#endif
 
+
 //endianness
 short ShortSwap (short l);
 int LongSwap (int l);

Modified: trunk/code/unix/unix_main.c
===================================================================
--- trunk/code/unix/unix_main.c	2005-12-05 00:58:47 UTC (rev 415)
+++ trunk/code/unix/unix_main.c	2005-12-05 01:11:41 UTC (rev 416)
@@ -800,7 +800,7 @@
   assert( name );
 
   getcwd(curpath, sizeof(curpath));
-  snprintf (fname, sizeof(fname), "%s" ARCH_STRING ".so", name);
+  snprintf (fname, sizeof(fname), "%s" ARCH_STRING DLL_EXT, name);
 
   // TODO: use fs_searchpaths from files.c
   pwdpath = Sys_Cwd();




More information about the quake3-commits mailing list