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:
authorCorinna Vinschen <corinna@vinschen.de>2011-03-31 17:07:54 +0400
committerCorinna Vinschen <corinna@vinschen.de>2011-03-31 17:07:54 +0400
commit457ebe49599476f95a287aafbbe601991097642b (patch)
treef2de9da21179edb6e20efb8b2d5db042b9599196 /winsup/lsaauth
parent4cfefe7b791c0d400d694e0894359e915f8a12b8 (diff)
* cyglsa.c: Fix compilation with MinGW-w64 toolchains.
* make-64bit-version-with-mingw-w64.sh: New file. * cyglsa64.dll: Regenerate with MinGW-w64-gc.
Diffstat (limited to 'winsup/lsaauth')
-rw-r--r--winsup/lsaauth/ChangeLog6
-rw-r--r--winsup/lsaauth/cyglsa.c4
-rw-r--r--winsup/lsaauth/cyglsa64.dllbin8704 -> 8704 bytes
-rw-r--r--winsup/lsaauth/make-64bit-version-with-mingw-w64.sh25
4 files changed, 33 insertions, 2 deletions
diff --git a/winsup/lsaauth/ChangeLog b/winsup/lsaauth/ChangeLog
index 7e91cdbb6..671870602 100644
--- a/winsup/lsaauth/ChangeLog
+++ b/winsup/lsaauth/ChangeLog
@@ -1,3 +1,9 @@
+2011-03-30 Yaakov Selkowitz <yselkowitz@users.sourceforge.net>
+
+ * cyglsa.c: Fix compilation with MinGW-w64 toolchains.
+ * make-64bit-version-with-mingw-w64.sh: New file.
+ * cyglsa64.dll: Regenerate with MinGW-w64-gc.
+
2010-12-10 Illia Bobyr <Illia.Bobyr@ronin-capital.com>
* cyglsa-config: Unset GREP_OPTIONS when calling grep.
diff --git a/winsup/lsaauth/cyglsa.c b/winsup/lsaauth/cyglsa.c
index 4ebbd201b..b5a7a841c 100644
--- a/winsup/lsaauth/cyglsa.c
+++ b/winsup/lsaauth/cyglsa.c
@@ -1,6 +1,6 @@
/* cyglsa.c: LSA authentication module for Cygwin
- Copyright 2006, 2008, 2010 Red Hat, Inc.
+ Copyright 2006, 2008, 2010, 2011 Red Hat, Inc.
Written by Corinna Vinschen <corinna@vinschen.de>
@@ -19,7 +19,7 @@ Cygwin license. Please consult the file "CYGWIN_LICENSE" for details. */
#include <lmcons.h>
#include <iptypes.h>
#include <ntsecapi.h>
-#ifdef __MINGW32__
+#if defined(__MINGW32__) && !defined(_W64)
#include <ntddk.h>
#endif
#include "../cygwin/cyglsa.h"
diff --git a/winsup/lsaauth/cyglsa64.dll b/winsup/lsaauth/cyglsa64.dll
index 0af4de12f..f18404727 100644
--- a/winsup/lsaauth/cyglsa64.dll
+++ b/winsup/lsaauth/cyglsa64.dll
Binary files differ
diff --git a/winsup/lsaauth/make-64bit-version-with-mingw-w64.sh b/winsup/lsaauth/make-64bit-version-with-mingw-w64.sh
new file mode 100644
index 000000000..2f93c2cb2
--- /dev/null
+++ b/winsup/lsaauth/make-64bit-version-with-mingw-w64.sh
@@ -0,0 +1,25 @@
+#! /bin/sh
+# This script shows how to generate a 64 bit version of cyglsa.dll.
+# The 32 bit version will not work on 64 bit systems.
+#
+# Note that you need MinGW-w64 GCC, headers, and import libs. On Cygwin,
+# the required packages are: mingw64-x86_64-binutils, mingw64-x86_64-gcc-core,
+# mingw64-x86_64-headers, and mingw64-x86_64-runtime.
+#
+# Note that this is for building inside the source dir as not to interfere
+# with the "official" 32 bit build in the build directory.
+#
+# Install the dll into /bin and use the cyglsa-config script to register it.
+# Don't forget to reboot afterwards.
+#
+# Add "-DDEBUGGING" to CFLAGS below to create debugging output to
+# C:\cyglsa.dbgout at runtime.
+#
+set -e
+
+CC="x86_64-w64-mingw32-gcc"
+CFLAGS="-fno-exceptions -O0 -Wall -Werror"
+LDFLAGS="-s -nostdlib -Wl,--entry,DllMain,--major-os-version,5,--minor-os-version,2"
+LIBS="-ladvapi32 -lkernel32 -lntdll"
+
+$CC $CFLAGS $LDFLAGS -shared -o cyglsa64.dll cyglsa.c mslsa.def $LIBS