* [PATCH] Compile fixes
@ 2008-10-17 10:44 Jakub Jelinek
0 siblings, 0 replies; only message in thread
From: Jakub Jelinek @ 2008-10-17 10:44 UTC (permalink / raw)
To: Ulrich Drepper; +Cc: Glibc hackers
Hi!
ATM glibc doesn't build on x86_64-linux, here are the fixes I had to do
to make things compile. The mpn stuff is caused by the updates
to longlong.h, "=r" ((long) dummy) for int dummy is invalid on 64-bit
arches, as it is not an lvalue. Eventhough have_paccept is defined to -1,
the code fails to compile: paccept isn't prototyped and it dies with:
connections.c:1827: warning: implicit declaration of function âÂÂpacceptâÂÂ
connections.c:1831: error: lvalue required as left operand of assignment
(obviously have_paccept = something which is -1 = something doesn't
compile).
Ok to commit?
2008-10-17 Jakub Jelinek <jakub@redhat.com>
* stdlib/divmod_1.c (mpn_divmod_1): Change dummy's type to
mp_limb_t.
* stdlib/mod_1.c (mpn_mod_1): Likewise.
* nscd/connections.c (have_paccept): Remove.
(main_loop_poll): Remove paccept code.
--- libc/stdlib/divmod_1.c.jj 2008-10-17 10:40:04.000000000 +0200
+++ libc/stdlib/divmod_1.c 2008-10-17 11:04:16.000000000 +0200
@@ -6,7 +6,7 @@
QUOT_PTR and DIVIDEND_PTR might point to the same limb.
-Copyright (C) 1991, 1993, 1994, 1996 Free Software Foundation, Inc.
+Copyright (C) 1991, 1993, 1994, 1996, 2008 Free Software Foundation, Inc.
This file is part of the GNU MP Library.
@@ -55,7 +55,7 @@ mpn_divmod_1 (quot_ptr, dividend_ptr, di
{
mp_size_t i;
mp_limb_t n1, n0, r;
- int dummy;
+ mp_limb_t dummy;
/* ??? Should this be handled at all? Rely on callers? */
if (dividend_size == 0)
--- libc/stdlib/mod_1.c.jj 2005-12-14 10:45:09.000000000 +0100
+++ libc/stdlib/mod_1.c 2008-10-17 11:04:04.000000000 +0200
@@ -3,7 +3,7 @@
Return the single-limb remainder.
There are no constraints on the value of the divisor.
-Copyright (C) 1991, 1993, 1994, Free Software Foundation, Inc.
+Copyright (C) 1991, 1993, 1994, 2008 Free Software Foundation, Inc.
This file is part of the GNU MP Library.
@@ -50,7 +50,7 @@ mpn_mod_1 (dividend_ptr, dividend_size,
{
mp_size_t i;
mp_limb_t n1, n0, r;
- int dummy;
+ mp_limb_t dummy;
/* Botch: Should this be handled at all? Rely on callers? */
if (dividend_size == 0)
--- libc/nscd/connections.c.jj 2008-10-11 10:43:36.000000000 +0200
+++ libc/nscd/connections.c 2008-10-17 11:26:55.000000000 +0200
@@ -238,8 +238,6 @@ static int resolv_conf_descr = -1;
/* Negative if SOCK_CLOEXEC is not supported, positive if it is, zero
before be know the result. */
static int have_sock_cloexec;
-/* The paccept syscall was introduced at the same time as SOCK_CLOEXEC. */
-# define have_paccept -1 // XXX For the time being there is no such call
#endif
/* Number of times clients had to wait. */
@@ -1817,24 +1815,7 @@ main_loop_poll (void)
if (conns[0].revents != 0)
{
/* We have a new incoming connection. Accept the connection. */
- int fd;
-
-#ifndef __ASSUME_PACCEPT
- fd = -1;
- if (have_paccept >= 0)
-#endif
- {
- fd = TEMP_FAILURE_RETRY (paccept (sock, NULL, NULL, NULL,
- SOCK_NONBLOCK));
-#ifndef __ASSUME_PACCEPT
- if (have_paccept == 0)
- have_paccept = fd != -1 || errno != ENOSYS ? 1 : -1;
-#endif
- }
-#ifndef __ASSUME_PACCEPT
- if (have_paccept < 0)
- fd = TEMP_FAILURE_RETRY (accept (sock, NULL, NULL));
-#endif
+ int fd = TEMP_FAILURE_RETRY (accept (sock, NULL, NULL));
/* Use the descriptor if we have not reached the limit. */
if (fd >= 0)
Jakub
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2008-10-17 10:44 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-10-17 10:44 [PATCH] Compile fixes Jakub Jelinek
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).