[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
CVS gsasl/gl
From: |
gsasl-commit |
Subject: |
CVS gsasl/gl |
Date: |
Wed, 15 Jun 2005 12:33:56 +0200 |
Update of /home/cvs/gsasl/gl
In directory dopio:/tmp/cvs-serv24263/gl
Modified Files:
Makefile.am error.c error.h exit.h gai_strerror.c
getaddrinfo.c getaddrinfo.h getline.c getline.h getndelim2.c
getndelim2.h getopt.c getopt1.c getopt_.h getopt_int.h
getpass.c getpass.h gettext.h iconvme.c iconvme.h progname.c
progname.h stdbool_.h strdup.c strdup.h
Log Message:
Update gnulib files.
--- /home/cvs/gsasl/gl/Makefile.am 2005/01/29 00:56:10 1.43
+++ /home/cvs/gsasl/gl/Makefile.am 2005/06/15 10:33:56 1.44
@@ -8,8 +8,8 @@
# the same distribution terms as the rest of that program.
#
# Generated by gnulib-tool.
-# Invoked as: gnulib-tool --import --automatic-prototypes
-# Reproduce by: gnulib-tool --import --dir=. --lib=libgl --source-base=gl
--m4-base=gl/m4 --libtool error exit getaddrinfo getline getopt getpass-gnu
gettext iconv iconvme progname restrict stdbool strdup
+# Invoked as: gnulib-tool --import
+# Reproduce by: gnulib-tool --import --dir=. --lib=libgl --source-base=gl
--m4-base=gl/m4 --aux-dir=. --libtool error exit getaddrinfo getline getopt
getpass-gnu gettext iconv iconvme progname restrict stdbool strdup
AUTOMAKE_OPTIONS = 1.5 gnits no-dependencies
@@ -39,7 +39,6 @@
## begin gnulib module getline
-libgl_la_SOURCES += getline.h
EXTRA_DIST += getndelim2.h getndelim2.c
## end gnulib module getline
@@ -59,12 +58,6 @@
## end gnulib module getopt
-## begin gnulib module getpass-gnu
-
-libgl_la_SOURCES += getpass.h
-
-## end gnulib module getpass-gnu
-
## begin gnulib module gettext
libgl_la_SOURCES += gettext.h
@@ -99,12 +92,6 @@
## end gnulib module stdbool
-## begin gnulib module strdup
-
-libgl_la_SOURCES += strdup.h
-
-## end gnulib module strdup
-
# Makefile.am ends here
--- /home/cvs/gsasl/gl/error.c 2005/01/01 16:06:03 1.7
+++ /home/cvs/gsasl/gl/error.c 2005/06/15 10:33:56 1.8
@@ -14,7 +14,7 @@
You should have received a copy of the GNU General Public License along
with this program; if not, write to the Free Software Foundation,
- Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
+ Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */
/* Written by David MacKenzie <address@hidden>. */
--- /home/cvs/gsasl/gl/error.h 2004/08/03 16:01:20 1.4
+++ /home/cvs/gsasl/gl/error.h 2005/06/15 10:33:56 1.5
@@ -14,7 +14,7 @@
You should have received a copy of the GNU General Public License along
with this program; if not, write to the Free Software Foundation,
- Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
+ Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */
#ifndef _ERROR_H
#define _ERROR_H 1
--- /home/cvs/gsasl/gl/exit.h 2004/08/03 16:01:20 1.3
+++ /home/cvs/gsasl/gl/exit.h 2005/06/15 10:33:56 1.4
@@ -13,7 +13,7 @@
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software Foundation,
- Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
+ Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */
#ifndef _EXIT_H
#define _EXIT_H
--- /home/cvs/gsasl/gl/gai_strerror.c 2005/01/29 00:56:10 1.2
+++ /home/cvs/gsasl/gl/gai_strerror.c 2005/06/15 10:33:56 1.3
@@ -14,7 +14,7 @@
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software Foundation,
- Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
+ Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */
#include <stdio.h>
#include <netdb.h>
--- /home/cvs/gsasl/gl/getaddrinfo.c 2004/11/19 02:21:33 1.3
+++ /home/cvs/gsasl/gl/getaddrinfo.c 2005/06/15 10:33:56 1.4
@@ -1,5 +1,5 @@
/* Get address information (partial implementation).
- Copyright (C) 1997, 2001, 2002, 2004 Free Software Foundation, Inc.
+ Copyright (C) 1997, 2001, 2002, 2004, 2005 Free Software Foundation, Inc.
Contributed by Simon Josefsson <address@hidden>.
This program is free software; you can redistribute it and/or modify
@@ -14,7 +14,7 @@
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software Foundation,
- Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
+ Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */
#if HAVE_CONFIG_H
# include <config.h>
@@ -74,14 +74,10 @@
if (hints && !validate_family (hints->ai_family))
return EAI_FAMILY;
- if (hints && hints->ai_socktype)
- /* FIXME: Support more socket types. */
- return EAI_SOCKTYPE;
-
if (hints &&
- hints->ai_protocol != SOCK_STREAM && hints->ai_protocol != SOCK_DGRAM)
- /* FIXME: Support other protocols. */
- return EAI_SERVICE; /* FIXME: Better return code? */
+ hints->ai_socktype != SOCK_STREAM && hints->ai_socktype != SOCK_DGRAM)
+ /* FIXME: Support other socktype. */
+ return EAI_SOCKTYPE; /* FIXME: Better return code? */
if (!nodename)
/* FIXME: Support server bind mode. */
@@ -90,7 +86,7 @@
if (servname)
{
const char *proto =
- (hints && hints->ai_protocol == SOCK_DGRAM) ? "udp" : "tcp";
+ (hints && hints->ai_socktype == SOCK_DGRAM) ? "udp" : "tcp";
/* FIXME: Use getservbyname_r if available. */
se = getservbyname (servname, proto);
@@ -171,6 +167,8 @@
return EAI_NODATA;
}
+ tmp->ai_protocol = (hints) ? hints->ai_protocol : 0;
+ tmp->ai_socktype = (hints) ? hints->ai_socktype : 0;
tmp->ai_addr->sa_family = he->h_addrtype;
/* FIXME: If more than one address, create linked list of addrinfo's. */
--- /home/cvs/gsasl/gl/getaddrinfo.h 2004/11/19 02:21:33 1.3
+++ /home/cvs/gsasl/gl/getaddrinfo.h 2005/06/15 10:33:56 1.4
@@ -1,5 +1,5 @@
/* Get address information.
- Copyright (C) 1996-2002, 2003, 2004 Free Software Foundation, Inc.
+ Copyright (C) 1996-2002, 2003, 2004, 2005 Free Software Foundation, Inc.
Contributed by Simon Josefsson <address@hidden>.
This program is free software; you can redistribute it and/or modify
@@ -14,20 +14,19 @@
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software Foundation,
- Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
+ Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */
#ifndef GETADDRINFO_H
# define GETADDRINFO_H
-/* Get getaddrinfo declarations, if available. */
+/* Get getaddrinfo declarations, if available. Also get 'socklen_t',
+ and 'struct sockaddr' via sys/types.h which are used below. */
+# include <sys/types.h>
# include <sys/socket.h>
# include <netdb.h>
# if defined HAVE_GETADDRINFO && !HAVE_GETADDRINFO
-/* Get socklen_t, struct sockaddr. */
-# include <sys/types.h>
-
/* Structure to contain information about address of a service provider. */
struct addrinfo
{
--- /home/cvs/gsasl/gl/getline.c 2004/08/07 21:59:41 1.3
+++ /home/cvs/gsasl/gl/getline.c 2005/06/15 10:33:56 1.4
@@ -15,7 +15,7 @@
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software Foundation,
- Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
+ Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */
/* Written by Jan Brittenson, address@hidden */
--- /home/cvs/gsasl/gl/getline.h 2004/08/07 21:59:41 1.3
+++ /home/cvs/gsasl/gl/getline.h 2005/06/15 10:33:56 1.4
@@ -15,7 +15,7 @@
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
-Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
+Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
#ifndef GETLINE_H_
# define GETLINE_H_ 1
--- /home/cvs/gsasl/gl/getndelim2.c 2004/10/15 22:40:00 1.4
+++ /home/cvs/gsasl/gl/getndelim2.c 2005/06/15 10:33:56 1.5
@@ -16,7 +16,7 @@
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software Foundation,
- Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
+ Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */
/* Originally written by Jan Brittenson, address@hidden */
--- /home/cvs/gsasl/gl/getndelim2.h 2004/08/07 21:59:41 1.3
+++ /home/cvs/gsasl/gl/getndelim2.h 2005/06/15 10:33:56 1.4
@@ -15,7 +15,7 @@
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software Foundation,
- Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
+ Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */
#ifndef GETNDELIM2_H
#define GETNDELIM2_H 1
--- /home/cvs/gsasl/gl/getopt.c 2004/11/19 02:21:33 1.8
+++ /home/cvs/gsasl/gl/getopt.c 2005/06/15 10:33:56 1.9
@@ -18,7 +18,7 @@
You should have received a copy of the GNU General Public License along
with this program; if not, write to the Free Software Foundation,
- Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
+ Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */
/* This tells Alpha OSF/1 not to define a getopt prototype in <stdio.h>.
Ditto for AIX 3.2 and <stdlib.h>. */
--- /home/cvs/gsasl/gl/getopt1.c 2004/11/19 02:21:33 1.8
+++ /home/cvs/gsasl/gl/getopt1.c 2005/06/15 10:33:56 1.9
@@ -15,7 +15,7 @@
You should have received a copy of the GNU General Public License along
with this program; if not, write to the Free Software Foundation,
- Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
+ Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */
#ifdef HAVE_CONFIG_H
#include <config.h>
--- /home/cvs/gsasl/gl/getopt_.h 2004/11/28 06:04:24 1.4
+++ /home/cvs/gsasl/gl/getopt_.h 2005/06/15 10:33:56 1.5
@@ -15,7 +15,7 @@
You should have received a copy of the GNU General Public License along
with this program; if not, write to the Free Software Foundation,
- Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
+ Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */
#ifndef _GETOPT_H
--- /home/cvs/gsasl/gl/getopt_int.h 2004/11/19 02:21:33 1.2
+++ /home/cvs/gsasl/gl/getopt_int.h 2005/06/15 10:33:56 1.3
@@ -15,7 +15,7 @@
You should have received a copy of the GNU General Public License along
with this program; if not, write to the Free Software Foundation,
- Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
+ Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */
#ifndef _GETOPT_INT_H
#define _GETOPT_INT_H 1
--- /home/cvs/gsasl/gl/getpass.c 2004/11/03 14:08:22 1.4
+++ /home/cvs/gsasl/gl/getpass.c 2005/06/15 10:33:56 1.5
@@ -13,7 +13,7 @@
You should have received a copy of the GNU General Public License along
with this program; if not, write to the Free Software Foundation,
- Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
+ Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */
#if HAVE_CONFIG_H
# include <config.h>
--- /home/cvs/gsasl/gl/getpass.h 2004/08/10 08:32:16 1.2
+++ /home/cvs/gsasl/gl/getpass.h 2005/06/15 10:33:56 1.3
@@ -14,18 +14,18 @@
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software Foundation,
- Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
+ Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */
#ifndef GETPASS_H
-#define GETPASS_H
+# define GETPASS_H
/* Get getpass declaration, if available. */
-#include <unistd.h>
+# include <unistd.h>
-#if defined HAVE_DECL_GETPASS && !HAVE_DECL_GETPASS
+# if defined HAVE_DECL_GETPASS && !HAVE_DECL_GETPASS
/* Read a password of arbitrary length from /dev/tty or stdin. */
char *getpass (const char *prompt);
-#endif
+# endif
#endif /* GETPASS_H */
--- /home/cvs/gsasl/gl/gettext.h 2004/01/18 07:28:32 1.4
+++ /home/cvs/gsasl/gl/gettext.h 2005/06/15 10:33:56 1.5
@@ -1,5 +1,5 @@
/* Convenience header for conditional use of GNU <libintl.h>.
- Copyright (C) 1995-1998, 2000-2002 Free Software Foundation, Inc.
+ Copyright (C) 1995-1998, 2000-2002, 2004 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -13,7 +13,7 @@
You should have received a copy of the GNU General Public License along
with this program; if not, write to the Free Software Foundation,
- Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
+ Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */
#ifndef _LIBGETTEXT_H
#define _LIBGETTEXT_H 1
@@ -36,6 +36,16 @@
# include <locale.h>
#endif
+/* Many header files from the libstdc++ coming with g++ 3.3 or newer include
+ <libintl.h>, which chokes if dcgettext is defined as a macro. So include
+ it now, to make later inclusions of <libintl.h> a NOP. */
+#if defined(__cplusplus) && defined(__GNUG__) && (__GNUC__ >= 3)
+# include <cstdlib>
+# if (__GLIBC__ >= 2) || _GLIBCXX_HAVE_LIBINTL_H
+# include <libintl.h>
+# endif
+#endif
+
/* Disabled NLS.
The casts to 'const char *' serve the purpose of producing warnings
for invalid uses of the value returned from these functions.
--- /home/cvs/gsasl/gl/iconvme.c 2005/01/01 16:06:14 1.8
+++ /home/cvs/gsasl/gl/iconvme.c 2005/06/15 10:33:56 1.9
@@ -1,10 +1,10 @@
/* Recode strings between character sets, using iconv.
- Copyright (C) 2002, 2003, 2004 Free Software Foundation, Inc.
+ Copyright (C) 2002, 2003, 2004, 2005 Free Software Foundation, Inc.
- This program is free software; you can redistribute it and/or
- modify it under the terms of the GNU General Public License as
- published by the Free Software Foundation; either version 2, or (at
- your option) any later version.
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2, or (at your option)
+ any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
@@ -13,7 +13,7 @@
You should have received a copy of the GNU General Public License along
with this program; if not, write to the Free Software Foundation,
- Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
+ Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */
#ifdef HAVE_CONFIG_H
# include <config.h>
@@ -31,15 +31,23 @@
/* Get errno. */
#include <errno.h>
+#ifdef _LIBC
+# define HAVE_ICONV 1
+#else
+/* Get strdup. */
+# include "strdup.h"
+#endif
+
#if HAVE_ICONV
/* Get iconv etc. */
# include <iconv.h>
-/* Get MB_LEN_MAX. */
+/* Get MB_LEN_MAX, CHAR_BIT. */
# include <limits.h>
#endif
-/* Get strdup. */
-#include "strdup.h"
+#ifndef SIZE_MAX
+# define SIZE_MAX ((size_t) -1)
+#endif
/* Convert a zero-terminated string STR from the FROM_CODSET code set
to the TO_CODESET code set. The returned string is allocated using
@@ -59,10 +67,18 @@
char *p = (char *) str;
size_t inbytes_remaining = strlen (p);
/* Guess the maximum length the output string can have. */
- size_t outbuf_size = (inbytes_remaining + 1) * MB_LEN_MAX;
- size_t outbytes_remaining = outbuf_size - 1; /* -1 for NUL */
+ size_t outbuf_size = inbytes_remaining + 1;
+ size_t outbytes_remaining;
size_t err;
int have_error = 0;
+
+ /* Use a worst-case output size guess, so long as that wouldn't be
+ too large for comfort. It's OK if the guess is wrong so long as
+ it's nonzero. */
+ size_t approx_sqrt_SIZE_MAX = SIZE_MAX >> (sizeof (size_t) * CHAR_BIT / 2);
+ if (outbuf_size <= approx_sqrt_SIZE_MAX / MB_LEN_MAX)
+ outbuf_size *= MB_LEN_MAX;
+ outbytes_remaining = outbuf_size - 1;
#endif
if (strcmp (to_codeset, from_codeset) == 0)
@@ -70,10 +86,10 @@
#if HAVE_ICONV
cd = iconv_open (to_codeset, from_codeset);
- if (cd == (iconv_t) - 1)
+ if (cd == (iconv_t) -1)
return NULL;
- outp = dest = malloc (outbuf_size);
+ outp = dest = (char *) malloc (outbuf_size);
if (dest == NULL)
goto out;
@@ -100,7 +116,8 @@
have_error = 1;
goto out;
}
- if (!(newdest = realloc (dest, newsize)))
+ newdest = (char *) realloc (dest, newsize);
+ if (newdest == NULL)
{
have_error = 1;
goto out;
--- /home/cvs/gsasl/gl/iconvme.h 2004/12/15 00:17:55 1.3
+++ /home/cvs/gsasl/gl/iconvme.h 2005/06/15 10:33:56 1.4
@@ -12,9 +12,9 @@
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
- You should have received a copy of the GNU General Public License along
- with this program; if not, write to the Free Software Foundation,
- Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software Foundation,
+ Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */
#ifndef ICONVME_H
# define ICONVME_H
--- /home/cvs/gsasl/gl/progname.c 2005/02/08 11:35:19 1.4
+++ /home/cvs/gsasl/gl/progname.c 2005/06/15 10:33:56 1.5
@@ -14,7 +14,7 @@
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software Foundation,
- Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
+ Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */
#ifdef HAVE_CONFIG_H
--- /home/cvs/gsasl/gl/progname.h 2004/11/19 02:21:33 1.5
+++ /home/cvs/gsasl/gl/progname.h 2005/06/15 10:33:56 1.6
@@ -14,7 +14,7 @@
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software Foundation,
- Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
+ Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */
#ifndef _PROGNAME_H
#define _PROGNAME_H
--- /home/cvs/gsasl/gl/stdbool_.h 2004/08/07 21:59:41 1.5
+++ /home/cvs/gsasl/gl/stdbool_.h 2005/06/15 10:33:56 1.6
@@ -13,7 +13,7 @@
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software Foundation,
- Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
+ Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */
#ifndef _STDBOOL_H
#define _STDBOOL_H
--- /home/cvs/gsasl/gl/strdup.c 2004/08/07 15:03:01 1.7
+++ /home/cvs/gsasl/gl/strdup.c 2005/06/15 10:33:56 1.8
@@ -15,7 +15,7 @@
You should have received a copy of the GNU General Public License along
with this program; if not, write to the Free Software Foundation,
- Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
+ Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */
#ifdef HAVE_CONFIG_H
# include <config.h>
--- /home/cvs/gsasl/gl/strdup.h 2004/08/03 21:50:39 1.6
+++ /home/cvs/gsasl/gl/strdup.h 2005/06/15 10:33:56 1.7
@@ -13,7 +13,7 @@
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software Foundation,
- Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
+ Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */
#ifndef STRDUP_H_
#define STRDUP_H_
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- CVS gsasl/gl,
gsasl-commit <=