gnome-games r9063 - branches/gnome-2-26/dependencies/gnuchess



Author: jclinton
Date: Tue Apr 14 03:06:48 2009
New Revision: 9063
URL: http://svn.gnome.org/viewvc/gnome-games?rev=9063&view=rev

Log:
Update our copy of GNUChess for POSIX 2008 compatibility.

This is required because glibc 2.9.90 and higher now exports the getline
symbol by default. And because GNUChess stupidly uses a function named
'getline'. This just renames these functions to something sane.

Modified:
   branches/gnome-2-26/dependencies/gnuchess/common.h
   branches/gnome-2-26/dependencies/gnuchess/input.c

Modified: branches/gnome-2-26/dependencies/gnuchess/common.h
==============================================================================
--- branches/gnome-2-26/dependencies/gnuchess/common.h	(original)
+++ branches/gnome-2-26/dependencies/gnuchess/common.h	Tue Apr 14 03:06:48 2009
@@ -744,7 +744,7 @@
  * Input routine, initialized to one of the specific
  * input routines. The given argument is the prompt.
  */
-void (*getline) (char *);
+void (*getline_intrl) (char *);
 
 #define MAXSTR 128
 extern char inputstr[MAXSTR];

Modified: branches/gnome-2-26/dependencies/gnuchess/input.c
==============================================================================
--- branches/gnome-2-26/dependencies/gnuchess/input.c	(original)
+++ branches/gnome-2-26/dependencies/gnuchess/input.c	Tue Apr 14 03:06:48 2009
@@ -128,7 +128,7 @@
 	      (RealGameCnt+1)/2 + 1 );
     }
     pthread_mutex_lock(&input_mutex);
-    getline(prompt);
+    getline_intrl(prompt);
     input_status = INPUT_AVAILABLE;
     pthread_cond_signal(&input_cond);
     pthread_mutex_unlock(&input_mutex);
@@ -174,13 +174,13 @@
 {
 #ifdef HAVE_LIBREADLINE
   if (isatty(STDIN_FILENO)) {
-    getline = getline_readline;
+    getline_intrl = getline_readline;
     using_history();
   } else {
-    getline = getline_standard;
+    getline_intrl = getline_standard;
   }
 #else
-  getline = getline_standard;
+  getline_intrl = getline_standard;
 #endif
   /* Start input thread */
   pthread_create(&input_thread, NULL, input_func, NULL);



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]