From 754f65763937c4ebb03dc8a2f4d6eb6f7bd67be2 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Wed, 4 Apr 2001 06:16:40 +0000 Subject: Update. 2001-04-03 Ulrich Drepper * resolv/netdb.h (gai_strerror): Make return value const. * sysdeps/generic/gai_strerror.c (gai_strerror): Likewise. * sysdeps/posix/gai_strerror.c (gai_strerror): Likewise. Add strings for new error values. --- sysdeps/posix/gai_strerror.c | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) (limited to 'sysdeps/posix') diff --git a/sysdeps/posix/gai_strerror.c b/sysdeps/posix/gai_strerror.c index 490cd5bc57..b4381eb373 100644 --- a/sysdeps/posix/gai_strerror.c +++ b/sysdeps/posix/gai_strerror.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1997 Free Software Foundation, Inc. +/* Copyright (C) 1997, 2001 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Philip Blundell , 1997. @@ -38,16 +38,21 @@ values[] = { EAI_NONAME, N_("Name or service not known") }, { EAI_SERVICE, N_("Servname not supported for ai_socktype") }, { EAI_SOCKTYPE, N_("ai_socktype not supported") }, - { EAI_SYSTEM, N_("System error") } + { EAI_SYSTEM, N_("System error") }, + { EAI_INPROGRESS, N_("Processing request in progress") }, + { EAI_CANCELED, N_("Request canceled") }, + { EAI_NOTCANCELED, N_("Request not canceled") }, + { EAI_ALLDONE, N_("All requests done") }, + { EAI_INTR, N_("Interrupted by a signal") } }; -char * +const char * gai_strerror (int code) { size_t i; for (i = 0; i < sizeof (values) / sizeof (values[0]); ++i) if (values[i].code == code) - return (char *) values[i].msg; + return _(values[i].msg); - return (char *) _("Unknown error"); + return _("Unknown error"); } -- cgit 1.4.1