From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 12589 invoked by alias); 21 Jan 2006 10:57:17 -0000 Received: (qmail 12573 invoked by uid 22791); 21 Jan 2006 10:57:17 -0000 X-Spam-Check-By: sourceware.org Received: from mx1.suse.de (HELO mx1.suse.de) (195.135.220.2) by sourceware.org (qpsmtpd/0.31) with ESMTP; Sat, 21 Jan 2006 10:57:14 +0000 Received: from Relay1.suse.de (mail2.suse.de [195.135.221.8]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.suse.de (Postfix) with ESMTP id 31D66E87E for ; Sat, 21 Jan 2006 11:57:07 +0100 (CET) Received: from aj by arthur.inka.de with local (Exim 4.51) id 1F0GQb-0003OQ-9Z for libc-hacker@sources.redhat.com; Sat, 21 Jan 2006 11:57:05 +0100 From: Andreas Jaeger To: Glibc hackers Subject: Fix misc/tst-pselect.c User-Agent: Gnus/5.110004 (No Gnus v0.4) Emacs/21.3 (gnu/linux) OpenPGP: id=C272A126; url=http://www.suse.de/~aj/keys.txt Date: Sat, 21 Jan 2006 10:57:00 -0000 Message-ID: MIME-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha1; protocol="application/pgp-signature" Mailing-List: contact libc-hacker-help@sourceware.org; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: libc-hacker-owner@sourceware.org X-SW-Source: 2006-01/txt/msg00090.txt.bz2 --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Content-length: 2408 The testcase fails to build with: tst-pselect.c: In function =E2=80=98do_test=E2=80=99: tst-pselect.c:31: warning: =E2=80=98sigblock=E2=80=99 is deprecated (declar= ed at ../signal/signal.h:181) tst-pselect.c:39: warning: implicit declaration of function =E2=80=98pipe= =E2=80=99 tst-pselect.c:54: warning: implicit declaration of function =E2=80=98fork= =E2=80=99 tst-pselect.c:57: warning: implicit declaration of function =E2=80=98close= =E2=80=99 tst-pselect.c:81: warning: implicit declaration of function =E2=80=98TEMP_F= AILURE_RETRY=E2=80=99 tst-pselect.c:81: warning: implicit declaration of function =E2=80=98write= =E2=80=99 In file included from ../include/unistd.h:2, from ../test-skeleton.c:29, from tst-pselect.c:120: ../posix/unistd.h: At top level: ../posix/unistd.h:331: error: conflicting types for =E2=80=98write=E2=80=99 tst-pselect.c:81: error: previous implicit declaration of =E2=80=98write=E2= =80=99 was here make[2]: *** [/builds/glibc/10.0-nptl/misc/tst-pselect.o] Error 1 Here's a fix which also avoids using sigblock.=20=20 Ok to commit? Andreas 2006-01-21 Andreas Jaeger * misc/tst-pselect.c: Include for prototypes. (do_test): Use sigprocmask instead of sigblock. =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D Index: misc/tst-pselect.c --- misc/tst-pselect.c 21 Jan 2006 08:16:28 -0000 1.1 +++ misc/tst-pselect.c 21 Jan 2006 10:56:22 -0000 @@ -3,6 +3,7 @@ #include #include #include +#include =20 =20 static volatile int handler_called; @@ -21,6 +22,7 @@ do_test (void) sa.sa_handler =3D handler; sa.sa_flags =3D 0; sigemptyset (&sa.sa_mask); + sigset_t signalset; =20 if (sigaction (SIGUSR1, &sa, NULL) !=3D 0) { @@ -28,7 +30,10 @@ do_test (void) return 1; } =20 - if (sigblock (SIGUSR1) !=3D 0) + sigemptyset (&signalset); + sigaddset (&signalset, SIGUSR1); + + if (sigprocmask (SIG_BLOCK, &signalset, NULL) !=3D 0) { puts ("sigblock failed"); return 1; --=20 Andreas Jaeger, aj@suse.de, http://www.suse.de/~aj/ SUSE Linux Products GmbH, Maxfeldstr. 5, 90409 N=C3=BCrnberg, Germany GPG fingerprint =3D 93A3 365E CE47 B889 DF7F FED1 389A 563C C272 A126 --=-=-= Content-Type: application/pgp-signature Content-length: 188 -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.2 (GNU/Linux) iD8DBQBD0hOBOJpWPMJyoSYRAmMCAJ9ULjV13jeh0+AZ4N0A8kQKaPbClgCdEjqS sDm14uJoD7XPWQKLqliLuEg= =RhrH -----END PGP SIGNATURE----- --=-=-=--