Commit 0e446d59 authored by Alexandre Julliard's avatar Alexandre Julliard

loader: Get rid of the no longer supported wine-kthread.

parent 1dc4d5ca
......@@ -215,8 +215,6 @@ loader/wine-freebsd
loader/wine-freebsd-installed
loader/wine-glibc
loader/wine-glibc-installed
loader/wine-kthread
loader/wine-kthread-installed
loader/wine-preloader
loader/wine-preloader-installed
loader/wine-pthread
......
......@@ -17906,7 +17906,7 @@ MAIN_BINARY="wine-pthread"
linux* | k*bsd*-gnu)
MAIN_BINARY="wine-glibc"
EXTRA_BINARIES="wine-kthread wine-pthread wine-preloader"
EXTRA_BINARIES="wine-pthread wine-preloader"
;;
freebsd*)
MAIN_BINARY="wine-freebsd"
......@@ -17991,8 +17991,6 @@ CFLAGS="$CFLAGS $BUILTINFLAG"
for ac_func in \
_pclose \
_popen \
......@@ -18006,7 +18004,6 @@ for ac_func in \
_vsnprintf \
asctime_r \
chsize \
clone \
dlopen \
epoll_create \
ffs \
......@@ -18039,7 +18036,6 @@ for ac_func in \
pwrite \
readdir \
readlink \
rfork \
sched_yield \
select \
setproctitle \
......
......@@ -1417,7 +1417,7 @@ case $host_cpu in
case $host_os in
linux* | k*bsd*-gnu)
AC_SUBST(MAIN_BINARY,"wine-glibc")
AC_SUBST(EXTRA_BINARIES,"wine-kthread wine-pthread wine-preloader") ;;
AC_SUBST(EXTRA_BINARIES,"wine-pthread wine-preloader") ;;
freebsd*)
AC_SUBST(MAIN_BINARY,"wine-freebsd")
AC_SUBST(EXTRA_BINARIES,"wine-pthread") ;;
......@@ -1442,7 +1442,6 @@ AC_CHECK_FUNCS(\
_vsnprintf \
asctime_r \
chsize \
clone \
dlopen \
epoll_create \
ffs \
......@@ -1475,7 +1474,6 @@ AC_CHECK_FUNCS(\
pwrite \
readdir \
readlink \
rfork \
sched_yield \
select \
setproctitle \
......
......@@ -41,9 +41,6 @@
/* Define to 1 if you have the `chsize' function. */
#undef HAVE_CHSIZE
/* Define to 1 if you have the `clone' function. */
#undef HAVE_CLONE
/* Define to 1 if you have the <CoreAudio/CoreAudio.h> header file. */
#undef HAVE_COREAUDIO_COREAUDIO_H
......@@ -606,9 +603,6 @@
/* Define to 1 if you have the <resolv.h> header file. */
#undef HAVE_RESOLV_H
/* Define to 1 if you have the `rfork' function. */
#undef HAVE_RFORK
/* Define to 1 if you have the <sched.h> header file. */
#undef HAVE_SCHED_H
......
......@@ -7,12 +7,10 @@ MODULE = wine
C_SRCS = \
freebsd.c \
glibc.c \
kthread.c \
main.c \
preloader.c \
pthread.c
KTHREAD_OBJS = kthread.o main.o
PTHREAD_OBJS = pthread.o main.o
MAIN_BINARY = @MAIN_BINARY@
......@@ -25,8 +23,6 @@ PROGRAMS = \
wine-freebsd-installed \
wine-glibc \
wine-glibc-installed \
wine-kthread \
wine-kthread-installed \
wine-preloader \
wine-preloader-installed \
wine-pthread \
......@@ -65,12 +61,6 @@ wine-glibc-installed: glibc.o Makefile.in
wine-preloader wine-preloader-installed: preloader.o Makefile.in
$(CC) -o $@ -static -nostartfiles -nodefaultlibs -Wl,-Ttext=0x7c000000 preloader.o $(LIBPORT) $(LDFLAGS)
wine-kthread: $(KTHREAD_OBJS) Makefile.in
$(CC) -o $@ $(LDEXECFLAGS) $(KTHREAD_OBJS) $(LIBWINE) $(LIBPORT) $(EXTRALIBS) $(LDFLAGS) $(LDRPATH_LOCAL)
wine-kthread-installed: $(KTHREAD_OBJS) Makefile.in
$(CC) -o $@ $(LDEXECFLAGS) $(KTHREAD_OBJS) $(LIBWINE) $(LIBPORT) $(EXTRALIBS) $(LDFLAGS) $(LDRPATH_INSTALL)
wine-pthread: $(PTHREAD_OBJS) Makefile.in
$(CC) -o $@ $(LDEXECFLAGS) $(PTHREAD_OBJS) $(LIBWINE) $(LIBPORT) $(LIBPTHREAD) $(EXTRALIBS) $(LDFLAGS) $(LDRPATH_LOCAL)
......
......@@ -56,7 +56,6 @@ static void *xmalloc( size_t size )
/* separate thread to check for NPTL and TLS features */
static void *needs_pthread( void *arg )
{
const char *loader;
pid_t tid = gettid();
/* check for NPTL */
if (tid != -1 && tid != getpid()) return (void *)1;
......@@ -70,20 +69,18 @@ static void *needs_pthread( void *arg )
else
fprintf( stderr,
"wine: Your C library is too old. You need at least glibc 2.3 with NPTL support.\n" );
if (!(loader = getenv( "WINELOADER" )) || !strstr( loader, "wine-kthread" ))
exit(1);
return 0;
}
/* return the name of the Wine threading variant to use */
static const char *get_threading(void)
/* check if we support the glibc threading model */
static void check_threading(void)
{
pthread_t id;
void *ret;
pthread_create( &id, NULL, needs_pthread, NULL );
pthread_join( id, &ret );
return ret ? "wine-pthread" : "wine-kthread";
if (!ret) exit(1);
}
/* build a new full path from the specified path and name */
......@@ -130,8 +127,7 @@ static void set_max_limit( int limit )
int main( int argc, char *argv[] )
{
const char *loader = getenv( "WINELOADER" );
const char *threads = get_threading();
const char *new_argv0 = build_new_path( argv[0], threads );
const char *new_argv0 = build_new_path( argv[0], "wine-pthread" );
wine_init_argv0_path( new_argv0 );
......@@ -141,7 +137,7 @@ int main( int argc, char *argv[] )
if (loader)
{
/* update WINELOADER with the new name */
const char *new_name = build_new_path( loader, threads );
const char *new_name = build_new_path( loader, "wine-pthread" );
char *new_loader = xmalloc( sizeof("WINELOADER=") + strlen(new_name) );
strcpy( new_loader, "WINELOADER=" );
strcat( new_loader, new_name );
......@@ -149,8 +145,9 @@ int main( int argc, char *argv[] )
loader = new_name;
}
check_threading();
check_vmsplit( &argc );
wine_exec_wine_binary( NULL, argv, loader );
fprintf( stderr, "wine: could not exec %s\n", threads );
fprintf( stderr, "wine: could not exec wine-pthread\n" );
exit(1);
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment