Enable for GNU/kFreeBSD the same kernel-specific interface/parameter
that is used with FreeBSD.
This commit is contained in:
parent
58b308db6a
commit
8800352477
|
@ -13019,7 +13019,7 @@ case $host_os in
|
||||||
esac
|
esac
|
||||||
|
|
||||||
case $host_os in
|
case $host_os in
|
||||||
linux*)
|
linux* | k*bsd*-gnu)
|
||||||
case $host_cpu in
|
case $host_cpu in
|
||||||
*i[3456789]86*) WINE_BINARIES="wine-glibc wine-kthread wine-pthread wine-preloader"
|
*i[3456789]86*) WINE_BINARIES="wine-glibc wine-kthread wine-pthread wine-preloader"
|
||||||
;;
|
;;
|
||||||
|
|
|
@ -1091,7 +1091,7 @@ case $host_os in
|
||||||
esac
|
esac
|
||||||
|
|
||||||
case $host_os in
|
case $host_os in
|
||||||
linux*)
|
linux* | k*bsd*-gnu)
|
||||||
case $host_cpu in
|
case $host_cpu in
|
||||||
*i[[3456789]]86*) AC_SUBST(WINE_BINARIES,"wine-glibc wine-kthread wine-pthread wine-preloader") ;;
|
*i[[3456789]]86*) AC_SUBST(WINE_BINARIES,"wine-glibc wine-kthread wine-pthread wine-preloader") ;;
|
||||||
*) AC_SUBST(WINE_BINARIES,"wine-glibc wine-kthread wine-pthread") ;;
|
*) AC_SUBST(WINE_BINARIES,"wine-glibc wine-kthread wine-pthread") ;;
|
||||||
|
|
|
@ -1138,7 +1138,7 @@ BOOL WINAPI GlobalMemoryStatusEx( LPMEMORYSTATUSEX lpmemex )
|
||||||
#ifdef linux
|
#ifdef linux
|
||||||
FILE *f;
|
FILE *f;
|
||||||
#endif
|
#endif
|
||||||
#if defined(__FreeBSD__) || defined(__NetBSD__)
|
#if defined(__FreeBSD__) || defined(__FreeBSD_kernel__) || defined(__NetBSD__)
|
||||||
int *tmp;
|
int *tmp;
|
||||||
int size_sys;
|
int size_sys;
|
||||||
int mib[2] = { CTL_HW };
|
int mib[2] = { CTL_HW };
|
||||||
|
@ -1209,7 +1209,7 @@ BOOL WINAPI GlobalMemoryStatusEx( LPMEMORYSTATUSEX lpmemex )
|
||||||
/ (TotalPhysical / 100);
|
/ (TotalPhysical / 100);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#elif defined(__FreeBSD__) || defined(__NetBSD__)
|
#elif defined(__FreeBSD__) || defined(__FreeBSD_kernel__) || defined(__NetBSD__)
|
||||||
mib[1] = HW_PHYSMEM;
|
mib[1] = HW_PHYSMEM;
|
||||||
sysctl(mib, 2, NULL, &size_sys, NULL, 0);
|
sysctl(mib, 2, NULL, &size_sys, NULL, 0);
|
||||||
tmp = malloc(size_sys * sizeof(int));
|
tmp = malloc(size_sys * sizeof(int));
|
||||||
|
|
|
@ -288,7 +288,7 @@ static char *parse_mount_entries( FILE *f, dev_t dev, ino_t ino )
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef __FreeBSD__
|
#if defined(__FreeBSD__) || defined(__FreeBSD_kernel__)
|
||||||
#include <fstab.h>
|
#include <fstab.h>
|
||||||
static char *parse_mount_entries( FILE *f, dev_t dev, ino_t ino )
|
static char *parse_mount_entries( FILE *f, dev_t dev, ino_t ino )
|
||||||
{
|
{
|
||||||
|
@ -391,7 +391,7 @@ static char *get_default_drive_device( const char *root )
|
||||||
}
|
}
|
||||||
RtlLeaveCriticalSection( &dir_section );
|
RtlLeaveCriticalSection( &dir_section );
|
||||||
|
|
||||||
#elif defined( __FreeBSD__ )
|
#elif defined(__FreeBSD__) || defined(__FreeBSD_kernel__ )
|
||||||
char *device = NULL;
|
char *device = NULL;
|
||||||
int fd, res = -1;
|
int fd, res = -1;
|
||||||
struct stat st;
|
struct stat st;
|
||||||
|
|
|
@ -1594,7 +1594,7 @@ NTSTATUS FILE_GetDeviceInfo( int fd, FILE_FS_DEVICE_INFORMATION *info )
|
||||||
info->DeviceType = FILE_DEVICE_DISK_FILE_SYSTEM;
|
info->DeviceType = FILE_DEVICE_DISK_FILE_SYSTEM;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
#elif defined(__FreeBSD__)
|
#elif defined(__FreeBSD__) || defined(__FreeBSD_kernel__)
|
||||||
struct statfs stfs;
|
struct statfs stfs;
|
||||||
|
|
||||||
/* The proper way to do this in FreeBSD seems to be with the
|
/* The proper way to do this in FreeBSD seems to be with the
|
||||||
|
|
|
@ -204,7 +204,7 @@ typedef struct trapframe SIGCONTEXT;
|
||||||
|
|
||||||
#endif /* bsdi */
|
#endif /* bsdi */
|
||||||
|
|
||||||
#if defined(__NetBSD__) || defined(__FreeBSD__) || defined(__OpenBSD__)
|
#if defined(__NetBSD__) || defined(__FreeBSD__) || defined(__FreeBSD_kernel__) || defined(__OpenBSD__)
|
||||||
|
|
||||||
typedef struct sigcontext SIGCONTEXT;
|
typedef struct sigcontext SIGCONTEXT;
|
||||||
|
|
||||||
|
@ -328,7 +328,7 @@ typedef ucontext_t SIGCONTEXT;
|
||||||
|
|
||||||
#endif /* __APPLE__ */
|
#endif /* __APPLE__ */
|
||||||
|
|
||||||
#if defined(linux) || defined(__NetBSD__) || defined(__FreeBSD__) ||\
|
#if defined(linux) || defined(__NetBSD__) || defined(__FreeBSD__) || defined(__FreeBSD_kernel__) ||\
|
||||||
defined(__OpenBSD__) || defined(__EMX__) || defined(__CYGWIN__)
|
defined(__OpenBSD__) || defined(__EMX__) || defined(__CYGWIN__)
|
||||||
|
|
||||||
#define EAX_sig(context) ((context)->sc_eax)
|
#define EAX_sig(context) ((context)->sc_eax)
|
||||||
|
@ -358,7 +358,7 @@ typedef ucontext_t SIGCONTEXT;
|
||||||
#define FAULT_ADDRESS ((void *)HANDLER_CONTEXT->cr2)
|
#define FAULT_ADDRESS ((void *)HANDLER_CONTEXT->cr2)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef __FreeBSD__
|
#if defined(__FreeBSD__) || defined(__FreeBSD_kernel__)
|
||||||
#define EFL_sig(context) ((context)->sc_efl)
|
#define EFL_sig(context) ((context)->sc_efl)
|
||||||
/* FreeBSD, see i386/i386/traps.c::trap_pfault va->err kludge */
|
/* FreeBSD, see i386/i386/traps.c::trap_pfault va->err kludge */
|
||||||
#define FAULT_ADDRESS ((void *)HANDLER_CONTEXT->sc_err)
|
#define FAULT_ADDRESS ((void *)HANDLER_CONTEXT->sc_err)
|
||||||
|
@ -1366,7 +1366,7 @@ static int set_handler( int sig, int have_sigaltstack, void (*func)() )
|
||||||
sigaddset( &sig_act.sa_mask, SIGUSR1 );
|
sigaddset( &sig_act.sa_mask, SIGUSR1 );
|
||||||
sigaddset( &sig_act.sa_mask, SIGUSR2 );
|
sigaddset( &sig_act.sa_mask, SIGUSR2 );
|
||||||
|
|
||||||
#if defined(linux) || defined(__NetBSD__) || defined(__FreeBSD__) || defined(__OpenBSD__)
|
#if defined(linux) || defined(__NetBSD__) || defined(__FreeBSD__) || defined(__FreeBSD_kernel__) || defined(__OpenBSD__)
|
||||||
sig_act.sa_flags = SA_RESTART;
|
sig_act.sa_flags = SA_RESTART;
|
||||||
#elif defined (__svr4__) || defined(_SCO_DS) || defined(__APPLE__)
|
#elif defined (__svr4__) || defined(_SCO_DS) || defined(__APPLE__)
|
||||||
sig_act.sa_flags = SA_SIGINFO | SA_RESTART;
|
sig_act.sa_flags = SA_SIGINFO | SA_RESTART;
|
||||||
|
|
|
@ -144,7 +144,7 @@
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
||||||
#ifdef __FreeBSD__
|
#if defined(__FreeBSD__) || defined(__FreeBSD_kernel__)
|
||||||
# define sipx_network sipx_addr.x_net
|
# define sipx_network sipx_addr.x_net
|
||||||
# define sipx_node sipx_addr.x_host.c_host
|
# define sipx_node sipx_addr.x_host.c_host
|
||||||
#endif /* __FreeBSD__ */
|
#endif /* __FreeBSD__ */
|
||||||
|
|
|
@ -109,7 +109,7 @@ static inline int set_thread_area( struct modify_ldt_s *ptr )
|
||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if defined(__NetBSD__) || defined(__FreeBSD__) || defined(__OpenBSD__)
|
#if defined(__NetBSD__) || defined(__FreeBSD__) || defined(__FreeBSD_kernel__) || defined(__OpenBSD__)
|
||||||
#include <machine/segments.h>
|
#include <machine/segments.h>
|
||||||
|
|
||||||
extern int i386_get_ldt(int, union descriptor *, int);
|
extern int i386_get_ldt(int, union descriptor *, int);
|
||||||
|
@ -203,7 +203,7 @@ static int internal_set_entry( unsigned short sel, const LDT_ENTRY *entry )
|
||||||
if ((ret = modify_ldt(0x11, &ldt_info, sizeof(ldt_info))) < 0)
|
if ((ret = modify_ldt(0x11, &ldt_info, sizeof(ldt_info))) < 0)
|
||||||
perror( "modify_ldt" );
|
perror( "modify_ldt" );
|
||||||
}
|
}
|
||||||
#elif defined(__NetBSD__) || defined(__FreeBSD__) || defined(__OpenBSD__)
|
#elif defined(__NetBSD__) || defined(__FreeBSD__) || defined(__FreeBSD_kernel__) || defined(__OpenBSD__)
|
||||||
{
|
{
|
||||||
LDT_ENTRY entry_copy = *entry;
|
LDT_ENTRY entry_copy = *entry;
|
||||||
/* The kernel will only let us set LDTs with user priority level */
|
/* The kernel will only let us set LDTs with user priority level */
|
||||||
|
|
|
@ -199,7 +199,7 @@ void *wine_anon_mmap( void *start, size_t size, int prot, int flags )
|
||||||
|
|
||||||
if (!(flags & MAP_FIXED))
|
if (!(flags & MAP_FIXED))
|
||||||
{
|
{
|
||||||
#ifdef __FreeBSD__
|
#if defined(__FreeBSD__) || defined(__FreeBSD_kernel__)
|
||||||
/* Even FreeBSD 5.3 does not properly support NULL here. */
|
/* Even FreeBSD 5.3 does not properly support NULL here. */
|
||||||
if( start == NULL ) start = (void *)0x110000;
|
if( start == NULL ) start = (void *)0x110000;
|
||||||
#endif
|
#endif
|
||||||
|
@ -283,7 +283,7 @@ void mmap_init(void)
|
||||||
{
|
{
|
||||||
struct reserved_area *area;
|
struct reserved_area *area;
|
||||||
struct list *ptr;
|
struct list *ptr;
|
||||||
#if defined(__i386__) && !defined(__FreeBSD__) /* commented out until FreeBSD gets fixed */
|
#if defined(__i386__) && !defined(__FreeBSD__) && !defined(__FreeBSD_kernel__) /* commented out until FreeBSD gets fixed */
|
||||||
char stack;
|
char stack;
|
||||||
char * const stack_ptr = &stack;
|
char * const stack_ptr = &stack;
|
||||||
char *user_space_limit = (char *)0x80000000;
|
char *user_space_limit = (char *)0x80000000;
|
||||||
|
|
|
@ -340,7 +340,7 @@ static void set_thread_context_ptrace( struct thread *thread, unsigned int flags
|
||||||
file_set_error();
|
file_set_error();
|
||||||
}
|
}
|
||||||
|
|
||||||
#elif defined(__FreeBSD__) || defined(__OpenBSD__) || defined(__NetBSD__)
|
#elif defined(__FreeBSD__) || defined(__FreeBSD_kernel__) || defined(__OpenBSD__) || defined(__NetBSD__)
|
||||||
#include <machine/reg.h>
|
#include <machine/reg.h>
|
||||||
|
|
||||||
/* retrieve a thread context */
|
/* retrieve a thread context */
|
||||||
|
|
Loading…
Reference in New Issue