Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-cw
Commits
a628c13e
Commit
a628c13e
authored
Nov 12, 2003
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added a wine-glibc binary that detects the glibc threading in use and
execs the corresponding wine binary. Removed the --with-nptl configure option.
parent
b2d937d5
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
113 additions
and
28 deletions
+113
-28
configure
configure
+2
-15
configure.ac
configure.ac
+2
-8
.cvsignore
loader/.cvsignore
+1
-0
Makefile.in
loader/Makefile.in
+4
-0
glibc.c
loader/glibc.c
+104
-0
wineinstall
tools/wineinstall
+0
-5
No files found.
configure
View file @
a628c13e
...
...
@@ -858,7 +858,6 @@ Optional Packages:
--without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
--without-opengl do not use OpenGL
--without-curses do not use curses
--with-nptl use glibc NPTL threading support
--with-wine-tools=<dir> use Wine tools from directory <dir>
--with-x use the X Window System
...
...
@@ -1346,12 +1345,6 @@ if test "${with_curses+set}" = set; then
fi
;
# Check whether --with-nptl or --without-nptl was given.
if
test
"
${
with_nptl
+set
}
"
=
set
;
then
withval
=
"
$with_nptl
"
fi
;
# Check whether --with-wine-tools or --without-wine-tools was given.
if
test
"
${
with_wine_tools
+set
}
"
=
set
;
then
withval
=
"
$with_wine_tools
"
...
...
@@ -12635,16 +12628,10 @@ esac
case
$host_os
in
linux
*
)
WINE_BINARIES
=
"wine-kthread wine-pthread"
WINE_BINARIES
=
"wine-
glibc wine-
kthread wine-pthread"
if
test
"x
$with_nptl
"
=
"xyes"
then
MAIN_BINARY
=
"wine-pthread"
MAIN_BINARY
=
"wine-glibc"
else
MAIN_BINARY
=
"wine-kthread"
fi
;;
*
)
WINE_BINARIES
=
"wine-kthread"
...
...
configure.ac
View file @
a628c13e
...
...
@@ -18,7 +18,6 @@ AC_ARG_ENABLE(trace, AC_HELP_STRING([--disable-trace],[compile out TRACE message
AC_ARG_WITH(opengl, AC_HELP_STRING([--without-opengl],[do not use OpenGL]))
AC_ARG_WITH(curses, AC_HELP_STRING([--without-curses],[do not use curses]))
AC_ARG_WITH(nptl, AC_HELP_STRING([--with-nptl],[use glibc NPTL threading support]))
AC_ARG_WITH(wine-tools,AC_HELP_STRING([--with-wine-tools=<dir>],[use Wine tools from directory <dir>]))
AC_SUBST(WIN16_FILES,"\$(WIN16_FILES)")
...
...
@@ -934,13 +933,8 @@ esac
case $host_os in
linux*)
AC_SUBST(WINE_BINARIES,"wine-kthread wine-pthread")
if test "x$with_nptl" = "xyes"
then
AC_SUBST(MAIN_BINARY,"wine-pthread")
else
AC_SUBST(MAIN_BINARY,"wine-kthread")
fi
AC_SUBST(WINE_BINARIES,"wine-glibc wine-kthread wine-pthread")
AC_SUBST(MAIN_BINARY,"wine-glibc")
;;
*)
AC_SUBST(WINE_BINARIES,"wine-kthread")
...
...
loader/.cvsignore
View file @
a628c13e
Makefile
wine
wine-glibc
wine-kthread
wine-pthread
loader/Makefile.in
View file @
a628c13e
...
...
@@ -5,6 +5,7 @@ VPATH = @srcdir@
MODULE
=
wine
C_SRCS
=
\
glibc.c
\
kthread.c
\
main.c
\
pthread.c
...
...
@@ -22,6 +23,9 @@ all: $(WINE_BINARIES) $(MODULE)
LIBPTHREAD
=
@LIBPTHREAD@
LDEXECFLAGS
=
@LDEXECFLAGS@
wine-glibc
:
glibc.o Makefile.in
$(CC)
-o
$@
$(LDEXECFLAGS)
glibc.o
$(LIBWINE)
$(LIBPORT)
$(LIBPTHREAD)
$(EXTRALIBS)
$(LDFLAGS)
wine-kthread
:
$(KTHREAD_OBJS) Makefile.in
$(CC)
-o
$@
$(LDEXECFLAGS)
$(KTHREAD_OBJS)
$(LIBWINE)
$(LIBPORT)
$(EXTRALIBS)
$(LDFLAGS)
...
...
loader/glibc.c
0 → 100644
View file @
a628c13e
/*
* glibc threading support
*
* Copyright 2003 Alexandre Julliard
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
#include "config.h"
#include "wine/port.h"
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
#include <pthread.h>
#include "wine/library.h"
/* malloc wrapper */
static
void
*
xmalloc
(
size_t
size
)
{
void
*
res
;
if
(
!
size
)
size
=
1
;
if
(
!
(
res
=
malloc
(
size
)))
{
fprintf
(
stderr
,
"wine: virtual memory exhausted
\n
"
);
exit
(
1
);
}
return
res
;
}
/* separate thread to check for NPTL and TLS features */
static
void
*
needs_pthread
(
void
*
arg
)
{
pid_t
tid
=
gettid
();
/* check for NPTL */
if
(
tid
!=
-
1
&&
tid
!=
getpid
())
return
(
void
*
)
1
;
/* check for TLS glibc */
return
(
void
*
)(
wine_get_gs
()
!=
0
);
}
/* return the name of the Wine threading variant to use */
static
const
char
*
get_threading
(
void
)
{
pthread_t
id
;
void
*
ret
;
pthread_create
(
&
id
,
NULL
,
needs_pthread
,
NULL
);
pthread_join
(
id
,
&
ret
);
return
ret
?
"-pthread"
:
"-kthread"
;
}
/**********************************************************************
* main
*/
int
main
(
int
argc
,
char
*
argv
[]
)
{
const
char
*
loader
=
getenv
(
"WINELOADER"
);
const
char
*
threads
=
get_threading
();
const
char
*
name
;
char
*
new_name
;
if
(
!
(
name
=
loader
))
{
/* if no WINELOADER specified, get base name of argv[0] */
if
((
name
=
strrchr
(
argv
[
0
],
'/'
)))
name
++
;
else
name
=
argv
[
0
];
}
new_name
=
xmalloc
(
strlen
(
name
)
+
strlen
(
threads
)
+
1
);
strcpy
(
new_name
,
name
);
strcat
(
new_name
,
threads
);
if
(
loader
)
{
/* update WINELOADER with the new name */
char
*
new_loader
=
xmalloc
(
sizeof
(
"WINELOADER="
)
+
strlen
(
new_name
)
);
strcpy
(
new_loader
,
"WINELOADER="
);
strcat
(
new_loader
,
new_name
);
putenv
(
new_loader
);
argv
[
0
]
=
new_name
;
execv
(
argv
[
0
],
argv
);
}
else
{
wine_init_argv0_path
(
argv
[
0
]
);
wine_exec_wine_binary
(
new_name
,
argv
,
NULL
);
}
fprintf
(
stderr
,
"wine: could not exec %s
\n
"
,
argv
[
0
]
);
exit
(
1
);
}
tools/wineinstall
View file @
a628c13e
...
...
@@ -152,11 +152,6 @@ function configure_wine_applications {
echo
"WINE Installer v0.74"
echo
# check for redhat 9 with tls libs so we can enable --with-nptl until runtime detection is complete
if
[
-e
/etc/redhat-release
]
&&
grep
"Shrike"
/etc/redhat-release &>/dev/null
&&
[
-e
/lib/tls
]
;
then
CONFARGS
=
"
$CONFARGS
--with-nptl"
fi
if
[
"
$BINDIST
"
=
'no'
]
then
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment