]> git.pld-linux.org Git - packages/cdecl.git/blobdiff - getline.patch
- fix redefinition of getline(3)
[packages/cdecl.git] / getline.patch
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.068774 seconds and 4 git commands to generate.