From: Jakub Jelinek <jakub@redhat.com>
To: Ulrich Drepper <drepper@redhat.com>
Cc: Glibc hackers <libc-hacker@sources.redhat.com>
Subject: [PATCH] Misc fixes
Date: Wed, 06 Oct 2004 11:41:00 -0000 [thread overview]
Message-ID: <20041006114054.GK30497@sunsite.ms.mff.cuni.cz> (raw)
Hi!
Most of the changes don't probably need comments, they are there just
to shut up warnings or fix tst-clock2 failing on i386.
The __nwaiters change makes x86-64 look like the rest of arches,
consistency is good and the type really should be unsigned.
The allocatestack.c change is to make GCC 4 and 3.4.2-RH happy,
otherwise I get:
allocatestack.c:778: warning: `visibility' attribute ignored on non-class types
You know the GCC PR for this already...
2004-10-06 Jakub Jelinek <jakub@redhat.com>
* posix/tst-getaddrinfo2.c: Include stdlib.h and string.h.
(do_test): Use %p instead of 0x%08X to print a pointer.
* malloc/malloc.c: Include stdio-common/_itoa.h.
nptl/
* sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h (pthread_cond_t):
Change __data.__nwaiters from int to unsigned int.
* tst-clock2.c (do_test): Don't fail if _POSIX_THREAD_CPUTIME == 0 and
sysconf (_SC_THREAD_CPUTIME) returns negative value.
* allocatestack.c (__find_thread_by_id): Move attribute_hidden
before return type.
--- libc/posix/tst-getaddrinfo2.c.jj 2004-09-26 10:42:15.000000000 +0200
+++ libc/posix/tst-getaddrinfo2.c 2004-10-06 13:03:39.000000000 +0200
@@ -2,6 +2,8 @@
#include <errno.h>
#include <netdb.h>
#include <unistd.h>
+#include <stdlib.h>
+#include <string.h>
#include <sys/socket.h>
static int
@@ -47,7 +49,7 @@ do_test (void)
if (err)
{
printf ("FAIL getaddrinfo IPv4 socktype 0,513: "
- "fam %d alen %d addr 0x%08X addr/fam %d "
+ "fam %d alen %d addr %p addr/fam %d "
"addr/port %d H[%d]\n",
pai->ai_family, pai->ai_addrlen, psin,
psin ? psin->sin_family : 0,
--- libc/malloc/malloc.c.jj 2004-10-05 09:04:44.000000000 +0200
+++ libc/malloc/malloc.c 2004-10-06 12:59:31.000000000 +0200
@@ -257,6 +257,10 @@
#include <malloc-machine.h>
+#ifdef _LIBC
+#include <stdio-common/_itoa.h>
+#endif
+
#ifdef __cplusplus
extern "C" {
#endif
--- libc/nptl/sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h.jj 2004-09-30 00:50:04.000000000 +0200
+++ libc/nptl/sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h 2004-10-06 12:55:33.312919606 +0200
@@ -100,7 +100,7 @@ typedef union
__extension__ unsigned long long int __wakeup_seq;
__extension__ unsigned long long int __woken_seq;
void *__mutex;
- int __nwaiters;
+ unsigned int __nwaiters;
unsigned int __broadcast_seq;
} __data;
char __size[__SIZEOF_PTHREAD_COND_T];
--- libc/nptl/tst-clock2.c.jj 2004-10-06 11:04:06.000000000 +0200
+++ libc/nptl/tst-clock2.c 2004-10-06 13:21:51.000000000 +0200
@@ -58,6 +58,14 @@ do_test (void)
#if defined _POSIX_THREAD_CPUTIME && _POSIX_THREAD_CPUTIME >= 0
# define N 10
+# if _POSIX_THREAD_CPUTIME == 0
+ if (sysconf (_SC_THREAD_CPUTIME) < 0)
+ {
+ puts ("_POSIX_THREAD_CPUTIME option not available");
+ return 0;
+ }
+# endif
+
if (pthread_barrier_init (&b2, NULL, 2) != 0
|| pthread_barrier_init (&bN, NULL, N + 1) != 0)
{
--- libc/nptl/allocatestack.c.jj 2004-10-06 13:17:51.000000000 +0200
+++ libc/nptl/allocatestack.c 2004-10-06 13:17:51.000000000 +0200
@@ -772,8 +772,8 @@ __reclaim_stacks (void)
#if HP_TIMING_AVAIL
/* Find a thread given the thread ID. */
-struct pthread *
attribute_hidden
+struct pthread *
__find_thread_by_id (pid_t tid)
{
struct pthread *result = NULL;
Jakub
next reply other threads:[~2004-10-06 11:41 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-10-06 11:41 Jakub Jelinek [this message]
-- strict thread matches above, loose matches on Subject: below --
2009-03-10 13:42 Jakub Jelinek
2003-07-12 14:19 Jakub Jelinek
2003-07-12 18:49 ` Ulrich Drepper
2002-12-16 10:56 Jakub Jelinek
2002-12-16 11:33 ` Ulrich Drepper
1999-12-28 7:14 Jakub Jelinek
1999-12-28 8:29 ` Ulrich Drepper
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=20041006114054.GK30497@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).