Commit e369e79b authored by André Hentschel's avatar André Hentschel Committed by Alexandre Julliard

libwine: Add checks for DragonFly BSD.

parent 1491e7b9
......@@ -87,7 +87,7 @@ static inline int set_thread_area( struct modify_ldt_s *ptr )
#endif
#endif
#if defined(__NetBSD__) || defined(__FreeBSD__) || defined(__FreeBSD_kernel__) || defined(__OpenBSD__)
#if defined(__NetBSD__) || defined(__FreeBSD__) || defined(__FreeBSD_kernel__) || defined(__OpenBSD__) || defined(__DragonFly__)
#include <machine/segments.h>
#include <machine/sysarch.h>
#endif /* __NetBSD__ || __FreeBSD__ || __OpenBSD__ */
......@@ -175,7 +175,7 @@ static int internal_set_entry( unsigned short sel, const LDT_ENTRY *entry )
if ((ret = modify_ldt(0x11, &ldt_info, sizeof(ldt_info))) < 0)
perror( "modify_ldt" );
}
#elif defined(__NetBSD__) || defined(__FreeBSD__) || defined(__FreeBSD_kernel__) || defined(__OpenBSD__)
#elif defined(__NetBSD__) || defined(__FreeBSD__) || defined(__FreeBSD_kernel__) || defined(__OpenBSD__) || defined(__DragonFly__)
{
LDT_ENTRY entry_copy = *entry;
/* The kernel will only let us set LDTs with user priority level */
......@@ -412,7 +412,7 @@ void wine_ldt_init_fs( unsigned short sel, const LDT_ENTRY *entry )
ldt_info.entry_number = sel >> 3;
fill_modify_ldt_struct( &ldt_info, entry );
if ((ret = set_thread_area( &ldt_info ) < 0)) perror( "set_thread_area" );
#elif defined(__FreeBSD__) || defined (__FreeBSD_kernel__)
#elif defined(__FreeBSD__) || defined (__FreeBSD_kernel__) || defined(__DragonFly__)
i386_set_fsbase( wine_ldt_get_base( entry ));
#endif
}
......
......@@ -205,7 +205,7 @@ void *wine_anon_mmap( void *start, size_t size, int prot, int flags )
if (!(flags & MAP_FIXED))
{
#if defined(__FreeBSD__) || defined(__FreeBSD_kernel__)
#if defined(__FreeBSD__) || defined(__FreeBSD_kernel__) || defined(__DragonFly__)
/* Even FreeBSD 5.3 does not properly support NULL here. */
if( start == NULL ) start = (void *)0x110000;
#endif
......@@ -377,7 +377,7 @@ void mmap_init(void)
char *base = stack_ptr - ((unsigned int)stack_ptr & granularity_mask) - (granularity_mask + 1);
if (base > user_space_limit) reserve_area( user_space_limit, base );
base = stack_ptr - ((unsigned int)stack_ptr & granularity_mask) + (granularity_mask + 1);
#if defined(linux) || defined(__FreeBSD__) || defined (__FreeBSD_kernel__)
#if defined(linux) || defined(__FreeBSD__) || defined (__FreeBSD_kernel__) || defined(__DragonFly__)
/* Heuristic: assume the stack is near the end of the address */
/* space, this avoids a lot of futile allocation attempts */
end = (char *)(((unsigned long)base + 0x0fffffff) & 0xf0000000);
......
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