aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJakub Jelinek <jakub@redhat.com>2008-07-03 12:21:19 +0000
committerJakub Jelinek <jakub@redhat.com>2008-07-03 12:21:19 +0000
commit1cb6b555a864f401c8a2ba75814e982b66a62971 (patch)
tree506eb1640092c658b5e31474916d143d7be0200e /sysdeps
parentUpdated to fedora-glibc-20080613T1601 (diff)
downloadglibc-1cb6b555a864f401c8a2ba75814e982b66a62971.tar.gz
glibc-1cb6b555a864f401c8a2ba75814e982b66a62971.tar.bz2
glibc-1cb6b555a864f401c8a2ba75814e982b66a62971.zip
Updated to fedora-glibc-20080703T1203cvs/fedora-glibc-2_8_90-8
Diffstat (limited to 'sysdeps')
-rw-r--r--sysdeps/mach/hurd/dl-sysdep.c1
-rw-r--r--sysdeps/mach/hurd/recv.c4
-rw-r--r--sysdeps/mach/hurd/recvfrom.c6
-rw-r--r--sysdeps/mach/hurd/recvmsg.c6
-rw-r--r--sysdeps/mach/hurd/send.c2
-rw-r--r--sysdeps/mach/hurd/sendmsg.c2
-rw-r--r--sysdeps/mach/hurd/sendto.c2
-rw-r--r--sysdeps/posix/getaddrinfo.c30
-rw-r--r--sysdeps/unix/bsd/bsd4.4/bits/socket.h4
9 files changed, 24 insertions, 33 deletions
diff --git a/sysdeps/mach/hurd/dl-sysdep.c b/sysdeps/mach/hurd/dl-sysdep.c
index 668aaaf8b5..2440682903 100644
--- a/sysdeps/mach/hurd/dl-sysdep.c
+++ b/sysdeps/mach/hurd/dl-sysdep.c
@@ -367,6 +367,7 @@ __libc_read (int fd, void *buf, size_t nbytes)
mach_msg_type_number_t nread;
data = buf;
+ nread = nbytes;
err = __io_read ((mach_port_t) fd, &data, &nread, -1, nbytes);
if (err)
return __hurd_fail (err);
diff --git a/sysdeps/mach/hurd/recv.c b/sysdeps/mach/hurd/recv.c
index b001729d18..0cf6b7ce58 100644
--- a/sysdeps/mach/hurd/recv.c
+++ b/sysdeps/mach/hurd/recv.c
@@ -38,7 +38,7 @@ __recv (fd, buf, n, flags)
char *bufp = buf;
mach_msg_type_number_t nread = n;
mach_port_t *ports;
- mach_msg_type_number_t nports;
+ mach_msg_type_number_t nports = 0;
char *cdata = NULL;
mach_msg_type_number_t clen = 0;
@@ -48,7 +48,7 @@ __recv (fd, buf, n, flags)
&cdata, &clen,
&flags,
n)))
- return __hurd_dfail (fd, err);
+ return __hurd_sockfail (fd, flags, err);
__mach_port_deallocate (__mach_task_self (), addrport);
__vm_deallocate (__mach_task_self (), (vm_address_t) cdata, clen);
diff --git a/sysdeps/mach/hurd/recvfrom.c b/sysdeps/mach/hurd/recvfrom.c
index d5c73f4441..2aca5709df 100644
--- a/sysdeps/mach/hurd/recvfrom.c
+++ b/sysdeps/mach/hurd/recvfrom.c
@@ -41,7 +41,7 @@ __recvfrom (fd, buf, n, flags, addrarg, addr_len)
char *bufp = buf;
mach_msg_type_number_t nread = n;
mach_port_t *ports;
- mach_msg_type_number_t nports;
+ mach_msg_type_number_t nports = 0;
char *cdata = NULL;
mach_msg_type_number_t clen = 0;
struct sockaddr *addr = addrarg.__sockaddr__;
@@ -52,7 +52,7 @@ __recvfrom (fd, buf, n, flags, addrarg, addr_len)
&cdata, &clen,
&flags,
n)))
- return __hurd_dfail (fd, err);
+ return __hurd_sockfail (fd, flags, err);
/* Get address data for the returned address port if requested. */
if (addr != NULL)
@@ -74,7 +74,7 @@ __recvfrom (fd, buf, n, flags, addrarg, addr_len)
if (err)
{
__mach_port_deallocate (__mach_task_self (), addrport);
- return __hurd_dfail (fd, err);
+ return __hurd_sockfail (fd, flags, err);
}
if (*addr_len > buflen)
diff --git a/sysdeps/mach/hurd/recvmsg.c b/sysdeps/mach/hurd/recvmsg.c
index c6874e8bd8..33897b8ce8 100644
--- a/sysdeps/mach/hurd/recvmsg.c
+++ b/sysdeps/mach/hurd/recvmsg.c
@@ -34,7 +34,7 @@ __libc_recvmsg (int fd, struct msghdr *message, int flags)
char *data = NULL;
mach_msg_type_number_t len = 0;
mach_port_t *ports;
- mach_msg_type_number_t nports;
+ mach_msg_type_number_t nports = 0;
char *cdata = NULL;
mach_msg_type_number_t clen = 0;
size_t amount;
@@ -63,7 +63,7 @@ __libc_recvmsg (int fd, struct msghdr *message, int flags)
&ports, &nports,
&cdata, &clen,
&message->msg_flags, amount)))
- return __hurd_dfail (fd, err);
+ return __hurd_sockfail (fd, flags, err);
if (message->msg_name != NULL)
{
@@ -84,7 +84,7 @@ __libc_recvmsg (int fd, struct msghdr *message, int flags)
if (err)
{
__mach_port_deallocate (__mach_task_self (), aport);
- return __hurd_dfail (fd, err);
+ return __hurd_sockfail (fd, flags, err);
}
if (message->msg_namelen > buflen)
diff --git a/sysdeps/mach/hurd/send.c b/sysdeps/mach/hurd/send.c
index 4810cd68c3..bb45c50696 100644
--- a/sysdeps/mach/hurd/send.c
+++ b/sysdeps/mach/hurd/send.c
@@ -38,7 +38,7 @@ __send (fd, buf, n, flags)
NULL, MACH_MSG_TYPE_COPY_SEND, 0,
NULL, 0, &wrote));
- return err ? __hurd_dfail (fd, err) : wrote;
+ return err ? __hurd_sockfail (fd, flags, err) : wrote;
}
libc_hidden_def (__send)
weak_alias (__send, send)
diff --git a/sysdeps/mach/hurd/sendmsg.c b/sysdeps/mach/hurd/sendmsg.c
index 5fdfd734ec..a9d1c8c1d4 100644
--- a/sysdeps/mach/hurd/sendmsg.c
+++ b/sysdeps/mach/hurd/sendmsg.c
@@ -149,7 +149,7 @@ __libc_sendmsg (int fd, const struct msghdr *message, int flags)
if (dealloc)
__vm_deallocate (__mach_task_self (), data.addr, len);
- return err ? __hurd_dfail (fd, err) : amount;
+ return err ? __hurd_sockfail (fd, flags, err) : amount;
}
weak_alias (__libc_sendmsg, sendmsg)
diff --git a/sysdeps/mach/hurd/sendto.c b/sysdeps/mach/hurd/sendto.c
index 0a6912a3b7..478a5c9a41 100644
--- a/sysdeps/mach/hurd/sendto.c
+++ b/sysdeps/mach/hurd/sendto.c
@@ -79,7 +79,7 @@ __sendto (int fd,
err;
}));
- return err ? __hurd_dfail (fd, err) : wrote;
+ return err ? __hurd_sockfail (fd, flags, err) : wrote;
}
weak_alias (__sendto, sendto)
diff --git a/sysdeps/posix/getaddrinfo.c b/sysdeps/posix/getaddrinfo.c
index 5c82b5274a..4987505c5e 100644
--- a/sysdeps/posix/getaddrinfo.c
+++ b/sysdeps/posix/getaddrinfo.c
@@ -684,6 +684,9 @@ gaih_inet (const char *name, const struct gaih_service *service,
"dns [!UNAVAIL=return] files",
&nip);
+ /* Initialize configurations. */
+ if (__builtin_expect (!_res_hconf.initialized, 0))
+ _res_hconf_init ();
if (__res_maybe_init (&_res, 0) == -1)
no_more = 1;
@@ -883,9 +886,6 @@ gaih_inet (const char *name, const struct gaih_service *service,
}
}
- if (pai == NULL)
- return 0;
-
{
struct gaih_servtuple *st2;
struct gaih_addrtuple *at2 = at;
@@ -2091,10 +2091,6 @@ getaddrinfo (const char *name, const char *service,
if ((hints->ai_flags & AI_CANONNAME) && name == NULL)
return EAI_BADFLAGS;
- /* Initialize configurations. */
- if (__builtin_expect (!_res_hconf.initialized, 0))
- _res_hconf_init ();
-
struct in6addrinfo *in6ai = NULL;
size_t in6ailen = 0;
bool seen_ipv4 = false;
@@ -2149,11 +2145,7 @@ getaddrinfo (const char *name, const char *service,
else
pservice = NULL;
- struct addrinfo **end;
- if (pai)
- end = &p;
- else
- end = NULL;
+ struct addrinfo **end = &p;
unsigned int naddrs = 0;
if (hints->ai_family == AF_UNSPEC || hints->ai_family == AF_INET
@@ -2167,12 +2159,11 @@ getaddrinfo (const char *name, const char *service,
return -(last_i & GAIH_EAI);
}
- if (end)
- while (*end)
- {
- end = &((*end)->ai_next);
- ++nresults;
- }
+ while (*end)
+ {
+ end = &((*end)->ai_next);
+ ++nresults;
+ }
}
else
{
@@ -2368,9 +2359,6 @@ getaddrinfo (const char *name, const char *service,
return 0;
}
- if (pai == NULL && last_i == 0)
- return 0;
-
return last_i ? -(last_i & GAIH_EAI) : EAI_NONAME;
}
libc_hidden_def (getaddrinfo)
diff --git a/sysdeps/unix/bsd/bsd4.4/bits/socket.h b/sysdeps/unix/bsd/bsd4.4/bits/socket.h
index 67db4d8469..2ccd01d011 100644
--- a/sysdeps/unix/bsd/bsd4.4/bits/socket.h
+++ b/sysdeps/unix/bsd/bsd4.4/bits/socket.h
@@ -171,8 +171,10 @@ enum
#define MSG_CTRUNC MSG_CTRUNC
MSG_WAITALL = 0x40, /* Wait for full request or error. */
#define MSG_WAITALL MSG_WAITALL
- MSG_DONTWAIT = 0x80 /* This message should be nonblocking. */
+ MSG_DONTWAIT = 0x80, /* This message should be nonblocking. */
#define MSG_DONTWAIT MSG_DONTWAIT
+ MSG_NOSIGNAL = 0x0400 /* Do not generate SIGPIPE on EPIPE. */
+#define MSG_NOSIGNAL MSG_NOSIGNAL
};