bug-hurd
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: pthread headers


From: pietro
Subject: Re: pthread headers
Date: Tue, 11 Jan 2005 23:49:06 -0200
User-agent: Mozilla Thunderbird 0.8 (X11/20040913)

Alfred M. Szmidt wrote:

If someone is bored, then they can fix the pthread headers to be C90
compliant.  C90 disallows the use of the "inline" keyword.

Many programs still like to use -ansi, so this break compilation of
those on GNU/Hurd since our pthread headers aren't C90 compliant.


i did a grep for inline in the libpthread/include dir and only pthread/pthread.h has inline in it. i'm attaching a patch that changes inlie to __inline__ as discussed in this list.

2005-01-11    <pietro@bastardi.net>

* include/pthread/pthread.h (pthread_spin_destroy): Change return type
       from extern inline to extern __inline__.
       (pthread_spin_init): Likewise.
       (pthread_spin_lock): Likewise.
       (pthread_spin_trylock): Likewise.
       (pthread_spin_unlock): Likewise.

Index: pthread.h
===================================================================
RCS file: /cvsroot/hurd/hurd/libpthread/include/pthread/pthread.h,v
retrieving revision 1.2
diff -u -p -r1.2 pthread.h
--- pthread.h   10 Nov 2002 04:18:11 -0000      1.2
+++ pthread.h   12 Jan 2005 01:46:20 -0000
@@ -420,31 +420,31 @@ extern int pthread_spin_unlock (pthread_

# ifdef __USE_EXTERN_INLINES

-extern inline int
+extern __inline__ int
pthread_spin_destroy (pthread_spinlock_t *__lock)
{
  return __pthread_spin_destroy (__lock);
}

-extern inline int
+extern __inline__ int
pthread_spin_init (pthread_spinlock_t *__lock, int __pshared)
{
  return __pthread_spin_init (__lock, __pshared);
}

-extern inline int
+extern __inline__ int
pthread_spin_lock (pthread_spinlock_t *__lock)
{
  return __pthread_spin_lock (__lock);
}

-extern inline int
+extern __inline__ int
pthread_spin_trylock (pthread_spinlock_t *__lock)
{
  return __pthread_spin_trylock (__lock);
}

-extern inline int
+extern __inline__ int
pthread_spin_unlock (pthread_spinlock_t *__lock)
{
  return __pthread_spin_unlock (__lock);





reply via email to

[Prev in Thread] Current Thread [Next in Thread]