[Top][All Lists]

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

Re: pthread headers

From: Barry deFreese
Subject: Re: pthread headers
Date: Tue, 11 Jan 2005 21:36:55 -0800
User-agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.6) Gecko/20040413 Debian/1.6-5

pietro wrote:

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_


-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);

Bug-hurd mailing list

Doesn't ../bits/pthread.h also do an extern inline int ... ??


Barry deFreese
Debian 3.0r1 "Woody"
Registered Linux "Newbie" #302256 - Hurd H4XX0r wannabe

"Programming today is a race between software engineers striving
to build bigger and better idiot-proof programs, and the Universe
trying to produce bigger and better idiots. So far, the Universe is
winning." Rich Cook.

reply via email to

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