wine/ldtlib.c
Alexandre Julliard 2c25c3e944 Release 0.0.2
WHAT'S NEW with version 0.0.2:

    - Again thanks to Eric Youngdale for some very useful comments.
    - The Windows startup code created by Micrsoft C 7.0 now runs 
      to completion.
    - Added a new patch to the kernel to increase the usable size of
      the ldt to the full 32 entries currently allowed.
    - Imported name relocations are now supported.
    - Source code for my infamous test program is now included.
    - A handful of basic Windows functions are now emulated.  See
      "kernel.spec" for examples of how to use the build program.

WHAT'S NEW with version 0.0.1:

    - Eric Youngdale contributed countless improvements in memory
      efficiency, bug fixes, and relocation.
    - The build program has been completed.  It now lets you specify
      how the main DLL entry point should interface to your emulation
      library routines.  A brief description of how to build these
      specifications is included in the file "build-spec.txt".
    - The code to dispatch builtin DLL calls is complete, but untested.
1993-06-29 16:33:12 +00:00

38 lines
842 B
C

/* $Id$
*/
/*
* 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);
}