From ee1a2376854b3cf025cf69b11ea28863df1f12b2 Mon Sep 17 00:00:00 2001 From: Pavel Roskin Date: Tue, 26 Jan 2016 22:34:27 -0800 Subject: [PATCH 01/18] Remove GOT_PREFIX, it's a broken hack of limited utility To add flags to the compiler, CFLAGS, CPPFLAGS or LDFLAGS can be used on the configure command line. The need to add flags depends on the location of the headers and libraries of the dependencies, which is orthogonal to the directory where xrdp will be installed. The implementation in configure.ac has a stray closing bracket, making GOT_PREFIX true even if --prefix is not passed. The implementation is inconsistent - the only affected makefiles are for xrdp and libxrdp. Changing rpath manually is wrong in most cases. Libtool should be able to set rpath correctly on its own. Using $(prefix)/lib ignores the libdir setting. For many 64-bit systems, /usr/lib is used for 32-bit libraries. Adding 32-bit libraries to the rpath slows down 64-bit executables, as the dynamic loader searches for libraries in a wrong directory. There is no way to disable GOT_PREFIX if --prefix has to be passed. Fedora RPM patches configure.ac and needs to rerun autoconf and automake after that. --- configure.ac | 2 -- libxrdp/Makefile.am | 5 ----- xrdp/Makefile.am | 5 ----- 3 files changed, 12 deletions(-) diff --git a/configure.ac b/configure.ac index 24ef13c4..12c298e0 100644 --- a/configure.ac +++ b/configure.ac @@ -98,8 +98,6 @@ AC_ARG_ENABLE(opus, AS_HELP_STRING([--enable-opus], [], [enable_opus=no]) AM_CONDITIONAL(XRDP_OPUS, [test x$enable_opus = xyes]) -AM_CONDITIONAL(GOT_PREFIX, test "x${prefix}" != "xNONE"]) - # checking for openssl AC_CHECK_HEADER([openssl/rc4.h], [], [AC_MSG_ERROR([please install libssl-dev or openssl-devel])], diff --git a/libxrdp/Makefile.am b/libxrdp/Makefile.am index ec92f8be..5435343b 100644 --- a/libxrdp/Makefile.am +++ b/libxrdp/Makefile.am @@ -28,11 +28,6 @@ EXTRA_LIBS += -ljpeg endif endif -if GOT_PREFIX -EXTRA_INCLUDES += -I$(prefix)/include -EXTRA_FLAGS += -L$(prefix)/lib -Wl,-rpath -Wl,$(prefix)/lib -endif - AM_CFLAGS = \ -DXRDP_CFG_PATH=\"${sysconfdir}/xrdp\" \ -DXRDP_SBIN_PATH=\"${sbindir}\" \ diff --git a/xrdp/Makefile.am b/xrdp/Makefile.am index 8a8b36eb..8014761a 100644 --- a/xrdp/Makefile.am +++ b/xrdp/Makefile.am @@ -11,11 +11,6 @@ else EXTRA_DEFINES = -DXRDP_NODEBUG endif -if GOT_PREFIX -EXTRA_INCLUDES += -I$(prefix)/include -EXTRA_FLAGS += -L$(prefix)/lib -Wl,-rpath -Wl,$(prefix)/lib -endif - if XRDP_RFXCODEC EXTRA_DEFINES += -DXRDP_RFXCODEC EXTRA_INCLUDES += -I$(top_srcdir)/librfxcodec/include From 309fca35acfeb776a422d6140ddae8be0b1dbff0 Mon Sep 17 00:00:00 2001 From: Pavel Roskin Date: Tue, 26 Jan 2016 22:42:43 -0800 Subject: [PATCH 02/18] Don't use a symlink where #include would suffice Absolute symlinks break when the source is moved to another location. In the best case, the symlink will be replaced with a copy, but that creates code duplication. A user who got the packaged source may decide to change one config.c without realizing that another config.c will get the same changes. Don't ignore config.c, it's a regular source file now, albeit very short. Testing done: compiled inside and outside build directory. --- .gitignore | 1 - bootstrap | 1 - sesman/tools/config.c | 1 + 3 files changed, 1 insertion(+), 2 deletions(-) create mode 100644 sesman/tools/config.c diff --git a/.gitignore b/.gitignore index 7b45b684..0437bf57 100644 --- a/.gitignore +++ b/.gitignore @@ -5,7 +5,6 @@ autom4te.cache/ ChangeLog config_ac.h config_ac-h.in -config.c config.guess config.log config.status diff --git a/bootstrap b/bootstrap index 1fae2a0e..49aeefef 100755 --- a/bootstrap +++ b/bootstrap @@ -33,5 +33,4 @@ touch NEWS touch AUTHORS touch README touch ChangeLog -ln -s ../config.c $PWD/sesman/tools/config.c autoreconf -fvi diff --git a/sesman/tools/config.c b/sesman/tools/config.c new file mode 100644 index 00000000..0f1399cc --- /dev/null +++ b/sesman/tools/config.c @@ -0,0 +1 @@ +#include "../config.c" From a452d8d36aafda4a873f8c035a3fe3fd51fabd96 Mon Sep 17 00:00:00 2001 From: Pavel Roskin Date: Fri, 29 Jan 2016 22:45:00 -0800 Subject: [PATCH 03/18] Merge AM_CFLAGS and INCLUDES info AM_CPPFLAGS AM_CPPFLAGS is for flags passed to the preprocessor, such as defines and includes. AM_CFLAGS is for flags affecting the compiler, such as debug and optimization settings. INCLUDES is an obsolete name. Users can pass INCLUDES and break compilation. AM_CPPFLAGS is more explicit that the flags come from Automake and should not be overridden. --- common/Makefile.am | 2 +- keygen/Makefile.am | 6 ++---- libxrdp/Makefile.am | 6 ++---- mc/Makefile.am | 6 ++---- neutrinordp/Makefile.am | 6 ++---- rdp/Makefile.am | 6 ++---- sesman/Makefile.am | 6 ++---- sesman/chansrv/Makefile.am | 6 ++---- sesman/libscp/Makefile.am | 6 ++---- sesman/sessvc/Makefile.am | 6 ++---- sesman/tools/Makefile.am | 6 ++---- vnc/Makefile.am | 6 ++---- xrdp/Makefile.am | 6 ++---- xrdpapi/Makefile.am | 6 ++---- xrdpvr/Makefile.am | 6 ++---- xup/Makefile.am | 6 ++---- 16 files changed, 31 insertions(+), 61 deletions(-) diff --git a/common/Makefile.am b/common/Makefile.am index 8224c52d..c8501586 100644 --- a/common/Makefile.am +++ b/common/Makefile.am @@ -19,7 +19,7 @@ EXTRA_DIST = \ xrdp_rail.h \ crc16.h -AM_CFLAGS = \ +AM_CPPFLAGS = \ -DXRDP_CFG_PATH=\"${sysconfdir}/xrdp\" \ -DXRDP_SBIN_PATH=\"${sbindir}\" \ -DXRDP_SHARE_PATH=\"${datadir}/xrdp\" \ diff --git a/keygen/Makefile.am b/keygen/Makefile.am index c28c063d..353f74df 100644 --- a/keygen/Makefile.am +++ b/keygen/Makefile.am @@ -1,11 +1,9 @@ -AM_CFLAGS = \ +AM_CPPFLAGS = \ -DXRDP_CFG_PATH=\"${sysconfdir}/xrdp\" \ -DXRDP_SBIN_PATH=\"${sbindir}\" \ -DXRDP_SHARE_PATH=\"${datadir}/xrdp\" \ - -DXRDP_PID_PATH=\"${localstatedir}/run\" - -INCLUDES = \ + -DXRDP_PID_PATH=\"${localstatedir}/run\" \ -I$(top_srcdir)/common bin_PROGRAMS = \ diff --git a/libxrdp/Makefile.am b/libxrdp/Makefile.am index 5435343b..5b89b0c3 100644 --- a/libxrdp/Makefile.am +++ b/libxrdp/Makefile.am @@ -28,14 +28,12 @@ EXTRA_LIBS += -ljpeg endif endif -AM_CFLAGS = \ +AM_CPPFLAGS = \ -DXRDP_CFG_PATH=\"${sysconfdir}/xrdp\" \ -DXRDP_SBIN_PATH=\"${sbindir}\" \ -DXRDP_SHARE_PATH=\"${datadir}/xrdp\" \ -DXRDP_PID_PATH=\"${localstatedir}/run\" \ - $(EXTRA_DEFINES) - -INCLUDES = \ + $(EXTRA_DEFINES) \ -I$(top_srcdir)/common \ $(EXTRA_INCLUDES) diff --git a/mc/Makefile.am b/mc/Makefile.am index eb000085..f56dac5f 100644 --- a/mc/Makefile.am +++ b/mc/Makefile.am @@ -1,12 +1,10 @@ EXTRA_DIST = mc.h -AM_CFLAGS = \ +AM_CPPFLAGS = \ -DXRDP_CFG_PATH=\"${sysconfdir}/xrdp\" \ -DXRDP_SBIN_PATH=\"${sbindir}\" \ -DXRDP_SHARE_PATH=\"${datadir}/xrdp\" \ - -DXRDP_PID_PATH=\"${localstatedir}/run\" - -INCLUDES = \ + -DXRDP_PID_PATH=\"${localstatedir}/run\" \ -I$(top_srcdir)/common lib_LTLIBRARIES = \ diff --git a/neutrinordp/Makefile.am b/neutrinordp/Makefile.am index 93e1196a..58fe9bc2 100644 --- a/neutrinordp/Makefile.am +++ b/neutrinordp/Makefile.am @@ -7,14 +7,12 @@ else EXTRA_DEFINES += -DXRDP_NODEBUG endif -AM_CFLAGS = \ +AM_CPPFLAGS = \ -DXRDP_CFG_PATH=\"${sysconfdir}/xrdp\" \ -DXRDP_SBIN_PATH=\"${sbindir}\" \ -DXRDP_SHARE_PATH=\"${datadir}/xrdp\" \ -DXRDP_PID_PATH=\"${localstatedir}/run\" \ - $(EXTRA_DEFINES) - -INCLUDES = \ + $(EXTRA_DEFINES) \ -I$(top_srcdir)/common \ $(FREERDP_CFLAGS) diff --git a/rdp/Makefile.am b/rdp/Makefile.am index 9b519d7c..6d23b287 100644 --- a/rdp/Makefile.am +++ b/rdp/Makefile.am @@ -7,14 +7,12 @@ else EXTRA_DEFINES += -DXRDP_NODEBUG endif -AM_CFLAGS = \ +AM_CPPFLAGS = \ -DXRDP_CFG_PATH=\"${sysconfdir}/xrdp\" \ -DXRDP_SBIN_PATH=\"${sbindir}\" \ -DXRDP_SHARE_PATH=\"${datadir}/xrdp\" \ -DXRDP_PID_PATH=\"${localstatedir}/run\" \ - $(EXTRA_DEFINES) - -INCLUDES = \ + $(EXTRA_DEFINES) \ -I$(top_srcdir)/common lib_LTLIBRARIES = \ diff --git a/sesman/Makefile.am b/sesman/Makefile.am index 55056031..979f72d9 100644 --- a/sesman/Makefile.am +++ b/sesman/Makefile.am @@ -2,13 +2,11 @@ EXTRA_DIST = sesman.ini startwm.sh sesman.h access.h auth.h config.h env.h \ scp.h scp_v0.h scp_v1.h scp_v1_mng.h session.h sig.h -AM_CFLAGS = \ +AM_CPPFLAGS = \ -DXRDP_CFG_PATH=\"${sysconfdir}/xrdp\" \ -DXRDP_SBIN_PATH=\"${sbindir}\" \ -DXRDP_SHARE_PATH=\"${datadir}/xrdp\" \ - -DXRDP_PID_PATH=\"${localstatedir}/run\" - -INCLUDES = \ + -DXRDP_PID_PATH=\"${localstatedir}/run\" \ -I$(top_srcdir)/common \ -I$(top_srcdir)/sesman/libscp diff --git a/sesman/chansrv/Makefile.am b/sesman/chansrv/Makefile.am index 755de786..1a0be24c 100644 --- a/sesman/chansrv/Makefile.am +++ b/sesman/chansrv/Makefile.am @@ -31,14 +31,12 @@ EXTRA_DEFINES += -DXRDP_OPUS EXTRA_LIBS += -lopus endif -AM_CFLAGS = \ +AM_CPPFLAGS = \ -DXRDP_CFG_PATH=\"${sysconfdir}/xrdp\" \ -DXRDP_SBIN_PATH=\"${sbindir}\" \ -DXRDP_SHARE_PATH=\"${datadir}/xrdp\" \ -DXRDP_PID_PATH=\"${localstatedir}/run\" \ - $(EXTRA_DEFINES) - -INCLUDES = \ + $(EXTRA_DEFINES) \ -I$(top_srcdir)/common \ $(EXTRA_INCLUDES) diff --git a/sesman/libscp/Makefile.am b/sesman/libscp/Makefile.am index eaf518a8..3172f2cb 100644 --- a/sesman/libscp/Makefile.am +++ b/sesman/libscp/Makefile.am @@ -1,13 +1,11 @@ EXTRA_DIST = libscp_connection.h libscp_commands.h libscp.h libscp_session.h libscp_types_mng.h libscp_v1c_mng.h libscp_vX.h libscp_commands_mng.h libscp_init.h libscp_tcp.h libscp_v0.h libscp_v1s.h libscp_lock.h \ libscp_types.h libscp_v1c.h libscp_v1s_mng.h -AM_CFLAGS = \ +AM_CPPFLAGS = \ -DXRDP_CFG_PATH=\"${sysconfdir}/xrdp\" \ -DXRDP_SBIN_PATH=\"${sbindir}\" \ -DXRDP_SHARE_PATH=\"${datadir}/xrdp\" \ - -DXRDP_PID_PATH=\"${localstatedir}/run\" - -INCLUDES = \ + -DXRDP_PID_PATH=\"${localstatedir}/run\" \ -I$(top_srcdir)/common lib_LTLIBRARIES = \ diff --git a/sesman/sessvc/Makefile.am b/sesman/sessvc/Makefile.am index 8ba24abd..c2714b94 100644 --- a/sesman/sessvc/Makefile.am +++ b/sesman/sessvc/Makefile.am @@ -1,11 +1,9 @@ -AM_CFLAGS = \ +AM_CPPFLAGS = \ -DXRDP_CFG_PATH=\"${sysconfdir}/xrdp\" \ -DXRDP_SBIN_PATH=\"${sbindir}\" \ -DXRDP_SHARE_PATH=\"${datadir}/xrdp\" \ - -DXRDP_PID_PATH=\"${localstatedir}/run\" - -INCLUDES = \ + -DXRDP_PID_PATH=\"${localstatedir}/run\" \ -I$(top_srcdir)/common sbin_PROGRAMS = \ diff --git a/sesman/tools/Makefile.am b/sesman/tools/Makefile.am index 140c6820..fa4568ef 100644 --- a/sesman/tools/Makefile.am +++ b/sesman/tools/Makefile.am @@ -1,12 +1,10 @@ EXTRA_DIST = tcp.h -AM_CFLAGS = \ +AM_CPPFLAGS = \ -DXRDP_CFG_PATH=\"${sysconfdir}/xrdp\" \ -DXRDP_SBIN_PATH=\"${sbindir}\" \ -DXRDP_SHARE_PATH=\"${datadir}/xrdp\" \ - -DXRDP_PID_PATH=\"${localstatedir}/run\" - -INCLUDES = \ + -DXRDP_PID_PATH=\"${localstatedir}/run\" \ -I$(top_srcdir)/common \ -I$(top_srcdir)/sesman/libscp \ -I$(top_srcdir)/sesman diff --git a/vnc/Makefile.am b/vnc/Makefile.am index 24835011..a9a3aa14 100644 --- a/vnc/Makefile.am +++ b/vnc/Makefile.am @@ -1,12 +1,10 @@ EXTRA_DIST = vnc.h -AM_CFLAGS = \ +AM_CPPFLAGS = \ -DXRDP_CFG_PATH=\"${sysconfdir}/xrdp\" \ -DXRDP_SBIN_PATH=\"${sbindir}\" \ -DXRDP_SHARE_PATH=\"${datadir}/xrdp\" \ - -DXRDP_PID_PATH=\"${localstatedir}/run\" - -INCLUDES = \ + -DXRDP_PID_PATH=\"${localstatedir}/run\" \ -I$(top_srcdir)/common lib_LTLIBRARIES = \ diff --git a/xrdp/Makefile.am b/xrdp/Makefile.am index 8014761a..308f01a4 100644 --- a/xrdp/Makefile.am +++ b/xrdp/Makefile.am @@ -17,15 +17,13 @@ EXTRA_INCLUDES += -I$(top_srcdir)/librfxcodec/include EXTRA_LIBS += $(top_srcdir)/librfxcodec/src/librfxencode.a endif -AM_CFLAGS = \ +AM_CPPFLAGS = \ -DXRDP_CFG_PATH=\"${sysconfdir}/xrdp\" \ -DXRDP_SBIN_PATH=\"${sbindir}\" \ -DXRDP_SHARE_PATH=\"${datadir}/xrdp\" \ -DXRDP_PID_PATH=\"${localstatedir}/run\" \ -DXRDP_LIB_PATH=\"${libdir}\" \ - $(EXTRA_DEFINES) - -INCLUDES = \ + $(EXTRA_DEFINES) \ -I$(top_builddir) \ -I$(top_srcdir)/common \ -I$(top_srcdir)/libxrdp \ diff --git a/xrdpapi/Makefile.am b/xrdpapi/Makefile.am index 88ef100e..8107ffeb 100644 --- a/xrdpapi/Makefile.am +++ b/xrdpapi/Makefile.am @@ -5,10 +5,8 @@ EXTRA_INCLUDES = EXTRA_LIBS = EXTRA_FLAGS = -AM_CFLAGS = \ - $(EXTRA_DEFINES) - -INCLUDES = \ +AM_CPPFLAGS = \ + $(EXTRA_DEFINES) \ $(EXTRA_INCLUDES) lib_LTLIBRARIES = \ diff --git a/xrdpvr/Makefile.am b/xrdpvr/Makefile.am index 158baa90..f232ce41 100644 --- a/xrdpvr/Makefile.am +++ b/xrdpvr/Makefile.am @@ -5,10 +5,8 @@ EXTRA_INCLUDES = EXTRA_LIBS = EXTRA_FLAGS = -AM_CFLAGS = \ - $(EXTRA_DEFINES) - -INCLUDES = \ +AM_CPPFLAGS = \ + $(EXTRA_DEFINES) \ $(EXTRA_INCLUDES) lib_LTLIBRARIES = \ diff --git a/xup/Makefile.am b/xup/Makefile.am index 544c957a..d7017b42 100644 --- a/xup/Makefile.am +++ b/xup/Makefile.am @@ -1,12 +1,10 @@ EXTRA_DIST = xup.h -AM_CFLAGS = \ +AM_CPPFLAGS = \ -DXRDP_CFG_PATH=\"${sysconfdir}/xrdp\" \ -DXRDP_SBIN_PATH=\"${sbindir}\" \ -DXRDP_SHARE_PATH=\"${datadir}/xrdp\" \ - -DXRDP_PID_PATH=\"${localstatedir}/run\" - -INCLUDES = \ + -DXRDP_PID_PATH=\"${localstatedir}/run\" \ -I$(top_srcdir)/common lib_LTLIBRARIES = \ From 2694fa9dacbb6afac5fd7e2a094ffff0c0ed3279 Mon Sep 17 00:00:00 2001 From: Pavel Roskin Date: Fri, 29 Jan 2016 22:52:06 -0800 Subject: [PATCH 04/18] Create the m4 directory for Autoconf macro files Keeping separate files is more maintainable than merging them into a single aclocal.m4 file. It is easier for users to understand where those files come from. Automake knows how to distribute files in the m4 directory. --- Makefile.am | 2 ++ configure.ac | 1 + m4/.gitignore | 1 + 3 files changed, 4 insertions(+) create mode 100644 m4/.gitignore diff --git a/Makefile.am b/Makefile.am index e8905c98..aa32a502 100644 --- a/Makefile.am +++ b/Makefile.am @@ -1,3 +1,5 @@ +ACLOCAL_AMFLAGS = -I m4 + EXTRA_DIST = bootstrap COPYING design.txt faq-compile.txt faq-general.txt file-loc.txt install.txt prog_std.txt readme.txt if XRDP_NEUTRINORDP diff --git a/configure.ac b/configure.ac index 12c298e0..79e38d0d 100644 --- a/configure.ac +++ b/configure.ac @@ -4,6 +4,7 @@ AC_PREREQ(2.59) AC_INIT([xrdp], [0.9.0], [xrdp-devel@googlegroups.com]) AC_CONFIG_HEADERS(config_ac.h:config_ac-h.in) AM_INIT_AUTOMAKE([1.6 foreign]) +AC_CONFIG_MACRO_DIRS([m4]) AC_PROG_CC AC_C_CONST AC_PROG_LIBTOOL diff --git a/m4/.gitignore b/m4/.gitignore new file mode 100644 index 00000000..0f4126cd --- /dev/null +++ b/m4/.gitignore @@ -0,0 +1 @@ +*.m4 From 12cd2f6a1d4aa24fca9046c370cf3b466205220d Mon Sep 17 00:00:00 2001 From: Pavel Roskin Date: Fri, 29 Jan 2016 23:00:44 -0800 Subject: [PATCH 05/18] Don't touch any files in bootstrap configure.ac already exists. Its timestamp doesn't need to be updated. autoreconf takes care of the timestamps. Since "foreign" is used in Makefile.am, no standard GNU files are required. Distributing empty files like README could be disappointing for the users. --- bootstrap | 5 ----- 1 file changed, 5 deletions(-) diff --git a/bootstrap b/bootstrap index 49aeefef..be61972e 100755 --- a/bootstrap +++ b/bootstrap @@ -28,9 +28,4 @@ then exit 1 fi -touch configure.ac -touch NEWS -touch AUTHORS -touch README -touch ChangeLog autoreconf -fvi From 4d4289d93cbd62d65fb8237b891319370adaa3a1 Mon Sep 17 00:00:00 2001 From: Pavel Roskin Date: Fri, 29 Jan 2016 23:17:38 -0800 Subject: [PATCH 06/18] Disable systemd support for "make distcheck" "make distcheck" sets prefix to a user-owned directory, compiles code and runs "make install". That fails if systemd files need to be installed, as their location if not relative to the prefix. --- Makefile.am | 1 + 1 file changed, 1 insertion(+) diff --git a/Makefile.am b/Makefile.am index aa32a502..8e6e18b8 100644 --- a/Makefile.am +++ b/Makefile.am @@ -1,4 +1,5 @@ ACLOCAL_AMFLAGS = -I m4 +AM_DISTCHECK_CONFIGURE_FLAGS = --without-systemdsystemunitdir EXTRA_DIST = bootstrap COPYING design.txt faq-compile.txt faq-general.txt file-loc.txt install.txt prog_std.txt readme.txt From 334eeb970aeea2f4ca706eebd0326e9854e5d229 Mon Sep 17 00:00:00 2001 From: Pavel Roskin Date: Sat, 30 Jan 2016 12:32:13 -0800 Subject: [PATCH 07/18] clipboard_file: include sys/time.h for struct timeval, needed on Mac OS X --- sesman/chansrv/clipboard_file.c | 1 + 1 file changed, 1 insertion(+) diff --git a/sesman/chansrv/clipboard_file.c b/sesman/chansrv/clipboard_file.c index e994585a..4f3f1ade 100644 --- a/sesman/chansrv/clipboard_file.c +++ b/sesman/chansrv/clipboard_file.c @@ -22,6 +22,7 @@ * CLIPRDR_FILEDESCRIPTOR * http://msdn.microsoft.com/en-us/library/ff362447%28prot.20%29.aspx */ +#include #include #include #include From 00e70a5c5450579145ef077340d8148a1ba3338c Mon Sep 17 00:00:00 2001 From: Pavel Roskin Date: Sat, 30 Jan 2016 11:42:39 -0800 Subject: [PATCH 08/18] Use standard autotools means to detect X11 Use AC_PATH_XTRA to search for X11 in configure.ac. In Makefiles, add X_CFLAGS to AM_CFLAGS for the source compilation. Add X_LIBS to LDFLAGS. Add X_PRE_LIBS and X_EXTRA_LIBS to LDADD. With this patch, X Windows system is correctly detected on Mac OS X. --- configure.ac | 16 +++++++++++++--- genkeymap/Makefile.am | 7 +++++-- sesman/chansrv/Makefile.am | 6 ++++-- sesman/tools/Makefile.am | 8 ++++++-- 4 files changed, 28 insertions(+), 9 deletions(-) diff --git a/configure.ac b/configure.ac index 79e38d0d..cd873a68 100644 --- a/configure.ac +++ b/configure.ac @@ -199,16 +199,26 @@ else fi fi -# checking for Xlib, Xfixes -AC_CHECK_HEADER([X11/Xlib.h], [], - [AC_MSG_ERROR([please install libx11-dev or libX11-devel])]) +AC_PATH_XTRA +if test "x$no_x" == "xyes"; then + AC_MSG_ERROR([please install libx11-dev or libX11-devel]) +fi + +save_CFLAGS="$CFLAGS" +CFLAGS="$CFLAGS $X_CFLAGS" + +# checking for Xfixes AC_CHECK_HEADER([X11/extensions/Xfixes.h], [], [AC_MSG_ERROR([please install libx11-dev and libxfixes-dev or libXfixes-devel])], [#include ]) + +# checking for Xrandr AC_CHECK_HEADER([X11/extensions/Xrandr.h], [], [AC_MSG_ERROR([please install libxrandr-dev or libXrandr-devel])], [#include ]) +CFLAGS="$save_CFLAGS" + libdir="${libdir}/xrdp"; if test "x${prefix}" = "xNONE" ; then sysconfdir="/etc"; diff --git a/genkeymap/Makefile.am b/genkeymap/Makefile.am index aed72512..25767395 100644 --- a/genkeymap/Makefile.am +++ b/genkeymap/Makefile.am @@ -1,9 +1,12 @@ +AM_CFLAGS = $(X_CFLAGS) bin_PROGRAMS = \ xrdp-genkeymap xrdp_genkeymap_SOURCES = genkeymap.c evdev-map.c +xrdp_genkeymap_LDFLAGS = \ + $(X_LIBS) + xrdp_genkeymap_LDADD = \ - -L/usr/X11R6/lib \ - -lX11 + $(X_PRE_LIBS) -lX11 $(X_EXTRA_LIBS) diff --git a/sesman/chansrv/Makefile.am b/sesman/chansrv/Makefile.am index 1a0be24c..45397b73 100644 --- a/sesman/chansrv/Makefile.am +++ b/sesman/chansrv/Makefile.am @@ -40,6 +40,8 @@ AM_CPPFLAGS = \ -I$(top_srcdir)/common \ $(EXTRA_INCLUDES) +AM_CFLAGS = $(X_CFLAGS) + sbin_PROGRAMS = \ xrdp-chansrv @@ -60,10 +62,10 @@ xrdp_chansrv_SOURCES = \ chansrv_common.c xrdp_chansrv_LDFLAGS = \ + $(X_LIBS) \ $(EXTRA_FLAGS) xrdp_chansrv_LDADD = \ - -L/usr/X11R6/lib \ $(top_builddir)/common/libcommon.la \ - -lX11 -lXfixes -lXrandr \ + $(X_PRE_LIBS) -lXfixes -lXrandr -lX11 $(X_EXTRA_LIBS) \ $(EXTRA_LIBS) diff --git a/sesman/tools/Makefile.am b/sesman/tools/Makefile.am index fa4568ef..066039b0 100644 --- a/sesman/tools/Makefile.am +++ b/sesman/tools/Makefile.am @@ -9,6 +9,8 @@ AM_CPPFLAGS = \ -I$(top_srcdir)/sesman/libscp \ -I$(top_srcdir)/sesman +AM_CFLAGS = $(X_CFLAGS) + bin_PROGRAMS = \ xrdp-sesrun \ xrdp-sesadmin \ @@ -46,6 +48,8 @@ xrdp_sesadmin_LDADD = \ $(top_builddir)/common/libcommon.la \ $(top_builddir)/sesman/libscp/libscp.la +xrdp_xcon_LDFLAGS = \ + $(X_LIBS) + xrdp_xcon_LDADD = \ - -L/usr/X11R6/lib \ - -lX11 + $(X_PRE_LIBS) -lX11 $(X_EXTRA_LIBS) From 5d9dae24c5efcdbc922111612cbd91a9ff114d0e Mon Sep 17 00:00:00 2001 From: Pavel Roskin Date: Sat, 30 Jan 2016 12:42:40 -0800 Subject: [PATCH 09/18] xrdpapi: fix MacOS compilation - use SO_NOSIGPIPE instead of MSG_NOSIGNAL --- xrdpapi/xrdpapi.c | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/xrdpapi/xrdpapi.c b/xrdpapi/xrdpapi.c index cd343e75..974a094c 100644 --- a/xrdpapi/xrdpapi.c +++ b/xrdpapi/xrdpapi.c @@ -162,6 +162,14 @@ WTSVirtualChannelOpenEx(unsigned int SessionId, const char *pVirtualName, return wts; } +/* + * Prevent receiving SIGPIPE on disconnect using either MSG_NOSIGNAL (Linux) + * or SO_NOSIGPIPE (Mac OS X) + */ +#if !defined(MSG_NOSIGNAL) +#define MSG_NOSIGNAL 0 +#endif + /*****************************************************************************/ static int mysend(int sck, const void* adata, int bytes) @@ -170,6 +178,11 @@ mysend(int sck, const void* adata, int bytes) int error; const char* data; +#if defined(SO_NOSIGPIPE) + const int on = 1; + setsockopt(sck, SOL_SOCKET, SO_NOSIGPIPE, &on, sizeof(on)); +#endif + data = (const char*)adata; sent = 0; while (sent < bytes) From f8cb1588efe15eaa1258a1b5615cf33676eddb9a Mon Sep 17 00:00:00 2001 From: Pavel Roskin Date: Sat, 30 Jan 2016 17:33:04 -0800 Subject: [PATCH 10/18] Replace "charactor" with "character" everywhere --- mc/mc.h | 2 +- neutrinordp/xrdp-neutrinordp.h | 2 +- rdp/rdp.h | 2 +- vnc/vnc.h | 2 +- xorg/X11R7.6/rdp/rdp.h | 4 ++-- xorg/X11R7.6/rdp/rdpup.c | 8 ++++---- xorg/tests/randr/trandr.c | 2 +- xrdp/xrdp.h | 4 ++-- xrdp/xrdp_mm.c | 8 ++++---- xrdp/xrdp_types.h | 4 ++-- xup/xup.c | 12 ++++++------ xup/xup.h | 4 ++-- 12 files changed, 27 insertions(+), 27 deletions(-) diff --git a/mc/mc.h b/mc/mc.h index ac31334c..4af932f0 100644 --- a/mc/mc.h +++ b/mc/mc.h @@ -67,7 +67,7 @@ struct mod int (*server_set_pen)(struct mod* v, int style, int width); int (*server_draw_line)(struct mod* v, int x1, int y1, int x2, int y2); - int (*server_add_char)(struct mod* v, int font, int charactor, + int (*server_add_char)(struct mod* v, int font, int character, int offset, int baseline, int width, int height, char* data); int (*server_draw_text)(struct mod* v, int font, diff --git a/neutrinordp/xrdp-neutrinordp.h b/neutrinordp/xrdp-neutrinordp.h index 68eae750..8606efe2 100644 --- a/neutrinordp/xrdp-neutrinordp.h +++ b/neutrinordp/xrdp-neutrinordp.h @@ -101,7 +101,7 @@ struct mod int (*server_set_pen)(struct mod* v, int style, int width); int (*server_draw_line)(struct mod* v, int x1, int y1, int x2, int y2); - int (*server_add_char)(struct mod* v, int font, int charactor, + int (*server_add_char)(struct mod* v, int font, int character, int offset, int baseline, int width, int height, char* data); int (*server_draw_text)(struct mod* v, int font, diff --git a/rdp/rdp.h b/rdp/rdp.h index 9a755a38..36a20f57 100644 --- a/rdp/rdp.h +++ b/rdp/rdp.h @@ -292,7 +292,7 @@ struct mod int (*server_set_pen)(struct mod* v, int style, int width); int (*server_draw_line)(struct mod* v, int x1, int y1, int x2, int y2); - int (*server_add_char)(struct mod* v, int font, int charactor, + int (*server_add_char)(struct mod* v, int font, int character, int offset, int baseline, int width, int height, char* data); int (*server_draw_text)(struct mod* v, int font, diff --git a/vnc/vnc.h b/vnc/vnc.h index d7249f3d..af5e86e6 100644 --- a/vnc/vnc.h +++ b/vnc/vnc.h @@ -67,7 +67,7 @@ struct vnc int (*server_set_pen)(struct vnc* v, int style, int width); int (*server_draw_line)(struct vnc* v, int x1, int y1, int x2, int y2); - int (*server_add_char)(struct vnc* v, int font, int charactor, + int (*server_add_char)(struct vnc* v, int font, int character, int offset, int baseline, int width, int height, char* data); int (*server_draw_text)(struct vnc* v, int font, diff --git a/xorg/X11R7.6/rdp/rdp.h b/xorg/X11R7.6/rdp/rdp.h index 1d06509d..901e292b 100644 --- a/xorg/X11R7.6/rdp/rdp.h +++ b/xorg/X11R7.6/rdp/rdp.h @@ -582,10 +582,10 @@ rdpup_check_alpha_dirty(PixmapPtr pDirtyPixmap, rdpPixmapRec* pDirtyPriv); int rdpup_check_dirty_screen(rdpPixmapRec* pDirtyPriv); int -rdpup_add_char(int font, int charactor, short x, short y, int cx, int cy, +rdpup_add_char(int font, int character, short x, short y, int cx, int cy, char* bmpdata, int bmpdata_bytes); int -rdpup_add_char_alpha(int font, int charactor, short x, short y, int cx, int cy, +rdpup_add_char_alpha(int font, int character, short x, short y, int cx, int cy, char* bmpdata, int bmpdata_bytes); int rdpup_draw_text(int font, int flags, int mixmode, diff --git a/xorg/X11R7.6/rdp/rdpup.c b/xorg/X11R7.6/rdp/rdpup.c index 9c507622..230c1538 100644 --- a/xorg/X11R7.6/rdp/rdpup.c +++ b/xorg/X11R7.6/rdp/rdpup.c @@ -2823,7 +2823,7 @@ rdpup_check_alpha_dirty(PixmapPtr pDirtyPixmap, rdpPixmapRec* pDirtyPriv) /******************************************************************************/ int -rdpup_add_char(int font, int charactor, short x, short y, int cx, int cy, +rdpup_add_char(int font, int character, short x, short y, int cx, int cy, char* bmpdata, int bmpdata_bytes) { if (g_connected) @@ -2834,7 +2834,7 @@ rdpup_add_char(int font, int charactor, short x, short y, int cx, int cy, out_uint16_le(g_out_s, 18 + bmpdata_bytes); /* size */ g_count++; out_uint16_le(g_out_s, font); - out_uint16_le(g_out_s, charactor); + out_uint16_le(g_out_s, character); out_uint16_le(g_out_s, x); out_uint16_le(g_out_s, y); out_uint16_le(g_out_s, cx); @@ -2847,7 +2847,7 @@ rdpup_add_char(int font, int charactor, short x, short y, int cx, int cy, /******************************************************************************/ int -rdpup_add_char_alpha(int font, int charactor, short x, short y, int cx, int cy, +rdpup_add_char_alpha(int font, int character, short x, short y, int cx, int cy, char* bmpdata, int bmpdata_bytes) { if (g_connected) @@ -2858,7 +2858,7 @@ rdpup_add_char_alpha(int font, int charactor, short x, short y, int cx, int cy, out_uint16_le(g_out_s, 18 + bmpdata_bytes); /* size */ g_count++; out_uint16_le(g_out_s, font); - out_uint16_le(g_out_s, charactor); + out_uint16_le(g_out_s, character); out_uint16_le(g_out_s, x); out_uint16_le(g_out_s, y); out_uint16_le(g_out_s, cx); diff --git a/xorg/tests/randr/trandr.c b/xorg/tests/randr/trandr.c index 4f7be527..6c51a000 100644 --- a/xorg/tests/randr/trandr.c +++ b/xorg/tests/randr/trandr.c @@ -143,4 +143,4 @@ main(int argc, char **argv) } return 0; -} \ No newline at end of file +} diff --git a/xrdp/xrdp.h b/xrdp/xrdp.h index b23cdaf0..2a9bf0d4 100644 --- a/xrdp/xrdp.h +++ b/xrdp/xrdp.h @@ -444,7 +444,7 @@ server_set_pen(struct xrdp_mod* mod, int style, int width); int DEFAULT_CC server_draw_line(struct xrdp_mod* mod, int x1, int y1, int x2, int y2); int DEFAULT_CC -server_add_char(struct xrdp_mod* mod, int font, int charactor, +server_add_char(struct xrdp_mod* mod, int font, int character, int offset, int baseline, int width, int height, char* data); int DEFAULT_CC @@ -509,6 +509,6 @@ server_monitored_desktop(struct xrdp_mod* mod, struct rail_monitored_desktop_order* mdo, int flags); int DEFAULT_CC -server_add_char_alpha(struct xrdp_mod* mod, int font, int charactor, +server_add_char_alpha(struct xrdp_mod* mod, int font, int character, int offset, int baseline, int width, int height, char* data); diff --git a/xrdp/xrdp_mm.c b/xrdp/xrdp_mm.c index 48a0d628..70e101fe 100644 --- a/xrdp/xrdp_mm.c +++ b/xrdp/xrdp_mm.c @@ -2833,7 +2833,7 @@ server_draw_line(struct xrdp_mod *mod, int x1, int y1, int x2, int y2) /*****************************************************************************/ int DEFAULT_CC -server_add_char(struct xrdp_mod *mod, int font, int charactor, +server_add_char(struct xrdp_mod *mod, int font, int character, int offset, int baseline, int width, int height, char *data) { @@ -2847,7 +2847,7 @@ server_add_char(struct xrdp_mod *mod, int font, int charactor, fi.data = data; fi.bpp = 1; return libxrdp_orders_send_font(((struct xrdp_wm *)mod->wm)->session, - &fi, font, charactor); + &fi, font, character); } /*****************************************************************************/ @@ -3470,7 +3470,7 @@ server_monitored_desktop(struct xrdp_mod *mod, /*****************************************************************************/ int DEFAULT_CC -server_add_char_alpha(struct xrdp_mod* mod, int font, int charactor, +server_add_char_alpha(struct xrdp_mod* mod, int font, int character, int offset, int baseline, int width, int height, char* data) { @@ -3484,5 +3484,5 @@ server_add_char_alpha(struct xrdp_mod* mod, int font, int charactor, fi.data = data; fi.bpp = 8; return libxrdp_orders_send_font(((struct xrdp_wm*)mod->wm)->session, - &fi, font, charactor); + &fi, font, character); } diff --git a/xrdp/xrdp_types.h b/xrdp/xrdp_types.h index 5551e58d..a2a4d5fd 100644 --- a/xrdp/xrdp_types.h +++ b/xrdp/xrdp_types.h @@ -75,7 +75,7 @@ struct xrdp_mod int (*server_set_pen)(struct xrdp_mod* v, int style, int width); int (*server_draw_line)(struct xrdp_mod* v, int x1, int y1, int x2, int y2); - int (*server_add_char)(struct xrdp_mod* v, int font, int charactor, + int (*server_add_char)(struct xrdp_mod* v, int font, int character, int offset, int baseline, int width, int height, char* data); int (*server_draw_text)(struct xrdp_mod* v, int font, @@ -125,7 +125,7 @@ struct xrdp_mod int flags); int (*server_set_pointer_ex)(struct xrdp_mod* v, int x, int y, char* data, char* mask, int bpp); - int (*server_add_char_alpha)(struct xrdp_mod* mod, int font, int charactor, + int (*server_add_char_alpha)(struct xrdp_mod* mod, int font, int character, int offset, int baseline, int width, int height, char* data); diff --git a/xup/xup.c b/xup/xup.c index 1d92fa60..21fdedd5 100644 --- a/xup/xup.c +++ b/xup/xup.c @@ -797,7 +797,7 @@ process_server_add_char(struct mod *mod, struct stream *s) { int rv; int font; - int charactor; + int character; int x; int y; int cx; @@ -806,14 +806,14 @@ process_server_add_char(struct mod *mod, struct stream *s) char *bmpdata; in_uint16_le(s, font); - in_uint16_le(s, charactor); + in_uint16_le(s, character); in_sint16_le(s, x); in_sint16_le(s, y); in_uint16_le(s, cx); in_uint16_le(s, cy); in_uint16_le(s, len_bmpdata); in_uint8p(s, bmpdata, len_bmpdata); - rv = mod->server_add_char(mod, font, charactor, x, y, cx, cy, bmpdata); + rv = mod->server_add_char(mod, font, character, x, y, cx, cy, bmpdata); return rv; } @@ -825,7 +825,7 @@ process_server_add_char_alpha(struct mod *mod, struct stream *s) { int rv; int font; - int charactor; + int character; int x; int y; int cx; @@ -834,14 +834,14 @@ process_server_add_char_alpha(struct mod *mod, struct stream *s) char *bmpdata; in_uint16_le(s, font); - in_uint16_le(s, charactor); + in_uint16_le(s, character); in_sint16_le(s, x); in_sint16_le(s, y); in_uint16_le(s, cx); in_uint16_le(s, cy); in_uint16_le(s, len_bmpdata); in_uint8p(s, bmpdata, len_bmpdata); - rv = mod->server_add_char_alpha(mod, font, charactor, x, y, cx, cy, + rv = mod->server_add_char_alpha(mod, font, character, x, y, cx, cy, bmpdata); return rv; } diff --git a/xup/xup.h b/xup/xup.h index 520cc038..70cdcf27 100644 --- a/xup/xup.h +++ b/xup/xup.h @@ -71,7 +71,7 @@ struct mod int (*server_set_pen)(struct mod* v, int style, int width); int (*server_draw_line)(struct mod* v, int x1, int y1, int x2, int y2); - int (*server_add_char)(struct mod* v, int font, int charactor, + int (*server_add_char)(struct mod* v, int font, int character, int offset, int baseline, int width, int height, char* data); int (*server_draw_text)(struct mod* v, int font, @@ -121,7 +121,7 @@ struct mod int flags); int (*server_set_cursor_ex)(struct mod* v, int x, int y, char* data, char* mask, int bpp); - int (*server_add_char_alpha)(struct mod* v, int font, int charactor, + int (*server_add_char_alpha)(struct mod* v, int font, int character, int offset, int baseline, int width, int height, char* data); int (*server_create_os_surface_bpp)(struct mod* v, int rdpindex, From 02c981e796af1413ec4332b98ea3b7fcc69481c8 Mon Sep 17 00:00:00 2001 From: Pavel Roskin Date: Sat, 30 Jan 2016 17:39:25 -0800 Subject: [PATCH 11/18] More spelling fixes found by codespell and aspell --- common/arch.h | 2 +- design.txt | 2 +- install.txt | 6 +++--- instfiles/init.d/xrdp | 2 +- prog_std.txt | 2 +- readme.txt | 10 +++++----- sesman/libscp/libscp_lock.c | 2 +- sesman/libscp/libscp_lock.h | 4 ++-- tcutils/README.txt | 2 +- xrdp/rdp-scan-codes.txt | 2 +- 10 files changed, 17 insertions(+), 17 deletions(-) diff --git a/common/arch.h b/common/arch.h index 14ab9d7d..d3ae460e 100644 --- a/common/arch.h +++ b/common/arch.h @@ -22,7 +22,7 @@ /* you can define L_ENDIAN or B_ENDIAN and NEED_ALIGN or NO_NEED_ALIGN in the makefile to override */ -/* check endianess */ +/* check endianness */ #if !(defined(L_ENDIAN) || defined(B_ENDIAN)) #if !defined(__BYTE_ORDER) && defined(__linux__) #include diff --git a/design.txt b/design.txt index 431bcbd1..3b120c89 100644 --- a/design.txt +++ b/design.txt @@ -31,5 +31,5 @@ is lost, the session remains. For X11, start the XServer after the user is authenticated. First check for the next available X11 display, -create a user session, start the XServer and set the DISPLAY enviromenet +create a user session, start the XServer and set the DISPLAY environment variable. diff --git a/install.txt b/install.txt index 5683d1e5..dd36f4e3 100644 --- a/install.txt +++ b/install.txt @@ -11,11 +11,11 @@ You can build sesman without pam, there is a Makefile parameter for that. I also have a replacement ssl_calls.c to avoid the openssl dependency email me(Jay) for it or see http://server1.xrdp.org/xrdp/openssl. -Due to the licence, I can't include it in this project. +Due to the license, I can't include it in this project. http://server1.xrdp.org/xrdp/openssl/ -unpackage the tarball +unpack the tarball tar -zxvf xrdp-0.1.tar.gz @@ -28,7 +28,7 @@ run make as root, run make install This will install most of the files in /usr/local/xrdp. -Some files install in /etc/xrdp. These are configuation +Some files install in /etc/xrdp. These are configuration files. files and location diff --git a/instfiles/init.d/xrdp b/instfiles/init.d/xrdp index e6c6e123..8e5f42d1 100644 --- a/instfiles/init.d/xrdp +++ b/instfiles/init.d/xrdp @@ -139,7 +139,7 @@ case "$1" in ;; force-stop) $0 stop - # because it doesn't allways die the right way + # because it doesn't always die the right way force_stop ;; restart|force-reload) diff --git a/prog_std.txt b/prog_std.txt index c358a470..671172f2 100644 --- a/prog_std.txt +++ b/prog_std.txt @@ -1,5 +1,5 @@ -This is an atempt to explain my odd programming standard used for this project. +This is an attempt to explain my odd programming standard used for this project. Not to defend any of these but its my default standard and make it easy for me to read. Some files break these rules, they will be updated eventually. diff --git a/readme.txt b/readme.txt index 4e4d712e..b051ef02 100644 --- a/readme.txt +++ b/readme.txt @@ -9,8 +9,8 @@ Credits Mark from up 19.9 was the first to work with rdp server code. Tested with linux on i386, x64, sparc, and ppc. -I've got it compiling and working in windows with borland free tools. -Non of the sesman or Xserver stuff works in windows of course. +I've got it compiling and working in windows with Borland free tools. +None of the sesman or Xserver stuff works in windows of course. xrdp directory is the main server code vnc directory is a simple vnc client module for xrdp @@ -19,11 +19,11 @@ libxrdp directory is a static library needed by xrdp rdp is an rdp client module for connecting to another rdp server xup is a module used to connect to an rdp specific X11 server Xserver is the files needed to build an rdp specific X11 server -COPYING is the licence file -design.txt is an attempt to expain the project design +COPYING is the license file +design.txt is an attempt to explain the project design prog_std.txt is an attempt to explain the programming standard used -since version 0.5.0 we switch to autotool to build xrdp +since version 0.5.0 we switch to autotools to build xrdp to build and install diff --git a/sesman/libscp/libscp_lock.c b/sesman/libscp/libscp_lock.c index 4db05422..d35e3c9c 100644 --- a/sesman/libscp/libscp_lock.c +++ b/sesman/libscp/libscp_lock.c @@ -57,7 +57,7 @@ scp_lock_fork_request(void) if (lock_fork_blockers_count == 0) { - /* if noone is blocking fork(), then we're allowed to fork */ + /* if no one is blocking fork(), then we're allowed to fork */ sem_post(&lock_fork_req); } diff --git a/sesman/libscp/libscp_lock.h b/sesman/libscp/libscp_lock.h index b4e93c52..ae2c361b 100644 --- a/sesman/libscp/libscp_lock.h +++ b/sesman/libscp/libscp_lock.h @@ -52,8 +52,8 @@ scp_lock_fork_release(void); * * @brief starts a section that is critical for forking * - * starts a section that is critical for forking, that is noone can fork() - * while i'm in a critical section. But if someone wanted to fork we have + * starts a section that is critical for forking, that is no one can fork() + * while I'm in a critical section. But if someone wanted to fork we have * to wait until he finishes with lock_fork_release() * * @return diff --git a/tcutils/README.txt b/tcutils/README.txt index de75f1b2..31ebb1f8 100644 --- a/tcutils/README.txt +++ b/tcutils/README.txt @@ -1,4 +1,4 @@ -A QT based utility program for thinclients using xrdp and NeutrinoRDP +A QT based utility program for thin clients using xrdp and NeutrinoRDP This program sends commands to NeutrinoRDP to do something useful on the client end (such as unmounting a USB drive, diff --git a/xrdp/rdp-scan-codes.txt b/xrdp/rdp-scan-codes.txt index 938ce4c5..5fe06e53 100644 --- a/xrdp/rdp-scan-codes.txt +++ b/xrdp/rdp-scan-codes.txt @@ -3,7 +3,7 @@ complete rdp key code listing en-us -4000s in the down flags columm is from repeating keys(holding a key down) +4000s in the down flags column is from repeating keys(holding a key down) When holding a key down, the down flags repeat but the up flags only come once at the end. Rdesktop does not do this as of yet. It always sends down and up From 986fa9473357edaa1848fffd27592260bfcbe924 Mon Sep 17 00:00:00 2001 From: Pavel Roskin Date: Sat, 30 Jan 2016 18:01:12 -0800 Subject: [PATCH 12/18] clipboard: undefine previously defined log level --- sesman/chansrv/clipboard.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/sesman/chansrv/clipboard.c b/sesman/chansrv/clipboard.c index 5c2a2b22..11c37a16 100644 --- a/sesman/chansrv/clipboard.c +++ b/sesman/chansrv/clipboard.c @@ -176,6 +176,8 @@ x-special/gnome-copied-files #define LOG_ERROR 0 #define LOG_INFO 1 #define LOG_DEBUG 2 + +#undef LOG_LEVEL #define LOG_LEVEL LOG_ERROR #define log_error(_params...) \ From eacfb00050e8ee8528ed865f2a366fb54f69f73b Mon Sep 17 00:00:00 2001 From: Pavel Roskin Date: Sat, 30 Jan 2016 18:11:11 -0800 Subject: [PATCH 13/18] Declare xrdp_mm_frame_ack() in xrdp.h, it's used in xrdp_wm.c --- xrdp/xrdp.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/xrdp/xrdp.h b/xrdp/xrdp.h index 2a9bf0d4..1199d01a 100644 --- a/xrdp/xrdp.h +++ b/xrdp/xrdp.h @@ -381,6 +381,8 @@ int APP_CC xrdp_mm_check_chan(struct xrdp_mm *self); int APP_CC xrdp_mm_check_wait_objs(struct xrdp_mm* self); +int APP_CC +xrdp_mm_frame_ack(struct xrdp_mm *self, int frame_id); int DEFAULT_CC server_begin_update(struct xrdp_mod* mod); int DEFAULT_CC From 5b0dcfc8fed6253b4a69c6b039b16ad7f83dc833 Mon Sep 17 00:00:00 2001 From: Pavel Roskin Date: Sat, 30 Jan 2016 20:24:17 -0800 Subject: [PATCH 14/18] rail: fix declaration of rail_desktop_resize() Arguments without a type default to int. The caller passes a pointer to XEvent, so use that type. --- sesman/chansrv/rail.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sesman/chansrv/rail.c b/sesman/chansrv/rail.c index f3777970..f12d8e3f 100644 --- a/sesman/chansrv/rail.c +++ b/sesman/chansrv/rail.c @@ -1775,7 +1775,7 @@ rail_configure_window(XConfigureEvent *config) /*****************************************************************************/ static int -rail_desktop_resize(lxevent) +rail_desktop_resize(XEvent *lxevent) { LOG(0, ("rail_desktop_resize:")); return 0; From f1ba2b2c9d794afd574e985fab78cefad68d8ec0 Mon Sep 17 00:00:00 2001 From: Pavel Roskin Date: Sat, 30 Jan 2016 18:08:37 -0800 Subject: [PATCH 15/18] xcon: include sys/types.h for select() and related macros --- sesman/tools/xcon.c | 1 + 1 file changed, 1 insertion(+) diff --git a/sesman/tools/xcon.c b/sesman/tools/xcon.c index 80832276..4150d6af 100644 --- a/sesman/tools/xcon.c +++ b/sesman/tools/xcon.c @@ -19,6 +19,7 @@ #include #include #include +#include #include Display *g_display = 0; From 5de1d31a75ffc84ad78c24f167184cbd62a306bb Mon Sep 17 00:00:00 2001 From: Pavel Roskin Date: Sun, 31 Jan 2016 23:42:16 -0800 Subject: [PATCH 16/18] Change an unconditional #warning to a comment Notes about software design should not be shown as warnings to everybody who compiles the code. Warnings should be about unexpected conditions detected at the compile time. --- sesman/libscp/libscp_v1s.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/sesman/libscp/libscp_v1s.c b/sesman/libscp/libscp_v1s.c index 69997ab2..fb137433 100644 --- a/sesman/libscp/libscp_v1s.c +++ b/sesman/libscp/libscp_v1s.c @@ -435,8 +435,11 @@ scp_v1s_list_sessions(struct SCP_CONNECTION *c, int sescnt, struct SCP_DISCONNEC } /* then we wait for client ack */ -#warning maybe this message could say if the session should be resized on -#warning server side or client side + + /* + * Maybe this message could say if the session should be resized on + * server side or client side. + */ init_stream(c->in_s, c->in_s->size); if (0 != scp_tcp_force_recv(c->in_sck, c->in_s->data, 8)) From 9717e7392ac07fb17a04c87aae1994156eaa5a77 Mon Sep 17 00:00:00 2001 From: Pavel Roskin Date: Sun, 7 Feb 2016 23:14:27 -0800 Subject: [PATCH 17/18] Spell "return value", not "returnvalue" --- xrdp/xrdp_mm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/xrdp/xrdp_mm.c b/xrdp/xrdp_mm.c index 70e101fe..26e5c028 100644 --- a/xrdp/xrdp_mm.c +++ b/xrdp/xrdp_mm.c @@ -2014,7 +2014,7 @@ xrdp_mm_connect(struct xrdp_mm *self) xrdp_mm_connect_chansrv(self, "", chansrvport); } - log_message(LOG_LEVEL_DEBUG,"returnvalue from xrdp_mm_connect %d", rv); + log_message(LOG_LEVEL_DEBUG,"return value from xrdp_mm_connect %d", rv); return rv; } From 2a5d204baaa84207e835af570d89b10a17083fae Mon Sep 17 00:00:00 2001 From: Pavel Roskin Date: Sun, 7 Feb 2016 23:15:54 -0800 Subject: [PATCH 18/18] Don't capitalize "Error" and print the error value --- vnc/vnc.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/vnc/vnc.c b/vnc/vnc.c index 66b0f228..2e16ed21 100644 --- a/vnc/vnc.c +++ b/vnc/vnc.c @@ -1099,7 +1099,8 @@ lib_mod_connect(struct vnc *v) if (error != 0) { - log_message(LOG_LEVEL_DEBUG, "VNC Error after security negotiation"); + log_message(LOG_LEVEL_DEBUG, "VNC error %d after security negotiation", + error); } if (error == 0 && check_sec_result)