wine/ldtlib.c
Alexandre Julliard 121bd98c16 Release 0.1.0
WHAT'S NEW with version 0.1.0:
    - Integrated patches from Alexandre.
    - Minor bug fix in if1632.S

WHAT'S NEW with version 0.0.5:
    - Patches from Alexandre Julliard.  Some integration with Tcl.
    - Generic interface for callback procedures.  This will allow
      callbacks into DLLs.
    - MakeProcInstance() has been implemented but untested.

WHAT'S NEW with version 0.0.4:
    - Eric Youngdale modified wine.c and selector.c to allow loading
      of Windows DLLs.
    - Added global memory allocation routines (GlobalAlloc, GlobalFree,
      and GlobalLock)
    - Bitmap resource loading into global memory.
1993-07-08 17:37:25 +00:00

36 lines
931 B
C

static char RCSId[] = "$Id: ldtlib.c,v 1.2 1993/07/04 04:04:21 root Exp root $";
static char Copyright[] = "Copyright Robert J. Amstadt, 1993";
#include <stdio.h>
#include <stdlib.h>
#include <errno.h>
#include <linux/unistd.h>
#include <linux/head.h>
#include <linux/ldt.h>
_syscall2(int, modify_ldt, int, func, void *, ptr)
int
get_ldt(void *buffer)
{
return modify_ldt(0, buffer);
}
int
set_ldt_entry(int entry, unsigned long base, unsigned int limit,
int seg_32bit_flag, int contents, int read_only_flag,
int limit_in_pages_flag)
{
struct modify_ldt_ldt_s ldt_info;
ldt_info.entry_number = entry;
ldt_info.base_addr = base;
ldt_info.limit = limit;
ldt_info.seg_32bit = seg_32bit_flag;
ldt_info.contents = contents;
ldt_info.read_exec_only = read_only_flag;
ldt_info.limit_in_pages = limit_in_pages_flag;
return modify_ldt(1, &ldt_info);
}