forked from pool/gnuchess
This commit is contained in:
parent
844935a05c
commit
e0cc368203
39
gnuchess-getline.diff
Normal file
39
gnuchess-getline.diff
Normal file
@ -0,0 +1,39 @@
|
||||
--- src/common.h
|
||||
+++ src/common.h
|
||||
@@ -745,7 +745,7 @@
|
||||
* Input routine, initialized to one of the specific
|
||||
* input routines. The given argument is the prompt.
|
||||
*/
|
||||
-void (*getline) (char *);
|
||||
+void (*my_getline) (char *);
|
||||
|
||||
#define MAXSTR 128
|
||||
extern char inputstr[MAXSTR];
|
||||
--- src/input.c
|
||||
+++ src/input.c
|
||||
@@ -127,7 +127,7 @@
|
||||
(RealGameCnt+1)/2 + 1 );
|
||||
}
|
||||
pthread_mutex_lock(&input_mutex);
|
||||
- getline(prompt);
|
||||
+ my_getline(prompt);
|
||||
input_status = INPUT_AVAILABLE;
|
||||
pthread_cond_signal(&input_cond);
|
||||
pthread_mutex_unlock(&input_mutex);
|
||||
@@ -173,13 +173,13 @@
|
||||
{
|
||||
#ifdef HAVE_LIBREADLINE
|
||||
if (isatty(STDIN_FILENO)) {
|
||||
- getline = getline_readline;
|
||||
+ my_getline = getline_readline;
|
||||
using_history();
|
||||
} else {
|
||||
- getline = getline_standard;
|
||||
+ my_getline = getline_standard;
|
||||
}
|
||||
#else
|
||||
- getline = getline_standard;
|
||||
+ my_getline = getline_standard;
|
||||
#endif
|
||||
/* Start input thread */
|
||||
pthread_create(&input_thread, NULL, input_func, NULL);
|
@ -1,3 +1,9 @@
|
||||
-------------------------------------------------------------------
|
||||
Sun Jun 7 12:00:28 CEST 2009 - ro@suse.de
|
||||
|
||||
- rename getline to my_getline to avoid conflict with function
|
||||
from glibc
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Thu Nov 6 15:28:52 CET 2008 - ro@suse.de
|
||||
|
||||
|
@ -1,7 +1,7 @@
|
||||
#
|
||||
# spec file for package gnuchess (Version 5.07)
|
||||
#
|
||||
# Copyright (c) 2008 SUSE LINUX Products GmbH, Nuernberg, Germany.
|
||||
# Copyright (c) 2009 SUSE LINUX Products GmbH, Nuernberg, Germany.
|
||||
#
|
||||
# All modifications and additions to the file contributed by third parties
|
||||
# remain the property of their copyright owners, unless otherwise agreed
|
||||
@ -27,7 +27,7 @@ Provides: chess_backend
|
||||
Provides: gchess
|
||||
AutoReqProv: on
|
||||
Version: 5.07
|
||||
Release: 143
|
||||
Release: 144
|
||||
Summary: GNU Chess Program
|
||||
Source: %{name}-%{version}.tar.bz2
|
||||
# WARNING: Don't forget to re-generate book.dat manually before submit!
|
||||
@ -37,6 +37,7 @@ Source2: book.dat.bz2
|
||||
Source3: genbook.sh
|
||||
Source4: gnuchess.6
|
||||
Patch0: gnuchess-nonstatic.diff
|
||||
Patch1: gnuchess-getline.diff
|
||||
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
||||
|
||||
%description
|
||||
@ -56,6 +57,7 @@ Authors:
|
||||
%prep
|
||||
%setup
|
||||
%patch0
|
||||
%patch1
|
||||
|
||||
%build
|
||||
CFLAGS="$RPM_OPT_FLAGS"
|
||||
@ -90,6 +92,9 @@ rm -rf $RPM_BUILD_ROOT
|
||||
%doc AUTHORS COPYING ChangeLog NEWS README TODO doc
|
||||
|
||||
%changelog
|
||||
* Sun Jun 07 2009 ro@suse.de
|
||||
- rename getline to my_getline to avoid conflict with function
|
||||
from glibc
|
||||
* Thu Nov 06 2008 ro@suse.de
|
||||
- remove NoSource tag
|
||||
* Fri Mar 30 2007 ro@suse.de
|
||||
|
Loading…
Reference in New Issue
Block a user