Module: wine Branch: master Commit: 40b3d2ed13f4a90b891527a9ded7a72e8f5aba18 URL: http://source.winehq.org/git/wine.git/?a=commit;h=40b3d2ed13f4a90b891527a9de...
Author: Austin English austinenglish@gmail.com Date: Sun May 23 21:18:17 2010 -0500
ntdll: Add %gs support for FreeBSD.
---
configure | 1 + configure.ac | 1 + dlls/ntdll/signal_x86_64.c | 9 ++++++++- include/config.h.in | 3 +++ 4 files changed, 13 insertions(+), 1 deletions(-)
diff --git a/configure b/configure index fe69a20..54573a4 100755 --- a/configure +++ b/configure @@ -5837,6 +5837,7 @@ for ac_header in \ machine/cpu.h \ machine/limits.h \ machine/soundcard.h \ + machine/sysarch.h \ mntent.h \ mpg123.h \ ncurses.h \ diff --git a/configure.ac b/configure.ac index 130291c..4c0cdbe 100644 --- a/configure.ac +++ b/configure.ac @@ -422,6 +422,7 @@ AC_CHECK_HEADERS(\ machine/cpu.h \ machine/limits.h \ machine/soundcard.h \ + machine/sysarch.h \ mntent.h \ mpg123.h \ ncurses.h \ diff --git a/dlls/ntdll/signal_x86_64.c b/dlls/ntdll/signal_x86_64.c index 3411110..ccea6df 100644 --- a/dlls/ntdll/signal_x86_64.c +++ b/dlls/ntdll/signal_x86_64.c @@ -28,10 +28,15 @@ #include <stdlib.h> #include <stdarg.h> #include <stdio.h> + #ifdef HAVE_UNISTD_H # include <unistd.h> #endif
+#ifdef HAVE_MACHINE_SYSARCH_H +# include <machine/sysarch.h> +#endif + #ifdef HAVE_SYS_PARAM_H # include <sys/param.h> #endif @@ -2288,8 +2293,10 @@ void signal_init_thread( TEB *teb ) { stack_t ss;
-#ifdef __linux__ +#if defined __linux__ arch_prctl( ARCH_SET_GS, teb ); +#elif defined __FreeBSD__ + amd64_set_gsbase( teb ); #else # error Please define setting %gs for your architecture #endif diff --git a/include/config.h.in b/include/config.h.in index 0faf127..5d8806d 100644 --- a/include/config.h.in +++ b/include/config.h.in @@ -461,6 +461,9 @@ /* Define to 1 if you have the <machine/soundcard.h> header file. */ #undef HAVE_MACHINE_SOUNDCARD_H
+/* Define to 1 if you have the <machine/sysarch.h> header file. */ +#undef HAVE_MACHINE_SYSARCH_H + /* Define to 1 if you have the <mach/machine.h> header file. */ #undef HAVE_MACH_MACHINE_H