diff options
author | Samuel Thibault <sthibault@debian.org> | 2009-05-24 14:26:24 +0000 |
---|---|---|
committer | Samuel Thibault <sthibault@debian.org> | 2009-05-24 14:26:24 +0000 |
commit | 5a15d70208d32e63e95a8a67ef3ca7574eed1589 (patch) | |
tree | 5e24933ac98b768a6f99c6970c9036ce9aeaafef /debian | |
parent | 8a0f00da990787c51c90a1f36ed3b5017348fe51 (diff) |
debian/patches/extern_inline_fix.patch: New patch from Marc Dequene to
fix extern inline declarations.
Diffstat (limited to 'debian')
-rw-r--r-- | debian/changelog | 2 | ||||
-rw-r--r-- | debian/patches/extern_inline_fix.patch | 730 | ||||
-rw-r--r-- | debian/patches/series | 1 |
3 files changed, 733 insertions, 0 deletions
diff --git a/debian/changelog b/debian/changelog index c57313aa..eecfaf2a 100644 --- a/debian/changelog +++ b/debian/changelog @@ -55,6 +55,8 @@ hurd (20080921-1) UNRELEASED; urgency=low of octave3.0. * debian/patches/libpthread_no_recursive_mutex_initializer.patch: New patch to drop undefined references to __pthread_recursive_mutexattr. + * debian/patches/extern_inline_fix.patch: New patch from Marc Dequène to + fix extern inline declarations. -- Michael Banck <mbanck@debian.org> Sat, 13 Sep 2008 23:43:27 +0200 diff --git a/debian/patches/extern_inline_fix.patch b/debian/patches/extern_inline_fix.patch new file mode 100644 index 00000000..8ee7add5 --- /dev/null +++ b/debian/patches/extern_inline_fix.patch @@ -0,0 +1,730 @@ +diff -Nur hurd_orig/libdiskfs/diskfs.h hurd/libdiskfs/diskfs.h +--- hurd_orig/libdiskfs/diskfs.h 2009-02-16 17:05:59.000000000 +0100 ++++ hurd/libdiskfs/diskfs.h 2009-05-24 13:05:23.000000000 +0200 +@@ -27,10 +27,7 @@ + #include <hurd/fshelp.h> + #include <hurd/iohelp.h> + #include <idvec.h> +- +-#ifndef DISKFS_EXTERN_INLINE +-#define DISKFS_EXTERN_INLINE extern inline +-#endif ++#include <features.h> + + /* Each user port referring to a file points to one of these + (with the aid of the ports library). */ +@@ -781,10 +778,16 @@ + the user to install is USER. */ + void diskfs_finish_protid (struct protid *cred, struct iouser *user); + ++extern struct protid * diskfs_begin_using_protid_port (file_t port); ++ ++extern void diskfs_end_using_protid_port (struct protid *cred); ++ ++# ifdef __USE_EXTERN_INLINES ++ + /* Called by MiG to translate ports into struct protid *. + fsmutations.h arranges for this to happen for the io and + fs interfaces. */ +-DISKFS_EXTERN_INLINE struct protid * ++__extern_inline struct protid * + diskfs_begin_using_protid_port (file_t port) + { + return ports_lookup_port (diskfs_port_bucket, port, diskfs_protid_class); +@@ -793,13 +796,15 @@ + /* Called by MiG after server routines have been run; this + balances begin_using_protid_port, and is arranged for the io + and fs interfaces by fsmutations.h. */ +-DISKFS_EXTERN_INLINE void ++__extern_inline void + diskfs_end_using_protid_port (struct protid *cred) + { + if (cred) + ports_port_deref (cred); + } + ++# endif /* Use extern inlines. */ ++ + /* Called when a protid CRED has no more references. (Because references\ + to protids are maintained by the port management library, this is + installed in the clean routines list.) The ports library will +diff -Nur hurd_orig/libpipe/pipe.h hurd/libpipe/pipe.h +--- hurd_orig/libpipe/pipe.h 1996-10-24 21:27:08.000000000 +0200 ++++ hurd/libpipe/pipe.h 2009-05-24 13:13:37.000000000 +0200 +@@ -24,13 +24,10 @@ + #define EWOULDBLOCK EAGAIN /* XXX */ + + #include <cthreads.h> /* For conditions & mutexes */ ++#include <features.h> + + #include "pq.h" + +-#ifndef PIPE_EI +-#define PIPE_EI extern inline +-#endif +- + + /* A description of a class of pipes and how to operate on them. */ + struct pipe_class +@@ -107,9 +104,24 @@ + /* Pipe flags. */ + #define PIPE_BROKEN 0x1 /* This pipe isn't connected. */ + ++ ++extern size_t pipe_readable (struct pipe *pipe, int data_only); ++ ++extern int pipe_is_readable (struct pipe *pipe, int data_only); ++ ++extern error_t pipe_wait_readable (struct pipe *pipe, int noblock, int data_only); ++ ++extern error_t pipe_select_readable (struct pipe *pipe, int data_only); ++ ++extern error_t pipe_wait_writable (struct pipe *pipe, int noblock); ++ ++extern error_t pipe_select_writable (struct pipe *pipe); ++ ++# ifdef __USE_EXTERN_INLINES ++ + /* Returns the number of characters quickly readable from PIPE. If DATA_ONLY + is true, then `control' packets are ignored. */ +-PIPE_EI size_t ++__extern_inline size_t + pipe_readable (struct pipe *pipe, int data_only) + { + size_t readable = 0; +@@ -128,7 +140,7 @@ + then `control' packets are ignored. Note that this is different than + (pipe_readable (PIPE) > 0) in the case where a control packet containing + only ports is present. */ +-PIPE_EI int ++__extern_inline int + pipe_is_readable (struct pipe *pipe, int data_only) + { + struct pq *pq = pipe->queue; +@@ -143,7 +155,7 @@ + this operation will return EWOULDBLOCK instead of blocking when no data is + immediately available. If DATA_ONLY is true, then `control' packets are + ignored. */ +-PIPE_EI error_t ++__extern_inline error_t + pipe_wait_readable (struct pipe *pipe, int noblock, int data_only) + { + while (! pipe_is_readable (pipe, data_only) && ! (pipe->flags & PIPE_BROKEN)) +@@ -160,7 +172,7 @@ + returns once threads waiting using pipe_wait_readable have been woken and + given a chance to read, and if there is still data available thereafter. + If DATA_ONLY is true, then `control' packets are ignored. */ +-PIPE_EI error_t ++__extern_inline error_t + pipe_select_readable (struct pipe *pipe, int data_only) + { + while (! pipe_is_readable (pipe, data_only) && ! (pipe->flags & PIPE_BROKEN)) +@@ -172,7 +184,7 @@ + /* Block until data can be written to PIPE. If NOBLOCK is true, then + EWOULDBLOCK is returned instead of blocking if this can't be done + immediately. */ +-PIPE_EI error_t ++__extern_inline error_t + pipe_wait_writable (struct pipe *pipe, int noblock) + { + size_t limit = pipe->write_limit; +@@ -193,7 +205,7 @@ + /* Block until some data can be written to PIPE. This call only returns once + threads waiting using pipe_wait_writable have been woken and given a + chance to write, and if there is still space available thereafter. */ +-PIPE_EI error_t ++__extern_inline error_t + pipe_select_writable (struct pipe *pipe) + { + size_t limit = pipe->write_limit; +@@ -203,6 +215,8 @@ + return 0; + } + ++# endif /* Use extern inlines. */ ++ + /* Creates a new pipe of class CLASS and returns it in RESULT. */ + error_t pipe_create (struct pipe_class *class, struct pipe **pipe); + +@@ -223,8 +237,28 @@ + should be locked. */ + void _pipe_no_writers (struct pipe *pipe); + ++extern void pipe_acquire_reader (struct pipe *pipe); ++ ++extern void pipe_acquire_writer (struct pipe *pipe); ++ ++extern void pipe_release_reader (struct pipe *pipe); ++ ++extern void pipe_release_writer (struct pipe *pipe); ++ ++extern void pipe_add_reader (struct pipe *pipe); ++ ++extern void pipe_add_writer (struct pipe *pipe); ++ ++extern void pipe_remove_reader (struct pipe *pipe); ++ ++extern void pipe_remove_writer (struct pipe *pipe); ++ ++extern void pipe_drain (struct pipe *pipe); ++ ++# ifdef __USE_EXTERN_INLINES ++ + /* Lock PIPE and increment its readers count. */ +-PIPE_EI void ++__extern_inline void + pipe_acquire_reader (struct pipe *pipe) + { + mutex_lock (&pipe->lock); +@@ -233,7 +267,7 @@ + } + + /* Lock PIPE and increment its writers count. */ +-PIPE_EI void ++__extern_inline void + pipe_acquire_writer (struct pipe *pipe) + { + mutex_lock (&pipe->lock); +@@ -243,7 +277,7 @@ + + /* Decrement PIPE's (which should be locked) reader count and unlock it. If + there are no more refs to PIPE, it will be destroyed. */ +-PIPE_EI void ++__extern_inline void + pipe_release_reader (struct pipe *pipe) + { + if (--pipe->readers == 0) +@@ -254,7 +288,7 @@ + + /* Decrement PIPE's (which should be locked) writer count and unlock it. If + there are no more refs to PIPE, it will be destroyed. */ +-PIPE_EI void ++__extern_inline void + pipe_release_writer (struct pipe *pipe) + { + if (--pipe->writers == 0) +@@ -264,7 +298,7 @@ + } + + /* Increment PIPE's reader count. PIPE should be unlocked. */ +-PIPE_EI void ++__extern_inline void + pipe_add_reader (struct pipe *pipe) + { + pipe_acquire_reader (pipe); +@@ -272,7 +306,7 @@ + } + + /* Increment PIPE's writer count. PIPE should be unlocked. */ +-PIPE_EI void ++__extern_inline void + pipe_add_writer (struct pipe *pipe) + { + pipe_acquire_writer (pipe); +@@ -281,7 +315,7 @@ + + /* Decrement PIPE's (which should be unlocked) reader count and unlock it. If + there are no more refs to PIPE, it will be destroyed. */ +-PIPE_EI void ++__extern_inline void + pipe_remove_reader (struct pipe *pipe) + { + mutex_lock (&pipe->lock); +@@ -290,7 +324,7 @@ + + /* Decrement PIPE's (which should be unlocked) writer count and unlock it. If + there are no more refs to PIPE, it will be destroyed. */ +-PIPE_EI void ++__extern_inline void + pipe_remove_writer (struct pipe *pipe) + { + mutex_lock (&pipe->lock); +@@ -298,12 +332,14 @@ + } + + /* Empty out PIPE of any data. PIPE should be locked. */ +-PIPE_EI void ++__extern_inline void + pipe_drain (struct pipe *pipe) + { + pq_drain (pipe->queue); + } + ++# endif /* Use extern inlines. */ ++ + /* Writes up to LEN bytes of DATA, to PIPE, which should be locked, and + returns the amount written in AMOUNT. If present, the information in + CONTROL & PORTS is written in a preceding control packet. If an error is +diff -Nur hurd_orig/libpipe/pq.h hurd/libpipe/pq.h +--- hurd_orig/libpipe/pq.h 2006-07-25 16:06:14.000000000 +0200 ++++ hurd/libpipe/pq.h 2009-05-24 13:17:15.000000000 +0200 +@@ -25,10 +25,7 @@ + #include <stddef.h> /* for size_t */ + #include <string.h> + #include <mach/mach.h> +- +-#ifndef PQ_EI +-#define PQ_EI extern inline +-#endif ++#include <features.h> + + + struct packet +@@ -70,13 +67,19 @@ + /* If PACKET has any ports, deallocates them. */ + void packet_dealloc_ports (struct packet *packet); + ++extern size_t packet_readable (struct packet *packet); ++ ++# ifdef __USE_EXTERN_INLINES ++ + /* Returns the number of bytes of data in PACKET. */ +-PQ_EI size_t ++__extern_inline size_t + packet_readable (struct packet *packet) + { + return packet->buf_end - packet->buf_start; + } + ++# endif /* Use extern inlines. */ ++ + /* Append the bytes in DATA, of length DATA_LEN, to what's already in PACKET, + and return the amount appended in AMOUNT if that's not the null pointer. */ + error_t packet_write (struct packet *packet, +@@ -94,14 +97,20 @@ + error_t packet_read_ports (struct packet *packet, + mach_port_t **ports, size_t *num_ports); + ++extern void packet_read_source (struct packet *packet, void **source); ++ ++# ifdef __USE_EXTERN_INLINES ++ + /* Return the source addressd in PACKET in SOURCE, deallocating it from + PACKET. */ +-PQ_EI void ++__extern_inline void + packet_read_source (struct packet *packet, void **source) + { + *source = packet->source; + packet->source = 0; + } ++ ++# endif /* Use extern inlines. */ + + /* The packet size above which we start to do things differently to avoid + copying around data. */ +@@ -125,9 +134,17 @@ + returned. */ + error_t packet_realloc (struct packet *packet, size_t new_len); + ++extern int packet_fit (struct packet *packet, size_t amount); ++ ++extern error_t packet_ensure (struct packet *packet, size_t amount); ++ ++extern int packet_ensure_efficiently (struct packet *packet, size_t amount); ++ ++# ifdef __USE_EXTERN_INLINES ++ + /* Try to make space in PACKET for AMOUNT more bytes without growing the + buffer, returning true if we could do it. */ +-PQ_EI int ++__extern_inline int + packet_fit (struct packet *packet, size_t amount) + { + char *buf = packet->buf, *end = packet->buf_end; +@@ -159,7 +176,7 @@ + + /* Make sure that PACKET has room for at least AMOUNT more bytes, or return + the reason why not. */ +-PQ_EI error_t ++__extern_inline error_t + packet_ensure (struct packet *packet, size_t amount) + { + if (! packet_fit (packet, amount)) +@@ -176,7 +193,7 @@ + it can be done efficiently, e.g., the packet can be grown in place, rather + than moving the contents (or there is little enough data so that copying + it is OK). True is returned if room was made, false otherwise. */ +-PQ_EI int ++__extern_inline int + packet_ensure_efficiently (struct packet *packet, size_t amount) + { + if (! packet_fit (packet, amount)) +@@ -189,6 +206,8 @@ + } + return 0; + } ++ ++# endif /* Use extern inlines. */ + + struct pq + { +@@ -201,10 +220,14 @@ + the packet, or deallocated by calling pipe_dealloc_addr. */ + struct packet *pq_queue (struct pq *pq, unsigned type, void *source); + ++extern struct packet * pq_tail (struct pq *pq, unsigned type, void *source); ++ ++# ifdef __USE_EXTERN_INLINES ++ + /* Returns the tail of the packet queue PQ, which may mean pushing a new + packet if TYPE and SOURCE do not match the current tail, or this is the + first packet. */ +-PQ_EI struct packet * ++__extern_inline struct packet * + pq_tail (struct pq *pq, unsigned type, void *source) + { + struct packet *tail = pq->tail; +@@ -214,16 +237,24 @@ + return tail; + } + ++# endif /* Use extern inlines. */ ++ + /* Remove the first packet (if any) in PQ, deallocating any resources it + holds. True is returned if a packet was found, false otherwise. */ + int pq_dequeue (struct pq *pq); + ++extern struct packet * pq_head (struct pq *pq, unsigned type, void *source); ++ ++extern struct packet * pq_next (struct pq *pq, unsigned type, void *source); ++ ++# ifdef __USE_EXTERN_INLINES ++ + /* Returns the next available packet in PQ, without removing it from the + queue, or NULL if there is none, or the next packet isn't appropiate. + A packet is inappropiate if SOURCE is non-NULL its source field doesn't + match it, or TYPE is non-NULL and the packet's type field doesn't match + it. */ +-PQ_EI struct packet * ++__extern_inline struct packet * + pq_head (struct pq *pq, unsigned type, void *source) + { + struct packet *head = pq->head; +@@ -237,7 +268,7 @@ + } + + /* The same as pq_head, but first discards the head of the queue. */ +-PQ_EI struct packet * ++__extern_inline struct packet * + pq_next (struct pq *pq, unsigned type, void *source) + { + if (!pq->head) +@@ -246,6 +277,8 @@ + return pq_head (pq, type, source); + } + ++# endif /* Use extern inlines. */ ++ + /* Dequeues all packets in PQ. */ + void pq_drain (struct pq *pq); + +diff -Nur hurd_orig/libshouldbeinlibc/idvec.h hurd/libshouldbeinlibc/idvec.h +--- hurd_orig/libshouldbeinlibc/idvec.h 2001-02-26 05:15:22.000000000 +0100 ++++ hurd/libshouldbeinlibc/idvec.h 2009-05-24 13:20:47.000000000 +0200 +@@ -24,10 +24,7 @@ + #include <hurd/hurd_types.h> + #include <errno.h> + #include <string.h> +- +-#ifndef IDVEC_EI +-#define IDVEC_EI extern inline +-#endif ++#include <features.h> + + struct idvec + { +@@ -50,22 +47,30 @@ + /* Free IDVEC and any storage associated with it. */ + void idvec_free (struct idvec *idvec); + ++extern void idvec_clear (struct idvec *idvec); ++ ++extern int idvec_is_empty (const struct idvec *idvec); ++ ++extern int idvec_equal (const struct idvec *idvec1, const struct idvec *idvec2); ++ ++# ifdef __USE_EXTERN_INLINES ++ + /* Mark IDVEC as not containing any ids. */ +-IDVEC_EI void ++__extern_inline void + idvec_clear (struct idvec *idvec) + { + idvec->num = 0; + } + + /* Returns true if IDVEC contains no ids. */ +-IDVEC_EI int ++__extern_inline int + idvec_is_empty (const struct idvec *idvec) + { + return idvec->num == 0; + } + + /* Return true if IDVEC1 has contents identical to IDVEC2. */ +-IDVEC_EI int ++__extern_inline int + idvec_equal (const struct idvec *idvec1, const struct idvec *idvec2) + { + size_t num = idvec1->num; +@@ -74,6 +79,8 @@ + || memcmp (idvec1->ids, idvec2->ids, num * sizeof *idvec1->ids) == 0); + } + ++# endif /* Use extern inlines. */ ++ + /* Ensure that IDVEC has enough spaced allocated to hold NUM ids, thus + ensuring that any subsequent ids added won't return a memory allocation + error unless it would result in more ids that NUM. ENOMEM is returned if +@@ -87,13 +94,19 @@ + /* Returns true if IDVEC contains ID, at or after position POS. */ + int idvec_tail_contains (const struct idvec *idvec, unsigned pos, uid_t id); + ++extern int idvec_contains (const struct idvec *idvec, uid_t id); ++ ++# ifdef __USE_EXTERN_INLINES ++ + /* Returns true if IDVEC contains ID. */ +-IDVEC_EI int ++__extern_inline int + idvec_contains (const struct idvec *idvec, uid_t id) + { + return idvec_tail_contains (idvec, 0, id); + } + ++# endif /* Use extern inlines. */ ++ + /* Insert ID into IDVEC at position POS, returning ENOMEM if there wasn't + enough memory, or 0. */ + error_t idvec_insert (struct idvec *idvec, unsigned pos, uid_t id); +diff -Nur hurd_orig/libshouldbeinlibc/maptime.h hurd/libshouldbeinlibc/maptime.h +--- hurd_orig/libshouldbeinlibc/maptime.h 2007-02-04 16:06:27.000000000 +0100 ++++ hurd/libshouldbeinlibc/maptime.h 2009-05-24 13:21:39.000000000 +0200 +@@ -21,13 +21,10 @@ + #ifndef __MAPTIME_H__ + #define __MAPTIME_H__ + +-#ifndef MAPTIME_EI +-#define MAPTIME_EI extern inline +-#endif +- + #include <mach/time_value.h> + #include <sys/time.h> + #include <errno.h> ++#include <features.h> + + /* Return the mach mapped time page in MTIME. If USE_MACH_DEV is false, then + the hurd time device DEV_NAME, or "/dev/time" if DEV_NAME is 0, is +@@ -37,8 +34,12 @@ + error_t maptime_map (int use_mach_dev, char *dev_name, + volatile struct mapped_time_value **mtime); + ++extern void maptime_read (volatile struct mapped_time_value *mtime, struct timeval *tv); ++ ++# ifdef __USE_EXTERN_INLINES ++ + /* Read the current time from MTIME into TV. This should be very fast. */ +-MAPTIME_EI void ++__extern_inline void + maptime_read (volatile struct mapped_time_value *mtime, struct timeval *tv) + { + do +@@ -49,4 +50,6 @@ + while (tv->tv_sec != mtime->check_seconds); + } + ++# endif /* Use extern inlines. */ ++ + #endif /* __MAPTIME_H__ */ +diff -Nur hurd_orig/libshouldbeinlibc/ugids.h hurd/libshouldbeinlibc/ugids.h +--- hurd_orig/libshouldbeinlibc/ugids.h 2001-04-01 01:01:43.000000000 +0200 ++++ hurd/libshouldbeinlibc/ugids.h 2009-05-24 13:25:12.000000000 +0200 +@@ -23,10 +23,7 @@ + + #include <stdlib.h> /* For inline function stuff. */ + #include <idvec.h> +- +-#ifndef UGIDS_EI +-#define UGIDS_EI extern inline +-#endif ++#include <features.h> + + /* A structure holding a set of the common various types of ids. */ + struct ugids +@@ -47,8 +44,18 @@ + /* Return a new ugids structure, or 0 if an allocation error occurs. */ + struct ugids *make_ugids (); + ++extern void ugids_fini (struct ugids *ugids); ++ ++extern void ugids_free (struct ugids *ugids); ++ ++extern int ugids_is_empty (const struct ugids *ugids); ++ ++extern int ugids_equal (const struct ugids *ugids1, const struct ugids *ugids2); ++ ++# ifdef __USE_EXTERN_INLINES ++ + /* Free all resources used by UGIDS except UGIDS itself. */ +-UGIDS_EI void ++__extern_inline void + ugids_fini (struct ugids *ugids) + { + idvec_fini (&ugids->eff_uids); +@@ -60,7 +67,7 @@ + } + + /* Free all resources used by UGIDS. */ +-UGIDS_EI void ++__extern_inline void + ugids_free (struct ugids *ugids) + { + ugids_fini (ugids); +@@ -68,7 +75,7 @@ + } + + /* Return true if UGIDS contains no ids. */ +-UGIDS_EI int ++__extern_inline int + ugids_is_empty (const struct ugids *ugids) + { + /* We needn't test the imp_*_gids vectors because they are subsets of the +@@ -81,7 +88,7 @@ + } + + /* Free all resources used by UGIDS except UGIDS itself. */ +-UGIDS_EI int ++__extern_inline int + ugids_equal (const struct ugids *ugids1, const struct ugids *ugids2) + { + return +@@ -93,6 +100,8 @@ + && idvec_equal (&ugids1->imp_avail_gids, &ugids2->imp_avail_gids); + } + ++# endif /* Use extern inlines. */ ++ + /* Add all ids in NEW to UGIDS. */ + error_t ugids_merge (struct ugids *ugids, const struct ugids *new); + +diff -Nur hurd_orig/libstore/store.h hurd/libstore/store.h +--- hurd_orig/libstore/store.h 2005-09-25 02:38:07.000000000 +0200 ++++ hurd/libstore/store.h 2009-05-24 13:18:35.000000000 +0200 +@@ -33,10 +33,7 @@ + #include <mach.h> + #include <device/device.h> + #include <hurd/hurd_types.h> +- +-#ifndef STORE_EI +-#define STORE_EI extern inline +-#endif ++#include <features.h> + + + /* Type for addresses inside the store. */ +@@ -270,9 +267,13 @@ + STORE's flags. */ + error_t store_clear_child_flags (struct store *store, int flags); + ++extern int store_is_securely_returnable (struct store *store, int open_flags); ++ ++# ifdef __USE_EXTERN_INLINES ++ + /* Returns true if STORE can safely be returned to a user who has accessed it + via a node using OPEN_FLAGS, without compromising security. */ +-STORE_EI int ++__extern_inline int + store_is_securely_returnable (struct store *store, int open_flags) + { + int flags = store->flags; +@@ -283,6 +284,8 @@ + || (flags & STORE_HARD_READONLY))); + } + ++# endif /* Use extern inlines. */ ++ + /* Fills in the values of the various fields in STORE that are derivable from + the set of runs & the block size. */ + void _store_derive (struct store *store); +diff -Nur hurd_orig/libthreads/rwlock.h hurd/libthreads/rwlock.h +--- hurd_orig/libthreads/rwlock.h 1996-10-24 21:29:49.000000000 +0200 ++++ hurd/libthreads/rwlock.h 2009-05-24 13:23:33.000000000 +0200 +@@ -21,6 +21,7 @@ + + #include <cthreads.h> + #include <assert.h> ++#include <features.h> + + struct rwlock + { +@@ -31,12 +32,20 @@ + int readers_waiting; + }; + +-#ifndef RWLOCK_EI +-#define RWLOCK_EI extern inline +-#endif ++extern void rwlock_reader_lock (struct rwlock *lock); ++ ++extern void rwlock_writer_lock (struct rwlock *lock); ++ ++extern void rwlock_reader_unlock (struct rwlock *lock); ++ ++extern void rwlock_writer_unlock (struct rwlock *lock); ++ ++extern void rwlock_init (struct rwlock *lock); ++ ++# ifdef __USE_EXTERN_INLINES + + /* Get a reader lock on reader-writer lock LOCK for disknode DN */ +-RWLOCK_EI void ++__extern_inline void + rwlock_reader_lock (struct rwlock *lock) + { + mutex_lock (&lock->master); +@@ -53,7 +62,7 @@ + } + + /* Get a writer lock on reader-writer lock LOCK for disknode DN */ +-RWLOCK_EI void ++__extern_inline void + rwlock_writer_lock (struct rwlock *lock) + { + mutex_lock (&lock->master); +@@ -70,7 +79,7 @@ + } + + /* Release a reader lock on reader-writer lock LOCK for disknode DN */ +-RWLOCK_EI void ++__extern_inline void + rwlock_reader_unlock (struct rwlock *lock) + { + mutex_lock (&lock->master); +@@ -82,7 +91,7 @@ + } + + /* Release a writer lock on reader-writer lock LOCK for disknode DN */ +-RWLOCK_EI void ++__extern_inline void + rwlock_writer_unlock (struct rwlock *lock) + { + mutex_lock (&lock->master); +@@ -94,7 +103,7 @@ + } + + /* Initialize reader-writer lock LOCK */ +-RWLOCK_EI void ++__extern_inline void + rwlock_init (struct rwlock *lock) + { + mutex_init (&lock->master); +@@ -104,6 +113,8 @@ + lock->writers_waiting = 0; + } + ++# endif /* Use extern inlines. */ ++ + #define RWLOCK_INITIALIZER \ + { MUTEX_INITIALIZER, CONDITION_INITIALIZER, 0, 0, 0 } + diff --git a/debian/patches/series b/debian/patches/series index b5e1a2be..440a28f3 100644 --- a/debian/patches/series +++ b/debian/patches/series @@ -27,3 +27,4 @@ libports_stability.patch -p0 libpthread_fix.patch -p0 libpthread_setcancel.patch -p0 libpthread_no_recursive_mutex_initializer.patch -p0 +extern_inline_fix.patch -p1 |