gnome-games r9062 - trunk/dependencies/gnuchess



Author: jclinton
Date: Tue Apr 14 03:05:38 2009
New Revision: 9062
URL: http://svn.gnome.org/viewvc/gnome-games?rev=9062&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:
   trunk/dependencies/gnuchess/common.h
   trunk/dependencies/gnuchess/input.c

Modified: trunk/dependencies/gnuchess/common.h
==============================================================================
--- trunk/dependencies/gnuchess/common.h	(original)
+++ trunk/dependencies/gnuchess/common.h	Tue Apr 14 03:05:38 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: trunk/dependencies/gnuchess/input.c
==============================================================================
--- trunk/dependencies/gnuchess/input.c	(original)
+++ trunk/dependencies/gnuchess/input.c	Tue Apr 14 03:05:38 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]