public inbox for libc-hacker@sourceware.org
 help / color / mirror / Atom feed
From: Jakub Jelinek <jakub@redhat.com>
To: Ulrich Drepper <drepper@redhat.com>
Cc: Glibc hackers <libc-hacker@sources.redhat.com>
Subject: [PATCH] Compile fixes
Date: Fri, 17 Oct 2008 10:44:00 -0000	[thread overview]
Message-ID: <20081017104731.GD32107@sunsite.ms.mff.cuni.cz> (raw)

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

                 reply	other threads:[~2008-10-17 10:44 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20081017104731.GD32107@sunsite.ms.mff.cuni.cz \
    --to=jakub@redhat.com \
    --cc=drepper@redhat.com \
    --cc=libc-hacker@sources.redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).