Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
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-winehq
Commits
9f5c69c9
Commit
9f5c69c9
authored
Aug 24, 2007
by
Tijl Coosemans
Committed by
Alexandre Julliard
Aug 27, 2007
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
loader: Introduce FreeBSD loader.
parent
2c5767e2
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
80 additions
and
0 deletions
+80
-0
.gitignore
.gitignore
+2
-0
configure
configure
+5
-0
configure.ac
configure.ac
+3
-0
Makefile.in
loader/Makefile.in
+9
-0
freebsd.c
loader/freebsd.c
+61
-0
No files found.
.gitignore
View file @
9f5c69c9
...
...
@@ -764,6 +764,8 @@ libs/wpp/ppl.yy.c
libs/wpp/ppy.tab.c
libs/wpp/ppy.tab.h
loader/wine
loader/wine-freebsd
loader/wine-freebsd-installed
loader/wine-glibc
loader/wine-glibc-installed
loader/wine-kthread
...
...
configure
View file @
9f5c69c9
...
...
@@ -15623,6 +15623,11 @@ MAIN_BINARY="wine-pthread"
EXTRA_BINARIES
=
"wine-kthread wine-pthread wine-preloader"
;;
freebsd
*
)
MAIN_BINARY
=
"wine-freebsd"
EXTRA_BINARIES
=
"wine-pthread"
;;
esac
;;
esac
...
...
configure.ac
View file @
9f5c69c9
...
...
@@ -1224,6 +1224,9 @@ case $host_cpu in
linux* | k*bsd*-gnu)
AC_SUBST(MAIN_BINARY,"wine-glibc")
AC_SUBST(EXTRA_BINARIES,"wine-kthread wine-pthread wine-preloader") ;;
freebsd*)
AC_SUBST(MAIN_BINARY,"wine-freebsd")
AC_SUBST(EXTRA_BINARIES,"wine-pthread") ;;
esac
;;
esac
...
...
loader/Makefile.in
View file @
9f5c69c9
...
...
@@ -5,6 +5,7 @@ VPATH = @srcdir@
MODULE
=
wine
C_SRCS
=
\
freebsd.c
\
glibc.c
\
kthread.c
\
main.c
\
...
...
@@ -20,6 +21,8 @@ WINE_BINARIES = $(MAIN_BINARY) $(EXTRA_BINARIES)
PROGRAMS
=
\
wine
\
wine-freebsd
\
wine-freebsd-installed
\
wine-glibc
\
wine-glibc-installed
\
wine-kthread
\
...
...
@@ -40,6 +43,12 @@ all: $(WINE_BINARIES) $(WINE_BINARIES:%=%-installed) $(MODULE) $(MANPAGES)
LIBPTHREAD
=
@LIBPTHREAD@
LDEXECFLAGS
=
@LDEXECFLAGS@
wine-freebsd
:
freebsd.o Makefile.in
$(CC)
-o
$@
freebsd.o
$(LIBWINE)
$(LIBPORT)
$(LIBPTHREAD)
$(EXTRALIBS)
$(LDFLAGS)
$(LDRPATH_LOCAL)
wine-freebsd-installed
:
freebsd.o Makefile.in
$(CC)
-o
$@
freebsd.o
$(LIBWINE)
$(LIBPORT)
$(LIBPTHREAD)
$(EXTRALIBS)
$(LDFLAGS)
$(LDRPATH_INSTALL)
wine-glibc
:
glibc.o Makefile.in
$(CC)
-o
$@
glibc.o
$(LIBWINE)
$(LIBPORT)
$(LIBPTHREAD)
$(EXTRALIBS)
$(LDFLAGS)
$(LDRPATH_LOCAL)
...
...
loader/freebsd.c
0 → 100644
View file @
9f5c69c9
/*
* FreeBSD loader
*
* Copyright 2007 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., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
#include "config.h"
#include "wine/port.h"
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#ifdef HAVE_SYS_RESOURCE_H
# include <sys/resource.h>
#endif
#include "wine/library.h"
/* build a new full path from the specified path and name */
static
const
char
*
build_new_path
(
const
char
*
path
,
const
char
*
name
)
{
const
char
*
p
;
char
*
ret
;
if
(
!
(
p
=
strrchr
(
path
,
'/'
)))
return
name
;
p
++
;
ret
=
malloc
(
(
p
-
path
)
+
strlen
(
name
)
+
1
);
memcpy
(
ret
,
path
,
p
-
path
);
strcpy
(
ret
+
(
p
-
path
),
name
);
return
ret
;
}
/**********************************************************************
* main
*/
int
main
(
int
argc
,
char
*
argv
[]
)
{
const
char
*
new_argv0
=
build_new_path
(
argv
[
0
],
"wine-pthread"
);
struct
rlimit
rl
;
rl
.
rlim_cur
=
0x02000000
;
rl
.
rlim_max
=
0x02000000
;
setrlimit
(
RLIMIT_DATA
,
&
rl
);
wine_init_argv0_path
(
new_argv0
);
wine_exec_wine_binary
(
NULL
,
argv
,
NULL
);
fprintf
(
stderr
,
"wine: could not exec %s
\n
"
,
new_argv0
);
exit
(
1
);
}
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