From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 23901 invoked by alias); 17 Oct 2008 10:44:34 -0000 Received: (qmail 23882 invoked by uid 22791); 17 Oct 2008 10:44:33 -0000 X-Spam-Check-By: sourceware.org Received: from sunsite.ms.mff.cuni.cz (HELO sunsite.mff.cuni.cz) (195.113.15.26) by sourceware.org (qpsmtpd/0.31) with ESMTP; Fri, 17 Oct 2008 10:43:58 +0000 Received: from sunsite.mff.cuni.cz (localhost.localdomain [127.0.0.1]) by sunsite.mff.cuni.cz (8.13.8/8.13.8) with ESMTP id m9HAlWnH018920; Fri, 17 Oct 2008 12:47:32 +0200 Received: (from jakub@localhost) by sunsite.mff.cuni.cz (8.13.8/8.13.8/Submit) id m9HAlW4a018917; Fri, 17 Oct 2008 12:47:32 +0200 Date: Fri, 17 Oct 2008 10:44:00 -0000 From: Jakub Jelinek To: Ulrich Drepper Cc: Glibc hackers Subject: [PATCH] Compile fixes Message-ID: <20081017104731.GD32107@sunsite.ms.mff.cuni.cz> Reply-To: Jakub Jelinek Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit User-Agent: Mutt/1.4.2.2i Mailing-List: contact libc-hacker-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: libc-hacker-owner@sourceware.org X-SW-Source: 2008-10/txt/msg00002.txt.bz2 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 * 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