gsasl-commit
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

CVS gsasl/gl


From: gsasl-commit
Subject: CVS gsasl/gl
Date: Wed, 30 Nov 2005 16:22:49 +0100

Update of /home/cvs/gsasl/gl
In directory dopio:/tmp/cvs-serv22738/gl

Modified Files:
        getaddrinfo.h readline.c 
Log Message:
Sync gnulib.

--- /home/cvs/gsasl/gl/getaddrinfo.h    2005/10/05 09:17:48     1.8
+++ /home/cvs/gsasl/gl/getaddrinfo.h    2005/11/30 15:22:49     1.9
@@ -82,7 +82,7 @@
 #  endif
 # endif
 
-# ifndef HAVE_DECL_GETADDRINFO
+# if !HAVE_DECL_GETADDRINFO
 /* Translate name of a service location and/or a service name to set of
    socket addresses.
    For more details, see the POSIX:2001 specification
@@ -93,14 +93,14 @@
                        struct addrinfo **restrict res);
 # endif
 
-# ifndef HAVE_DECL_FREEADDRINFO
+# if !HAVE_DECL_FREEADDRINFO
 /* Free `addrinfo' structure AI including associated storage.
    For more details, see the POSIX:2001 specification
    <http://www.opengroup.org/susv3xsh/getaddrinfo.html>.  */
 extern void freeaddrinfo (struct addrinfo *ai);
 # endif
 
-# ifndef HAVE_DECL_GAI_STRERROR
+# if !HAVE_DECL_GAI_STRERROR
 /* Convert error return from getaddrinfo() to a string.
    For more details, see the POSIX:2001 specification
    <http://www.opengroup.org/susv3xsh/gai_strerror.html>.  */
--- /home/cvs/gsasl/gl/readline.c       2005/09/20 09:18:50     1.7
+++ /home/cvs/gsasl/gl/readline.c       2005/11/30 15:22:49     1.8
@@ -33,6 +33,7 @@
 #include "readline.h"
 
 #include <stdio.h>
+#include <string.h>
 #include <getline.h>
 
 char *
@@ -47,5 +48,9 @@
   if (getline (&out, &size, stdin) < 0)
     return NULL;
 
+  while (*out && (out[strlen (out) - 1] == '\r'
+                 || out[strlen (out) - 1] == '\n'))
+    out[strlen (out) - 1] = '\0';
+
   return out;
 }





reply via email to

[Prev in Thread] Current Thread [Next in Thread]