[packages/cdecl] - fix redefinition of getline(3) - rel 29

baggins baggins at pld-linux.org
Tue Oct 18 19:42:08 CEST 2016


commit c0dae42edb3f86f6c5ce6b3050b9254f4ec884b0
Author: Jan Rękorajski <baggins at pld-linux.org>
Date:   Tue Oct 18 19:41:35 2016 +0200

    - fix redefinition of getline(3)
    - rel 29

 cdecl.spec    |  4 +++-
 getline.patch | 29 +++++++++++++++++++++++++++++
 2 files changed, 32 insertions(+), 1 deletion(-)
---
diff --git a/cdecl.spec b/cdecl.spec
index 505af24..11ab503 100644
--- a/cdecl.spec
+++ b/cdecl.spec
@@ -9,12 +9,13 @@ Summary(tr.UTF-8):	İngilizceden C/C++ bildirimlerine çevirici
 Summary(uk.UTF-8):	Транслятор English <--> декларації C/C++
 Name:		cdecl
 Version:	2.5
-Release:	28
+Release:	29
 License:	distributable
 Group:		Development/Tools
 Source0:	ftp://sunsite.unc.edu/pub/Linux/devel/lang/c/%{name}-%{version}.tar.gz
 # Source0-md5:	29895dab52e85b2474a59449e07b7996
 Patch0:		%{name}-misc.patch
+Patch1:		getline.patch
 BuildRequires:	bison
 BuildRequires:	flex
 BuildRequires:	readline-devel >= 4.2
@@ -61,6 +62,7 @@ kullanışlıdır.
 %prep
 %setup -q
 %patch0 -p1
+%patch1 -p1
 
 %build
 bison -y cdgram.y && mv -f y.tab.c cdgram.c
diff --git a/getline.patch b/getline.patch
new file mode 100644
index 0000000..33ca5ed
--- /dev/null
+++ b/getline.patch
@@ -0,0 +1,29 @@
+--- cdecl-2.5/cdecl.c~	2016-10-18 19:39:15.000000000 +0200
++++ cdecl-2.5/cdecl.c	2016-10-18 19:40:38.931448163 +0200
+@@ -91,7 +91,7 @@
+ #ifdef USE_READLINE
+ # include <readline/readline.h>
+   /* prototypes for functions related to readline() */
+-  char * getline();
++  char * cdecl_getline();
+   char ** attempt_completion(char *, int, int);
+   char * keyword_completion(char *, int);
+   char * command_completion(char *, int);
+@@ -375,7 +375,7 @@
+ static char *line_read = NULL;
+ 
+ /* Read a string, and return a pointer to it.  Returns NULL on EOF. */
+-char * getline ()
++char * cdecl_getline ()
+ {
+   /* If the buffer has already been allocated, return the memory
+      to the free pool. */
+@@ -887,7 +887,7 @@
+ 
+ 	if (!quiet) (void) printf("Type `help' or `?' for help\n");
+ 	ret = 0;
+-	while ((line = getline())) {
++	while ((line = cdecl_getline())) {
+ 	    if (!strcmp(line, "quit") || !strcmp(line, "exit")) {
+ 		free(line);
+ 		return ret;
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/cdecl.git/commitdiff/c0dae42edb3f86f6c5ce6b3050b9254f4ec884b0



More information about the pld-cvs-commit mailing list