From patchwork Thu Sep 17 21:24:28 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "H.J. Lu" X-Patchwork-Id: 8758 Received: (qmail 64555 invoked by alias); 17 Sep 2015 21:24:32 -0000 Mailing-List: contact libc-alpha-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: libc-alpha-owner@sourceware.org Delivered-To: mailing list libc-alpha@sourceware.org Received: (qmail 63610 invoked by uid 89); 17 Sep 2015 21:24:32 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-0.1 required=5.0 tests=AWL, BAYES_50, FREEMAIL_FROM, RCVD_IN_DNSWL_LOW, SPF_PASS autolearn=ham version=3.3.2 X-HELO: mail-ob0-f169.google.com MIME-Version: 1.0 X-Received: by 10.60.45.104 with SMTP id l8mr1300819oem.61.1442525068995; Thu, 17 Sep 2015 14:24:28 -0700 (PDT) In-Reply-To: <20150917195803.E05DF2C3B40@topped-with-meat.com> References: <20150917152135.GA25716@intel.com> <20150917195803.E05DF2C3B40@topped-with-meat.com> Date: Thu, 17 Sep 2015 14:24:28 -0700 Message-ID: Subject: Re: [PATCH] [BZ #18970]: Reference of pthread_setcancelstate in libc.a From: "H.J. Lu" To: Roland McGrath Cc: GNU C Library On Thu, Sep 17, 2015 at 12:58 PM, Roland McGrath wrote: > If this matters it should break some linknamespace test. If there is no > reference from anything involved in the ISO C implementation, then there is > no actual problem. > > For example, wordexp is a POSIX.1 function, so it referring directly to the > public names of other POSIX.1 functions is not a problem. > > A change like this is not necessarily worthless even if it is not > necessary. But you haven't said why you think the change is desireable. > If it makes is easier to understand or maintain the code overall, then that > could be sufficient reason. But you have to make some sort of positive > case for a change. Is this a valid test? diff --git a/stdlib/Makefile b/stdlib/Makefile index 402466a..c99ad73 100644 --- a/stdlib/Makefile +++ b/stdlib/Makefile @@ -74,8 +74,8 @@ tests := tst-strtol tst-strtod testmb testrand testsort testdiv \ tst-makecontext3 bug-getcontext bug-fmtmsg1 \ tst-secure-getenv tst-strtod-overflow tst-strtod-round \ tst-tininess tst-strtod-underflow tst-tls-atexit \ - tst-setcontext3 tst-tls-atexit-nodelete -tests-static := tst-secure-getenv + tst-setcontext3 tst-tls-atexit-nodelete tst-fmtmsg-static +tests-static := tst-secure-getenv tst-fmtmsg-static modules-names = tst-tls-atexit-lib diff --git a/stdlib/tst-fmtmsg-static.c b/stdlib/tst-fmtmsg-static.c new file mode 100644 index 0000000..60e6642 --- /dev/null +++ b/stdlib/tst-fmtmsg-static.c @@ -0,0 +1 @@ +#include "tst-fmtmsg.c" diff --git a/stdlib/tst-fmtmsg.c b/stdlib/tst-fmtmsg.c index b7948c5..de8d16a 100644 --- a/stdlib/tst-fmtmsg.c +++ b/stdlib/tst-fmtmsg.c @@ -81,5 +81,11 @@ do_test (void) return result; } +int +pthread_setcancelstate (int *p) +{ + return p[0]; +} + #define TEST_FUNCTION do_test () #include "../test-skeleton.c"