Complete.Org: Mailing Lists: Archives: freeciv-dev: May 2004:
[Freeciv-Dev] (PR#8721)
Home

[Freeciv-Dev] (PR#8721)

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: undisclosed-recipients: ;
Subject: [Freeciv-Dev] (PR#8721)
From: "Sebastian Bauer" <sebauer@xxxxxxxxxxx>
Date: Wed, 12 May 2004 07:22:06 -0700
Reply-to: rt@xxxxxxxxxxx

<URL: http://rt.freeciv.org/Ticket/Display.html?id=8721 >

Attached you'll find a patch which makes some changes necessary to let 
the server run again under AmigaOS.

It introduces a new CHALLENGE_PATH. If set, it defines the path for 
the challenge file which needed if a client want to control the server.

As AmigaOS does't know about Home directories, it also modifies 
user_home_dir() to return a appropriate directory.
diff -u -w -b -r1.131 gamehand.c
--- server/gamehand.c   10 Apr 2004 03:47:49 -0000      1.131
+++ server/gamehand.c   12 May 2004 07:01:14 -0000
@@ -389,9 +389,13 @@
 
   /* find a suitable file to place the challenge in, we'll remove the file
    * once the challenge is  */
+#ifndef CHALLENGE_PATH
   sz_strlcpy(challenge_filename, user_home_dir());
   sz_strlcat(challenge_filename, "/");
   sz_strlcat(challenge_filename, CHALLENGE_ROOT);
+#else
+  sz_strlcpy(challenge_filename, CHALLENGE_PATH);
+#endif
 
   for (i = 0; i < NUMBER_OF_TRIES; i++) {
     char test_str[MAX_LEN_PATH];
diff -u -w -b -r1.110 shared.c
--- utility/shared.c    2 May 2004 11:42:24 -0000       1.110
+++ utility/shared.c    12 May 2004 06:33:28 -0000
@@ -678,6 +678,9 @@
 ***************************************************************************/
 char *user_home_dir(void)
 {
+#ifdef AMIGA
+  return "PROGDIR:";
+#else
   static bool init = FALSE;
   static char *home_dir = NULL;
   
@@ -702,6 +705,7 @@
     init = TRUE;
   }
   return home_dir;
+#endif
 }
 
 /***************************************************************************

[Prev in Thread] Current Thread [Next in Thread]
  • [Freeciv-Dev] (PR#8721), Sebastian Bauer <=