From a5cc215f7582ab15d07a6fb5c92d0492ea986188 Mon Sep 17 00:00:00 2001 From: Corinna Vinschen Date: Fri, 27 Oct 2000 18:53:56 +0000 Subject: * autoload.cc: New file keeping all autoload stuff. * Makefile.in: Add autoload.o to dependencies. * dcrt0.cc: Move all autoload stuff to autoload.cc. * fhandler_mem.cc: Ditto. * net.cc: Ditto. * uinfo.cc: Ditto. --- winsup/cygwin/fhandler_mem.cc | 40 ---------------------------------------- 1 file changed, 40 deletions(-) (limited to 'winsup/cygwin/fhandler_mem.cc') diff --git a/winsup/cygwin/fhandler_mem.cc b/winsup/cygwin/fhandler_mem.cc index 5c9ed1ead..f313a02de 100644 --- a/winsup/cygwin/fhandler_mem.cc +++ b/winsup/cygwin/fhandler_mem.cc @@ -15,7 +15,6 @@ #include #include -#include "autoload.h" #include "cygerrno.h" #include "fhandler.h" #include "ntdll.h" @@ -402,42 +401,3 @@ fhandler_dev_mem::dump () { paranoid_printf("here, fhandler_dev_mem"); } - -extern "C" { - -LoadDLLinitfunc (ntdll) -{ - HANDLE h; - static NO_COPY LONG here = -1L; - - while (InterlockedIncrement (&here)) - { - InterlockedDecrement (&here); -small_printf ("Multiple tries to read ntdll.dll\n"); - Sleep (0); - } - - if (ntdll_handle) - /* nothing to do */; - else if ((h = LoadLibrary ("ntdll.dll")) != NULL) - ntdll_handle = h; - else if (!ntdll_handle) - api_fatal ("could not load ntdll.dll, %E"); - - InterlockedDecrement (&here); - return 0; -} - -static void dummy_autoload (void) __attribute__ ((unused)); -static void -dummy_autoload (void) -{ -LoadDLLinit (ntdll) -LoadDLLfuncEx (NtMapViewOfSection, 40, ntdll, 1) -LoadDLLfuncEx (NtOpenSection, 12, ntdll, 1) -LoadDLLfuncEx (NtQuerySystemInformation, 16, ntdll, 1) -LoadDLLfuncEx (NtUnmapViewOfSection, 8, ntdll, 1) -LoadDLLfuncEx (RtlInitUnicodeString, 8, ntdll, 1) -LoadDLLfuncEx (RtlNtStatusToDosError, 4, ntdll, 1) -} -} -- cgit v1.2.3