Package: cdecl
Version: 2.5-9
Severity: important
Tags: patch
User: ubuntu-de...@lists.ubuntu.com
Usertags: origin-ubuntu ubuntu-patch karmic

POSIX:2008 defines a getline function, so cdecl fails to build with
recent (e)glibc because it defines its own. This patch renames the
function to get_line.

  * Rename getline to get_line to avoid conflict with POSIX:2008.

diff -u cdecl-2.5/cdecl.c cdecl-2.5/cdecl.c
--- cdecl-2.5/cdecl.c
+++ cdecl-2.5/cdecl.c
@@ -91,7 +91,7 @@
 #ifdef USE_READLINE
 # include <readline/readline.h>
   /* prototypes for functions related to readline() */
-  char * getline();
+  char * get_line();
   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 * get_line ()
 {
   /* 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 = get_line())) {
            if (!strcmp(line, "quit") || !strcmp(line, "exit")) {
                free(line);
                return ret;

Thanks,

-- 
Colin Watson                                       [cjwat...@ubuntu.com]



-- 
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org

Reply via email to