Welcome to mirror list, hosted at ThFree Co, Russian Federation.

cygwin.com/git/newlib-cygwin.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristopher Faylor <me@cgf.cx>2012-11-28 07:22:36 +0400
committerChristopher Faylor <me@cgf.cx>2012-11-28 07:22:36 +0400
commit29413f0630f13279a938d68c11a36e8c137538f5 (patch)
treede741a514c3719ede7ecf7afbba4de1e0f3e6768 /winsup/utils/loadlib.h
parent66444a6b4036ddd31483c106ad9854e24a3ed76a (diff)
* Makefile.in: Move CFLAGS and CXXFLAGS so that they can be manipulated by
Makefile.common. Add -static-libstdc++ to *LDFLAGS. Add dependencies for loadlib.h. * loadlib.h: Update copyright. (_load_sys_library): Properly define set_dll_library as WINAPI to avoid stack corruption.
Diffstat (limited to 'winsup/utils/loadlib.h')
-rw-r--r--winsup/utils/loadlib.h8
1 files changed, 4 insertions, 4 deletions
diff --git a/winsup/utils/loadlib.h b/winsup/utils/loadlib.h
index b2da8c76d..34ed1277d 100644
--- a/winsup/utils/loadlib.h
+++ b/winsup/utils/loadlib.h
@@ -1,6 +1,6 @@
/* loadlib.h
- Copyright 2010, 2011 Red Hat, Inc.
+ Copyright 2010, 2011, 2012 Red Hat, Inc.
This file is part of Cygwin.
@@ -23,7 +23,7 @@ static HMODULE _load_sys_library (const wchar_t *dll) __attribute__ ((used));
static HMODULE
_load_sys_library (const wchar_t *dll)
{
- static BOOL (*set_dll_directory)(LPCWSTR);
+ static BOOL WINAPI (*set_dll_directory)(LPCWSTR);
static WCHAR sysdir[MAX_PATH];
static UINT sysdir_len;
@@ -39,10 +39,10 @@ _load_sys_library (const wchar_t *dll)
{
HMODULE k32 = GetModuleHandleW (L"kernel32.dll");
if (k32)
- set_dll_directory = (BOOL (*)(LPCWSTR))
+ set_dll_directory = (BOOL WINAPI (*)(LPCWSTR))
GetProcAddress (k32, "SetDllDirectoryW");
if (!set_dll_directory)
- set_dll_directory = (BOOL (*)(LPCWSTR)) -1;
+ set_dll_directory = (BOOL WINAPI (*)(LPCWSTR)) -1;
else
set_dll_directory (L"");
}