From 75858e8a036c3746af4c93121823bfb2294a976b Mon Sep 17 00:00:00 2001 From: Christopher Faylor Date: Tue, 30 May 2000 00:38:51 +0000 Subject: * Makefile.in: Remove libadvapi32.a. * autoload.h: Add additional field to autoload block for handling unimplemented functions. (LoadDLLfuncEx): New function which accepts additional parameter for controlling unimplemented function behavior. (LoadDLLfunc): Use LoadDLLfuncEx. * dcrt0.cc: Use new arguments for LoadDLLfunc. Add advapi32 routines. (noload): Rewrite in assembler. Handle new unimplemented function type. * exceptions.cc: Eliminate another vestige of StackWalk stuff. * net.cc: Use new arguments for LoadDLLfunc. * uinfo.cc: Ditto. * config.h.in: Remove obsolete define. * path.h (isdrive): New macro. * dcrt0.cc (globify): Use new macro to determine if a string refers to an MS-DOS drive. * environ.cc (winenv): Ditto. * spawn.cc (find_exec): Ditto. * path.cc (get_raw_device_number): Ditto. (mount_info::conv_to_posix_path): Ditto. (chdir): Ditto. (cygwin_posix_path_list_p): Ditto. (cygwin_split_path): Ditto. (path_conv::check): Move tmp_buf to beginning of function since it can be used earlier in the loop. Use tmp_buf rather than 'root' to hold root information. (mount_info::conv_to_win32_path): Add trailing slash to end of mount path when it translates to a drive. Add defensive code to avoid writing beyond the end of 'dst'. --- winsup/cygwin/autoload.h | 20 +++++++++++++------- 1 file changed, 13 insertions(+), 7 deletions(-) (limited to 'winsup/cygwin/autoload.h') diff --git a/winsup/cygwin/autoload.h b/winsup/cygwin/autoload.h index 71a51c28b..be5aa164a 100644 --- a/winsup/cygwin/autoload.h +++ b/winsup/cygwin/autoload.h @@ -47,29 +47,35 @@ static int dllname ## _init () * So, immediately following the the call to one of the above routines * we have: * foojmp (4 bytes) Pointer to a word containing the routine used - * to eventually invokethe function. Initially + * to eventually invoke the function. Initially * points to an init function which loads the - * DLL, gets the processes load address, + * DLL, gets the process's load address, * changes the contents here to point to the * function address, and changes the call *(%eax) * to a jmp %eax. If the initialization has been * done, only the load part is done. * DLL handle (4 bytes) The handle to use when loading the DLL. + * flag (4 bytes) If "TRUE" then it is not a fatal error if this + * function cannot be found. Instead, error is set + * to ERROR_PROC_NOT_FOUND and 0 is returned. * func name (n bytes) asciz string containing the name of the function * to be loaded. */ -#define LoadDLLfunc(name, mangled, dllname) \ +#define LoadDLLmangle(name, n) #name "@" #n +#define LoadDLLfunc(name, n, dllname) LoadDLLfuncEx (name, n, dllname, 0) +#define LoadDLLfuncEx(name, n, dllname, notimp) \ __asm__ (".section .data_cygwin_nocopy,\"w\""); \ -__asm__ (".global _" #mangled); \ -__asm__ (".global _win32_" #mangled); \ +__asm__ (".global _" LoadDLLmangle (name, n)); \ +__asm__ (".global _win32_" LoadDLLmangle (name, n)); \ __asm__ (".align 8"); \ -__asm__ ("_" #mangled ":"); \ -__asm__ ("_win32_" #mangled ":"); \ +__asm__ ("_" LoadDLLmangle (name, n) ":"); \ +__asm__ ("_win32_" LoadDLLmangle (name, n) ":"); \ __asm__ ("movl (" #name "jump),%eax"); \ __asm__ ("call *(%eax)"); \ __asm__ (#name "jump: .long " #dllname "_init_holder"); \ __asm__ (" .long _" #dllname "_handle"); \ +__asm__ (" .long " #n "+" #notimp); \ __asm__ (".asciz \"" #name "\""); \ __asm__ (".text"); -- cgit v1.2.3