diff options
author | Christopher Faylor <me@cgf.cx> | 2000-06-01 09:57:54 +0400 |
---|---|---|
committer | Christopher Faylor <me@cgf.cx> | 2000-06-01 09:57:54 +0400 |
commit | 51859b536e5dbb578842dfdb7646644f4f1abf9e (patch) | |
tree | cc9069fa2ef3e9986953e2f6dd02fedfbae95908 | |
parent | b55cc8426622fef0cb86fe3240e4f132890ddeab (diff) |
* exceptions.cc: Remove unneeded include.
* dcrt0.cc: Wrap LoadDLLfunc stuff in dummy function.
* init.cc: Ditto.
* uinfo.cc: Ditto.
-rw-r--r-- | winsup/cygwin/ChangeLog | 7 | ||||
-rw-r--r-- | winsup/cygwin/Makefile.in | 4 | ||||
-rw-r--r-- | winsup/cygwin/autoload.h | 6 | ||||
-rw-r--r-- | winsup/cygwin/dcrt0.cc | 31 | ||||
-rw-r--r-- | winsup/cygwin/exceptions.cc | 3 | ||||
-rw-r--r-- | winsup/cygwin/net.cc | 7 | ||||
-rw-r--r-- | winsup/cygwin/uinfo.cc | 9 |
7 files changed, 40 insertions, 27 deletions
diff --git a/winsup/cygwin/ChangeLog b/winsup/cygwin/ChangeLog index 51aa7048d..217631667 100644 --- a/winsup/cygwin/ChangeLog +++ b/winsup/cygwin/ChangeLog @@ -1,6 +1,9 @@ -Thu Jun 1 01:40:20 2000 Christopher Faylor <cgf@cygnus.com> +Thu Jun 1 01:55:45 2000 Christopher Faylor <cgf@cygnus.com> - * autoload.h: Put each info block in its own dummy static function. + * exceptions.cc: Remove unneeded include. + * dcrt0.cc: Wrap LoadDLLfunc stuff in dummy function. + * init.cc: Ditto. + * uinfo.cc: Ditto. 2000-05-31 DJ Delorie <dj@cygnus.com> diff --git a/winsup/cygwin/Makefile.in b/winsup/cygwin/Makefile.in index d7a23c492..a503bce02 100644 --- a/winsup/cygwin/Makefile.in +++ b/winsup/cygwin/Makefile.in @@ -281,7 +281,7 @@ dll_init.o: $(WINSUP_H) include/exceptions.h dll_init.h dll_main.o: environ.o: $(WINSUP_H) errno.o: $(WINSUP_H) -exceptions.o: $(WINSUP_H) include/exceptions.h sync.h autoload.h +exceptions.o: $(WINSUP_H) include/exceptions.h sync.h exec.o: $(WINSUP_H) external.o: $(WINSUP_H) fcntl.o: $(WINSUP_H) @@ -338,7 +338,7 @@ termios.o: $(WINSUP_H) test.o: $(WINSUP_H) times.o: $(WINSUP_H) tty.o: $(WINSUP_H) -uinfo.o: $(WINSUP_H) +uinfo.o: $(WINSUP_H) autoload.h uname.o: $(WINSUP_H) wait.o: $(WINSUP_H) window.o: $(WINSUP_H) diff --git a/winsup/cygwin/autoload.h b/winsup/cygwin/autoload.h index 9220e24b5..89f9eb066 100644 --- a/winsup/cygwin/autoload.h +++ b/winsup/cygwin/autoload.h @@ -65,10 +65,6 @@ static int dllname ## _init () #define LoadDLLmangle(name, n) #name "@" #n #define LoadDLLfunc(name, n, dllname) LoadDLLfuncEx (name, n, dllname, 0) #define LoadDLLfuncEx(name, n, dllname, notimp) \ -extern "C" { \ -static void name##_dummy () __attribute__ ((noreturn)) __attribute__ ((unused)) __attribute__ ((stdcall)); \ -static void name##_dummy () \ -{ \ __asm__ (".section .data_cygwin_nocopy,\"w\""); \ __asm__ (".global _" LoadDLLmangle (name, n)); \ __asm__ (".global _win32_" LoadDLLmangle (name, n)); \ @@ -82,7 +78,5 @@ __asm__ (" .long _" #dllname "_handle"); \ __asm__ (" .long " #n "+" #notimp); \ __asm__ (".asciz \"" #name "\""); \ __asm__ (".text"); \ -} \ -} extern "C" void cygwin_dll_func_load () __asm__ ("cygwin_dll_func_load"); diff --git a/winsup/cygwin/dcrt0.cc b/winsup/cygwin/dcrt0.cc index 335e5bfe5..c77324f9d 100644 --- a/winsup/cygwin/dcrt0.cc +++ b/winsup/cygwin/dcrt0.cc @@ -1039,7 +1039,6 @@ gotit: movl %eax,(%ecx) # Point dispatch to address loaded above jmp *%eax "); -} LoadDLLinitfunc (user32) { @@ -1053,6 +1052,22 @@ LoadDLLinitfunc (user32) return 0; /* Already done by another thread? */ } +LoadDLLinitfunc (advapi32) +{ + HANDLE h; + + if ((h = LoadLibrary ("advapi32.dll")) != NULL) + advapi32_handle = h; + else if (!advapi32_handle) + api_fatal ("could not load advapi32.dll, %E"); + + return 0; /* Already done by another thread? */ +} + +static void dummy_autoload (void) __attribute__ ((unused)); +static void +dummy_autoload (void) +{ LoadDLLinit (user32) LoadDLLfunc (CharToOemA, 8, user32) LoadDLLfunc (CreateWindowExA, 48, user32) @@ -1076,18 +1091,6 @@ LoadDLLfunc (SendMessageA, 16, user32) LoadDLLfunc (SetTimer, 16, user32) LoadDLLfunc (SetUserObjectSecurity, 12, user32) -LoadDLLinitfunc (advapi32) -{ - HANDLE h; - - if ((h = LoadLibrary ("advapi32.dll")) != NULL) - advapi32_handle = h; - else if (!advapi32_handle) - api_fatal ("could not load advapi32.dll, %E"); - - return 0; /* Already done by another thread? */ -} - LoadDLLinit (advapi32) LoadDLLfunc (AddAccessAllowedAce, 16, advapi32) LoadDLLfunc (AddAccessDeniedAce, 16, advapi32) @@ -1132,3 +1135,5 @@ LoadDLLfunc (SetKernelObjectSecurity, 12, advapi32) LoadDLLfunc (SetSecurityDescriptorDacl, 16, advapi32) LoadDLLfunc (SetSecurityDescriptorGroup, 12, advapi32) LoadDLLfunc (SetSecurityDescriptorOwner, 12, advapi32) +} +} diff --git a/winsup/cygwin/exceptions.cc b/winsup/cygwin/exceptions.cc index 376367432..283faaabd 100644 --- a/winsup/cygwin/exceptions.cc +++ b/winsup/cygwin/exceptions.cc @@ -14,10 +14,7 @@ details. */ #define Win32_Winsock #include "winsup.h" #include "exceptions.h" -#undef DECLSPEC_IMPORT -#define DECLSPEC_IMPORT #include <imagehlp.h> -#include "autoload.h" char debugger_command[2 * MAX_PATH + 20]; diff --git a/winsup/cygwin/net.cc b/winsup/cygwin/net.cc index 0f9e38a87..bc26b4cf1 100644 --- a/winsup/cygwin/net.cc +++ b/winsup/cygwin/net.cc @@ -1782,6 +1782,7 @@ fhandler_socket::ioctl (unsigned int cmd, void *p) return res; } +extern "C" { /* Initialize WinSock */ LoadDLLinitfunc (wsock32) { @@ -1815,6 +1816,10 @@ LoadDLLinitfunc (wsock32) LoadDLLinit (wsock32) +static void dummy_autoload (void) __attribute__ ((unused)); +static void +dummy_autoload (void) +{ LoadDLLfunc (WSAAsyncSelect, 16, wsock32) LoadDLLfunc (WSACleanup, 0, wsock32) LoadDLLfunc (WSAGetLastError, 0, wsock32) @@ -1850,3 +1855,5 @@ LoadDLLfunc (sendto, 24, wsock32) LoadDLLfunc (setsockopt, 20, wsock32) LoadDLLfunc (shutdown, 8, wsock32) LoadDLLfunc (socket, 12, wsock32) +} +} diff --git a/winsup/cygwin/uinfo.cc b/winsup/cygwin/uinfo.cc index 5305527ed..90bb72727 100644 --- a/winsup/cygwin/uinfo.cc +++ b/winsup/cygwin/uinfo.cc @@ -179,6 +179,7 @@ cuserid (char *src) } } +extern "C" { LoadDLLinitfunc (netapi32) { HANDLE h; @@ -189,8 +190,14 @@ LoadDLLinitfunc (netapi32) api_fatal ("could not load netapi32.dll. %d", GetLastError ()); return 0; } + +static void dummy_autoload (void) __attribute__ ((unused)); +static void +dummy_autoload (void) +{ LoadDLLinit (netapi32) LoadDLLfunc (NetWkstaUserGetInfo, 12, netapi32) LoadDLLfunc (NetGetDCName, 12, netapi32) LoadDLLfunc (NetApiBufferFree, 4, netapi32) - +} +} |