libwine: Add checks for DragonFly BSD.

This commit is contained in:
André Hentschel 2012-05-28 19:26:45 +02:00 committed by Alexandre Julliard
parent 1491e7b99c
commit e369e79bd5
2 changed files with 5 additions and 5 deletions

View File

@ -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
}

View File

@ -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);