This is the mail archive of the libc-hacker@sources.redhat.com mailing list for the glibc project.

Note that libc-hacker is a closed list. You may look at the archives of this list, but subscription and posting are not open.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[PATCH] Fix linuxthreads after clock changes


Hi!

There were a few typos and a missing include in linuxthreads
getcpuclockid.c, fixed below.
In addition NPTL fails to build on fedora-branch, because it uses
libc/nptl/sysdeps/unix/sysv/linux/kernel-features.h that #include_next's
<kernel-features.h>, so CPP keeps including the same file recursively
until reaching limit.  This is not required for CVS, still, I think it
is a good habit to use <> when you really don't mean start header search
in the current directory for some reason.

2005-04-27  Jakub Jelinek  <jakub@redhat.com>

linuxthreads/
	* sysdeps/pthread/getcpuclockid.c: Include spinlock.h.
	Fix a typo in kernel-posix-cpy-timers.h include name, use <> instead
	of "" includes.
	(pthread_getcpuclockid): Fix 2 typos.
nptl/
	* sysdeps/unix/sysv/linux/pthread_getcpuclockid.c: Use <> instead
	of "" includes.

--- libc/linuxthreads/sysdeps/pthread/getcpuclockid.c	2005-04-27 13:04:55.000000000 +0200
+++ libc/linuxthreads/sysdeps/pthread/getcpuclockid.c	2005-04-27 15:16:42.000000000 +0200
@@ -1,5 +1,5 @@
 /* pthread_getcpuclockid -- Get POSIX clockid_t for a pthread_t.  Linux version
-   Copyright (C) 2000, 2001, 2004 Free Software Foundation, Inc.
+   Copyright (C) 2000, 2001, 2004, 2005 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
 
    The GNU C Library is free software; you can redistribute it and/or
@@ -22,8 +22,9 @@
 #include <sys/time.h>
 #include <time.h>
 #include <internals.h>
-#include "kernel-features.h"
-#include "posix-cpu-timers.h"
+#include <spinlock.h>
+#include <kernel-features.h>
+#include <kernel-posix-cpu-timers.h>
 
 
 #if !(__ASSUME_POSIX_CPU_TIMERS > 0)
@@ -58,12 +59,12 @@ pthread_getcpuclockid (pthread_t thread_
 # if !(__ASSUME_POSIX_CPU_TIMERS > 0)
 #  if !(__ASSUME_POSIX_TIMERS > 0)
   if (__libc_missing_posix_timers && !__libc_missing_posix_cpu_timers)
-    __libc_missing_cpu_posix_timers = 1;
+    __libc_missing_posix_cpu_timers = 1;
 #  endif
   if (!__libc_missing_posix_cpu_timers)
     {
       INTERNAL_SYSCALL_DECL (err);
-      int r = INTERNAL_SYSCALL (clock_getres, err, 2, tidclock, NULL);
+      int r = INTERNAL_SYSCALL (clock_getres, err, 2, pidclock, NULL);
       if (!INTERNAL_SYSCALL_ERROR_P (r, err))
 # endif
 	{
--- libc/nptl/sysdeps/unix/sysv/linux/pthread_getcpuclockid.c	2005-04-27 13:05:16.000000000 +0200
+++ libc/nptl/sysdeps/unix/sysv/linux/pthread_getcpuclockid.c	2005-04-27 15:49:32.000000000 +0200
@@ -1,5 +1,5 @@
 /* pthread_getcpuclockid -- Get POSIX clockid_t for a pthread_t.  Linux version
-   Copyright (C) 2000,2001,2002,2003,2004 Free Software Foundation, Inc.
+   Copyright (C) 2000,2001,2002,2003,2004,2005 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
 
    The GNU C Library is free software; you can redistribute it and/or
@@ -21,8 +21,8 @@
 #include <pthreadP.h>
 #include <sys/time.h>
 #include <tls.h>
-#include "kernel-features.h"
-#include "kernel-posix-cpu-timers.h"
+#include <kernel-features.h>
+#include <kernel-posix-cpu-timers.h>
 
 
 #if !(__ASSUME_POSIX_CPU_TIMERS > 0)

	Jakub


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]