aboutsummaryrefslogtreecommitdiff
path: root/xorg-server
diff options
context:
space:
mode:
Diffstat (limited to 'xorg-server')
-rw-r--r--xorg-server/configure.ac15
-rw-r--r--xorg-server/hw/xfree86/Makefile.am4
-rw-r--r--xorg-server/hw/xwin/glx/Makefile.am4
-rw-r--r--xorg-server/include/dix-config.h.in3
-rw-r--r--xorg-server/os/xsha1.c42
-rw-r--r--xorg-server/xkeyboard-config/rules/base.xml.in6
-rw-r--r--xorg-server/xkeyboard-config/symbols/de15
-rw-r--r--xorg-server/xkeyboard-config/symbols/it4
8 files changed, 86 insertions, 7 deletions
diff --git a/xorg-server/configure.ac b/xorg-server/configure.ac
index 6a41ea83f..97ceab1b8 100644
--- a/xorg-server/configure.ac
+++ b/xorg-server/configure.ac
@@ -1355,7 +1355,7 @@ CORE_INCS='-I$(top_srcdir)/include -I$(top_builddir)/include'
# SHA1 hashing
AC_ARG_WITH([sha1],
- [AS_HELP_STRING([--with-sha1=libc|libmd|libgcrypt|libcrypto|libsha1|CommonCrypto],
+ [AS_HELP_STRING([--with-sha1=libc|libmd|libgcrypt|libcrypto|libsha1|CommonCrypto|CryptoAPI],
[choose SHA1 implementation])])
AC_CHECK_FUNC([SHA1Init], [HAVE_SHA1_IN_LIBC=yes])
if test "x$with_sha1" = x && test "x$HAVE_SHA1_IN_LIBC" = xyes; then
@@ -1381,6 +1381,19 @@ if test "x$with_sha1" = xCommonCrypto; then
[Use CommonCrypto SHA1 functions])
SHA1_LIBS=""
fi
+dnl stdcall functions cannot be tested with AC_CHECK_LIB
+AC_CHECK_HEADER([wincrypt.h], [HAVE_SHA1_IN_CRYPTOAPI=yes], [], [#include <windows.h>])
+if test "x$with_sha1" = x && test "x$HAVE_SHA1_IN_CRYPTOAPI" = xyes; then
+ with_sha1=CryptoAPI
+fi
+if test "x$with_sha1" = xCryptoAPI && test "x$HAVE_SHA1_IN_CRYPTOAPI" != xyes; then
+ AC_MSG_ERROR([CryptoAPI requested but not found])
+fi
+if test "x$with_sha1" = xCryptoAPI; then
+ AC_DEFINE([HAVE_SHA1_IN_CRYPTOAPI], [1],
+ [Use CryptoAPI SHA1 functions])
+ SHA1_LIBS=""
+fi
AC_CHECK_LIB([md], [SHA1Init], [HAVE_LIBMD=yes])
if test "x$with_sha1" = x && test "x$HAVE_LIBMD" = xyes; then
with_sha1=libmd
diff --git a/xorg-server/hw/xfree86/Makefile.am b/xorg-server/hw/xfree86/Makefile.am
index d61c6401b..e50cb88c2 100644
--- a/xorg-server/hw/xfree86/Makefile.am
+++ b/xorg-server/hw/xfree86/Makefile.am
@@ -106,13 +106,13 @@ xorg.conf.example: xorgconf.cpp
$(AM_V_GEN)$(SED) $(CONF_SUBSTS) < $(srcdir)/xorgconf.cpp > $@
relink:
- $(AM_V_at)rm -f Xorg && $(MAKE) Xorg
+ $(AM_V_at)rm -f Xorg$(EXEEXT) && $(MAKE) Xorg$(EXEEXT)
CLEANFILES = sdksyms.c sdksyms.dep
EXTRA_DIST += sdksyms.sh
sdksyms.dep sdksyms.c: sdksyms.sh
- CPP='$(CPP)' AWK='$(AWK)' $(SHELL) $(srcdir)/sdksyms.sh $(top_srcdir) $(CFLAGS) $(AM_CFLAGS) $(INCLUDES)
+ $(AM_V_GEN)CPP='$(CPP)' AWK='$(AWK)' $(SHELL) $(srcdir)/sdksyms.sh $(top_srcdir) $(CFLAGS) $(AM_CFLAGS) $(INCLUDES)
SDKSYMS_DEP = sdksyms.dep
include $(SDKSYMS_DEP)
diff --git a/xorg-server/hw/xwin/glx/Makefile.am b/xorg-server/hw/xwin/glx/Makefile.am
index 6b840bacb..7222a9f21 100644
--- a/xorg-server/hw/xwin/glx/Makefile.am
+++ b/xorg-server/hw/xwin/glx/Makefile.am
@@ -32,10 +32,10 @@ AM_CFLAGS = -DHAVE_XWIN_CONFIG_H $(DIX_CFLAGS) \
if XWIN_GLX_WINDOWS
generated_gl_wrappers.c: gen_gl_wrappers.py $(KHRONOS_SPEC_DIR)/gl.spec $(KHRONOS_SPEC_DIR)/gl.tm
- $(srcdir)/gen_gl_wrappers.py --spec=$(KHRONOS_SPEC_DIR)/gl.spec --typemap=$(KHRONOS_SPEC_DIR)/gl.tm --dispatch-header=$(top_srcdir)/glx/dispatch.h --staticwrappers >generated_gl_wrappers.c
+ $(AM_V_GEN)$(srcdir)/gen_gl_wrappers.py --spec=$(KHRONOS_SPEC_DIR)/gl.spec --typemap=$(KHRONOS_SPEC_DIR)/gl.tm --dispatch-header=$(top_srcdir)/glx/dispatch.h --staticwrappers >generated_gl_wrappers.c
generated_wgl_wrappers.c: gen_gl_wrappers.py $(KHRONOS_SPEC_DIR)/wglext.spec $(KHRONOS_SPEC_DIR)/wgl.tm
- $(srcdir)/gen_gl_wrappers.py --spec=$(KHRONOS_SPEC_DIR)/wglext.spec --typemap=$(KHRONOS_SPEC_DIR)/wgl.tm --prefix=wgl --preresolve >generated_wgl_wrappers.c
+ $(AM_V_GEN)$(srcdir)/gen_gl_wrappers.py --spec=$(KHRONOS_SPEC_DIR)/wglext.spec --typemap=$(KHRONOS_SPEC_DIR)/wgl.tm --prefix=wgl --preresolve >generated_wgl_wrappers.c
endif
BUILT_SOURCES = generated_gl_wrappers.c generated_wgl_wrappers.c
diff --git a/xorg-server/include/dix-config.h.in b/xorg-server/include/dix-config.h.in
index 3fb641367..3c9bbafeb 100644
--- a/xorg-server/include/dix-config.h.in
+++ b/xorg-server/include/dix-config.h.in
@@ -148,6 +148,9 @@
/* Define to use CommonCrypto SHA1 functions */
#undef HAVE_SHA1_IN_COMMONCRYPTO
+/* Define to use CryptoAPI SHA1 functions */
+#undef HAVE_SHA1_IN_CRYPTOAPI
+
/* Define to use libmd SHA1 functions */
#undef HAVE_SHA1_IN_LIBMD
diff --git a/xorg-server/os/xsha1.c b/xorg-server/os/xsha1.c
index dccce74b6..fa66c7a06 100644
--- a/xorg-server/os/xsha1.c
+++ b/xorg-server/os/xsha1.c
@@ -74,6 +74,48 @@ x_sha1_final(void *ctx, unsigned char result[20])
return 1;
}
+#elif defined(HAVE_SHA1_IN_CRYPTOAPI) /* Use CryptoAPI for SHA1 */
+
+#define WIN32_LEAN_AND_MEAN
+#include <X11/Xwindows.h>
+#include <wincrypt.h>
+
+static HCRYPTPROV hProv;
+
+void *
+x_sha1_init(void)
+{
+ HCRYPTHASH *ctx = malloc(sizeof(*ctx));
+
+ if (!ctx)
+ return NULL;
+ CryptAcquireContext(&hProv, NULL, MS_DEF_PROV, PROV_RSA_FULL, CRYPT_VERIFYCONTEXT);
+ CryptCreateHash(hProv, CALG_SHA1, 0, 0, ctx);
+ return ctx;
+}
+
+int
+x_sha1_update(void *ctx, void *data, int size)
+{
+ HCRYPTHASH *hHash = ctx;
+
+ CryptHashData(*hHash, data, size, 0);
+ return 1;
+}
+
+int
+x_sha1_final(void *ctx, unsigned char result[20])
+{
+ HCRYPTHASH *hHash = ctx;
+ DWORD len = 20;
+
+ CryptGetHashParam(*hHash, HP_HASHVAL, result, &len, 0);
+ CryptDestroyHash(*hHash);
+ CryptReleaseContext(hProv, 0);
+ free(ctx);
+ return 1;
+}
+
#elif defined(HAVE_SHA1_IN_LIBGCRYPT) /* Use libgcrypt for SHA1 */
#include <gcrypt.h>
diff --git a/xorg-server/xkeyboard-config/rules/base.xml.in b/xorg-server/xkeyboard-config/rules/base.xml.in
index d9883f1ae..e0c1b4e58 100644
--- a/xorg-server/xkeyboard-config/rules/base.xml.in
+++ b/xorg-server/xkeyboard-config/rules/base.xml.in
@@ -3148,6 +3148,12 @@
</variant>
<variant>
<configItem>
+ <name>qwerty</name>
+ <_description>German (qwerty)</_description>
+ </configItem>
+ </variant>
+ <variant>
+ <configItem>
<name>ru</name>
<_description>Russian (Germany, phonetic)</_description>
<languageList>
diff --git a/xorg-server/xkeyboard-config/symbols/de b/xorg-server/xkeyboard-config/symbols/de
index 4a04cadae..5e412f6a0 100644
--- a/xorg-server/xkeyboard-config/symbols/de
+++ b/xorg-server/xkeyboard-config/symbols/de
@@ -484,6 +484,21 @@ xkb_symbols "dsb_qwertz"
key <AD09> { [ o, O, oacute, Oacute ] };
};
+partial alphanumeric_keys
+xkb_symbols "qwerty" {
+
+ // This layout should work exactly as a de with the exception
+ // of 'Z' and 'Y' keys, which are in the qwerty style (ie. swapped).
+ // 2008 by Matej Košík <kosik@fiit.stuba.sk>
+
+ include "de(basic)"
+
+ name[Group1] = "German (qwerty)";
+
+ key <AB01> { [ z, Z, leftarrow, yen ] };
+ key <AD06> { [ y, Y, guillemotleft, less ] };
+};
+
// layout for Russian letters on an german keyboard
// based on US-RU layout by Ivan Popov <pin@konvalo.org> 2005-07-17
// adopted for german layout by Alexey Fisher <bug-track@fisher-privat.net> 2010-08-19
diff --git a/xorg-server/xkeyboard-config/symbols/it b/xorg-server/xkeyboard-config/symbols/it
index 90fb7f5c9..1d26a044b 100644
--- a/xorg-server/xkeyboard-config/symbols/it
+++ b/xorg-server/xkeyboard-config/symbols/it
@@ -175,9 +175,9 @@ xkb_symbols "olpc" {
partial alphanumeric_keys modifier_keys
xkb_symbols "us" {
- name[Group1]= "Italian (US keyboard with Italian letters)";
-
include "us(euro)"
+
+ name[Group1]= "Italian (US keyboard with Italian letters)";
// Alphanumeric section