This is the mail archive of the
libc-alpha@sources.redhat.com
mailing list for the glibc project.
Re: [PATCH] Make Wine happy (was Re: struct pthread_functions change breaks Wine)
- From: Jakub Jelinek <jakub at redhat dot com>
- To: Roland McGrath <roland at redhat dot com>
- Cc: Ulrich Drepper <drepper at redhat dot com>, Alexandre Julliard <julliard at winehq dot com>, libc-alpha at sources dot redhat dot com
- Date: Wed, 10 Sep 2003 21:57:09 +0200
- Subject: Re: [PATCH] Make Wine happy (was Re: struct pthread_functions change breaks Wine)
- References: <20030910194639.GV12344@sunsite.ms.mff.cuni.cz> <200309102152.h8ALqwI19600@magilla.sf.frob.com>
- Reply-to: Jakub Jelinek <jakub at redhat dot com>
On Wed, Sep 10, 2003 at 02:52:58PM -0700, Roland McGrath wrote:
> There is no reason not to put this in. But Wine is, as I'm sure they're
> aware, being severely unkosher in diddling with this structure itself,
> GLIBC_PRIVATE and all. There are absolutely zero guarantees about such
> usage not breaking with each and every glibc change. In this particular
> case, it's easy to avoid breaking Wine, but that is pure luck. Anyway, I
> would put the change in if it includes comments about why it's being done.
> The log entry could mention something, but more important is that the code
> get comments saying that the layout matters to someone.
Is this better then?
2003-09-10 Jakub Jelinek <jakub@redhat.com>
* sysdeps/pthread/pthread-functions.h (struct pthread_functions): Move
ptr___pthread_cond_timedwait to the end of the structure to avoid
breaking Wine unnecessarily.
--- libc/linuxthreads/sysdeps/pthread/pthread-functions.h.jj 2003-09-02 03:08:55.000000000 -0400
+++ libc/linuxthreads/sysdeps/pthread/pthread-functions.h 2003-09-10 17:55:06.000000000 -0400
@@ -27,7 +27,8 @@
struct fork_block;
/* Data type shared with libc. The libc uses it to pass on calls to
- the thread functions. */
+ the thread functions. Wine pokes directly into this structure,
+ so if possible avoid breaking it and append new hooks to the end. */
struct pthread_functions
{
pid_t (*ptr_pthread_fork) (struct fork_block *);
@@ -54,8 +55,6 @@ struct pthread_functions
const pthread_condattr_t *);
int (*ptr___pthread_cond_signal) (pthread_cond_t *);
int (*ptr___pthread_cond_wait) (pthread_cond_t *, pthread_mutex_t *);
- int (*ptr___pthread_cond_timedwait) (pthread_cond_t *, pthread_mutex_t *,
- const struct timespec *);
int (*ptr_pthread_equal) (pthread_t, pthread_t);
void (*ptr___pthread_exit) (void *);
int (*ptr_pthread_getschedparam) (pthread_t, int *, struct sched_param *);
@@ -82,6 +81,8 @@ struct pthread_functions
struct sigaction *oact);
int (*ptr_pthread_sigwait) (const sigset_t *set, int *sig);
int (*ptr_pthread_raise) (int sig);
+ int (*ptr___pthread_cond_timedwait) (pthread_cond_t *, pthread_mutex_t *,
+ const struct timespec *);
};
/* Variable in libc.so. */
Jakub