xserver: Branch 'master' - 3 commits
Adam Jackson
ajax at kemper.freedesktop.org
Tue Jan 16 21:10:03 UTC 2018
configure.ac | 2 --
hw/xfree86/x86emu/debug.c | 16 ++++++----------
hw/xfree86/x86emu/x86emu/debug.h | 7 +++----
include/dix-config.h.in | 9 ---------
include/meson.build | 4 +---
meson_options.txt | 1 +
os/meson.build | 4 ++++
7 files changed, 15 insertions(+), 28 deletions(-)
New commits:
commit 15d91df47424127b9e8d0d73692e2196c79dd3fe
Author: Adam Jackson <ajax at redhat.com>
Date: Wed Jan 10 12:07:41 2018 -0500
x86emu: Teach the debug code about varargs
With -Wformat-nonliteral and a debug build you'd get yelled at here:
../hw/xfree86/x86emu/x86emu/debug.h:188:9: warning: format not a string literal, argument types not checked [-Wformat-nonliteral]
To fix this, rewrite the printf code to actually use varargs and the
appropriate format attribute. All callers of DECODE_PRINTF() pass a
string with no % specifiers, so we pass that as the argument to
printf("%s"). For DECODE_PRINTF2() we just pass the args through.
Signed-off-by: Adam Jackson <ajax at redhat.com>
Reviewed-by: Eric Anholt <eric at anholt.net>
diff --git a/hw/xfree86/x86emu/debug.c b/hw/xfree86/x86emu/debug.c
index 72a06ffb8..576ace55e 100644
--- a/hw/xfree86/x86emu/debug.c
+++ b/hw/xfree86/x86emu/debug.c
@@ -40,8 +40,8 @@
#include "x86emu/x86emui.h"
#include <stdio.h>
#include <string.h>
-#ifndef NO_SYS_HEADERS
#include <stdarg.h>
+#ifndef NO_SYS_HEADERS
#include <stdlib.h>
#endif
@@ -174,18 +174,14 @@ x86emu_inc_decoded_inst_len(int x)
}
void
-x86emu_decode_printf(const char *x)
-{
- sprintf(M.x86.decoded_buf + M.x86.enc_str_pos, "%s", x);
- M.x86.enc_str_pos += strlen(x);
-}
-
-void
-x86emu_decode_printf2(const char *x, int y)
+x86emu_decode_printf(const char *x, ...)
{
+ va_list ap;
char temp[100];
- snprintf(temp, sizeof(temp), x, y);
+ va_start(ap, x);
+ vsnprintf(temp, sizeof(temp), x, ap);
+ va_end(ap);
sprintf(M.x86.decoded_buf + M.x86.enc_str_pos, "%s", temp);
M.x86.enc_str_pos += strlen(temp);
}
diff --git a/hw/xfree86/x86emu/x86emu/debug.h b/hw/xfree86/x86emu/x86emu/debug.h
index 385b804dd..1f04b7b65 100644
--- a/hw/xfree86/x86emu/x86emu/debug.h
+++ b/hw/xfree86/x86emu/x86emu/debug.h
@@ -102,9 +102,9 @@
#ifdef DEBUG
#define DECODE_PRINTF(x) if (DEBUG_DECODE()) \
- x86emu_decode_printf(x)
+ x86emu_decode_printf("%s",x)
#define DECODE_PRINTF2(x,y) if (DEBUG_DECODE()) \
- x86emu_decode_printf2(x,y)
+ x86emu_decode_printf(x,y)
/*
* The following allow us to look at the bytes of an instruction. The
@@ -189,8 +189,7 @@ extern "C" { /* Use "C" linkage when in C++ mode */
#endif
extern void x86emu_inc_decoded_inst_len(int x);
- extern void x86emu_decode_printf(const char *x);
- extern void x86emu_decode_printf2(const char *x, int y);
+ extern void x86emu_decode_printf(const char *x, ...) _X_ATTRIBUTE_PRINTF(1,2);
extern void x86emu_just_disassemble(void);
extern void x86emu_single_step(void);
extern void x86emu_end_instr(void);
commit 1274015186a8457c38c3b5dcc9965c62f1d2a7a6
Author: Adam Jackson <ajax at redhat.com>
Date: Mon Jan 8 15:50:29 2018 -0500
build: Remove <*dbm.h> checks
Formerly used by the rgb database code, which hasn't been a thing in
over a decade.
Reviewed-by: Eric Anholt <eric at anholt.net>
Signed-off-by: Adam Jackson <ajax at redhat.com>
diff --git a/configure.ac b/configure.ac
index 30b4b383d..512bc9e9e 100644
--- a/configure.ac
+++ b/configure.ac
@@ -190,8 +190,6 @@ dnl Find the math libary, then check for cbrt function in it.
AC_CHECK_LIB(m, sqrt)
AC_CHECK_FUNCS([cbrt])
-AC_CHECK_HEADERS([ndbm.h dbm.h rpcsvc/dbm.h])
-
dnl AGPGART headers
AC_CHECK_HEADERS([linux/agpgart.h sys/agpio.h sys/agpgart.h], AGP=yes)
AM_CONDITIONAL(AGP, [test "x$AGP" = xyes])
diff --git a/include/dix-config.h.in b/include/dix-config.h.in
index 8bce0e07b..44a29a69a 100644
--- a/include/dix-config.h.in
+++ b/include/dix-config.h.in
@@ -66,9 +66,6 @@
/* Define to 1 if you have the `cbrt' function. */
#undef HAVE_CBRT
-/* Define to 1 if you have the <dbm.h> header file. */
-#undef HAVE_DBM_H
-
/* Define to 1 if you have the declaration of `program_invocation_short_name', and
to 0 if you don't. */
#undef HAVE_DECL_PROGRAM_INVOCATION_SHORT_NAME
@@ -146,18 +143,12 @@
/* Define to 1 if you have the function pthread_setname_np(pthread_t, const char*) */
#undef HAVE_PTHREAD_SETNAME_NP_WITH_TID
-/* Define to 1 if you have the <ndbm.h> header file. */
-#undef HAVE_NDBM_H
-
/* Define to 1 if you have the <ndir.h> header file, and it defines `DIR'. */
#undef HAVE_NDIR_H
/* Define to 1 if you have the `reallocarray' function. */
#undef HAVE_REALLOCARRAY
-/* Define to 1 if you have the <rpcsvc/dbm.h> header file. */
-#undef HAVE_RPCSVC_DBM_H
-
/* Define to 1 if you have the `arc4random_buf' function. */
#undef HAVE_ARC4RANDOM_BUF
diff --git a/include/meson.build b/include/meson.build
index d6ec0d7cd..c7830ef73 100644
--- a/include/meson.build
+++ b/include/meson.build
@@ -92,14 +92,11 @@ conf_data.set('XORG_VERSION_CURRENT', release)
conf_data.set('HASXDMAUTH', get_option('xdm-auth-1'))
conf_data.set('SECURE_RPC', get_option('secure-rpc'))
-conf_data.set('HAVE_DBM_H', cc.has_header('dbm.h'))
conf_data.set('HAVE_DLFCN_H', cc.has_header('dlfcn.h'))
conf_data.set('HAVE_EXECINFO_H', cc.has_header('execinfo.h'))
conf_data.set('HAVE_FCNTL_H', cc.has_header('fcntl.h'))
conf_data.set('HAVE_FNMATCH_H', cc.has_header('fnmatch.h'))
conf_data.set('HAVE_LINUX_AGPGART_H', cc.has_header('linux/agpgart.h'))
-conf_data.set('HAVE_NDBM_H', cc.has_header('ndbm.h'))
-conf_data.set('HAVE_RPCSVC_DBM_H', cc.has_header('rpcsvc/dbm.h'))
conf_data.set('HAVE_STDLIB_H', cc.has_header('stdlib.h'))
conf_data.set('HAVE_STRING_H', cc.has_header('string.h'))
conf_data.set('HAVE_STRINGS_H', cc.has_header('strings.h'))
commit c3fbe2bbff19c67179f52b8dcd27b576a958fde7
Author: Adam Jackson <ajax at redhat.com>
Date: Mon Jan 8 15:50:28 2018 -0500
meson: Enable SUN-DES-1 auth code
Signed-off-by: Adam Jackson <ajax at redhat.com>
Reviewed-by: Eric Anholt <eric at anholt.net>
diff --git a/include/meson.build b/include/meson.build
index 216744ca2..d6ec0d7cd 100644
--- a/include/meson.build
+++ b/include/meson.build
@@ -90,6 +90,7 @@ conf_data.set_quoted('SYSCONFDIR', join_paths(get_option('prefix'), get_option('
conf_data.set('XORG_VERSION_CURRENT', release)
conf_data.set('HASXDMAUTH', get_option('xdm-auth-1'))
+conf_data.set('SECURE_RPC', get_option('secure-rpc'))
conf_data.set('HAVE_DBM_H', cc.has_header('dbm.h'))
conf_data.set('HAVE_DLFCN_H', cc.has_header('dlfcn.h'))
diff --git a/meson_options.txt b/meson_options.txt
index d1341ede2..294279a5d 100644
--- a/meson_options.txt
+++ b/meson_options.txt
@@ -25,6 +25,7 @@ option('module_dir', type: 'string',
option('glx', type: 'boolean', value: true)
option('xdmcp', type: 'boolean', value: true)
option('xdm-auth-1', type: 'boolean', value: true)
+option('secure-rpc', type: 'boolean', value: true)
option('ipv6', type: 'combo', choices: ['true', 'false', 'auto'], value: 'auto')
option('xkb_dir', type: 'string')
diff --git a/os/meson.build b/os/meson.build
index 940c6f4d0..54124d32a 100644
--- a/os/meson.build
+++ b/os/meson.build
@@ -54,6 +54,10 @@ if get_option('xdmcp')
srcs_os += 'xdmcp.c'
endif
+if get_option('secure-rpc')
+ srcs_os += 'rpcauth.c'
+endif
+
libxlibc = []
if srcs_libc.length() > 0
libxlibc = static_library('libxlibc',
More information about the xorg-commit
mailing list