]> git.pld-linux.org Git - packages/cdecl.git/commitdiff
- fix redefinition of getline(3) auto/th/cdecl-2.5-29
authorJan Rękorajski <baggins@pld-linux.org>
Tue, 18 Oct 2016 17:41:35 +0000 (19:41 +0200)
committerJan Rękorajski <baggins@pld-linux.org>
Tue, 18 Oct 2016 17:41:35 +0000 (19:41 +0200)
- rel 29

cdecl.spec
getline.patch [new file with mode: 0644]

index 505af24cdfab2a15540911ba9a50cf8417239152..11ab50320ce5215d940f480bbe3b623311ed7911 100644 (file)
@@ -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 (file)
index 0000000..33ca5ed
--- /dev/null
@@ -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;
This page took 0.053388 seconds and 4 git commands to generate.