source: trunk/dports/games/xracer/files/patch-craft.c @ 1541

Last change on this file since 1541 was 1420, checked in by jkh, 18 years ago

Final tweak to dynamic search code.

  • Property svn:eol-style set to native
File size: 1010 bytes
Line 
1--- src/craft.c.orig    Thu Dec 12 15:03:41 2002
2+++ src/craft.c Thu Dec 12 15:05:31 2002
3@@ -85,12 +85,12 @@
4       /* xrLog (LOG_DEBUG, "name = %s (len = %d)", name, len); */
5 
6       if (strncmp (name, "libcraft", 8) == 0 &&
7-         strcmp (name + len - 3, ".so") == 0)
8+         strcmp (name + len - 6, ".dylib") == 0)
9        {
10          char shortname[1024];
11 
12-         strncpy (shortname, name + 8, len - 11);
13-         shortname[len-11] = '\0';
14+         strncpy (shortname, name + 8, len - 14);
15+         shortname[len-14] = '\0';
16 
17          /* Try loading it. Don't worry about the return value. */
18          xrCraftLoadByName (shortname);
19@@ -115,7 +115,7 @@
20   struct xrCraft *craft;
21 
22   /* Try to construct the name of the shared library containing this craft. */
23-  snprintf (filename, sizeof filename, "craft/libcraft%s.so", name);
24+  snprintf (filename, sizeof filename, "craft/libcraft%s.dylib", name);
25 
26   /* See if we can open this track. Make sure we resolve all link-time
27    * errors now, and make sure that symbols from the track don't pollute
Note: See TracBrowser for help on using the repository browser.