• Skip to sidebar navigation
  • Skip to content

Bitbucket

  • More
    ProjectsRepositories
  • Help
    • Online help
    • Learn Git
    • Welcome to Bitbucket
    • Keyboard shortcuts
  • Log In
Alexander Dahl
  1. Alexander Dahl

buildroot

Public
Actions
  • Clone
  • Compare

Learn more about cloning repositories

You have read-only access

Navigation
  • Source
  • Commits
  • Branches
  • All Branches Graph
  • Forks
  1. Alexander Dahl
  2. buildroot

Source

buildroot/package/gnuchess/gnuchess-5.07-getline-conflicts.patch
Peter KorsgaardPeter Korsgaard committed 9b809e1a6ad05 Nov 2012
Raw file
Source viewDiff to previous
xxxxxxxxxx
 
1
This patch fixes a conflict between the C library getline() function
2
and gnuchess getline() function.
3
​
4
Patch borrowed from the gnuchess Debian package.
5
​
6
Index: gnuchess-5.07/src/input.c
7
===================================================================
8
--- gnuchess-5.07.orig/src/input.c  2009-09-29 16:01:38.000000000 +0200
9
+++ gnuchess-5.07/src/input.c   2009-09-29 16:02:57.000000000 +0200
10
@@ -127,7 +127,7 @@
11
          (RealGameCnt+1)/2 + 1 );
12
     }
13
     pthread_mutex_lock(&input_mutex);
14
-    getline(prompt);
15
+    get_line(prompt);
16
     input_status = INPUT_AVAILABLE;
17
     pthread_cond_signal(&input_cond);
18
     pthread_mutex_unlock(&input_mutex);
19
@@ -173,13 +173,13 @@
20
 {
21
 #ifdef HAVE_LIBREADLINE
22
   if (isatty(STDIN_FILENO)) {
23
-    getline = getline_readline;
24
+    get_line = getline_readline;
25
     using_history();
26
   } else {
27
-    getline = getline_standard;
28
+    get_line = getline_standard;
29
   }
30
 #else
31
-  getline = getline_standard;
32
+  get_line = getline_standard;
33
 #endif
34
   /* Start input thread */
35
   pthread_create(&input_thread, NULL, input_func, NULL);
36
Index: gnuchess-5.07/src/common.h
37
===================================================================
38
--- gnuchess-5.07.orig/src/common.h 2009-09-29 16:06:17.000000000 +0200
39
+++ gnuchess-5.07/src/common.h  2009-09-29 16:06:40.000000000 +0200
40
@@ -745,7 +745,7 @@
41
  * Input routine, initialized to one of the specific
42
  * input routines. The given argument is the prompt.
43
  */
44
-void (*getline) (char *);
45
+void (*get_line) (char *);
46
 
47
 #define MAXSTR 128
48
 extern char inputstr[MAXSTR];
  • Git repository management for enterprise teams powered by Atlassian Bitbucket
  • Atlassian Bitbucket v6.7.2
  • Documentation
  • Request a feature
  • About
  • Contact Atlassian
Atlassian

Everything looks good. We'll let you know here if there's anything you should know about.