diff options
author | Matthieu Herrb <matthieu@cvs.openbsd.org> | 2018-05-21 17:54:52 +0000 |
---|---|---|
committer | Matthieu Herrb <matthieu@cvs.openbsd.org> | 2018-05-21 17:54:52 +0000 |
commit | 9ade9672d0031806f214aa1a7170ee1db6b6b017 (patch) | |
tree | 5bc3a81fd01eb932c0bb7874de8e9ceb1e873d11 | |
parent | 48855738f1c52dd3dcde5b866bce8ef944f3407b (diff) |
Update to xload 1.1.3
-rw-r--r-- | app/xload/ChangeLog | 112 | ||||
-rw-r--r-- | app/xload/aclocal.m4 | 64 | ||||
-rw-r--r-- | app/xload/compile | 2 | ||||
-rw-r--r-- | app/xload/configure | 86 | ||||
-rw-r--r-- | app/xload/configure.ac | 2 | ||||
-rw-r--r-- | app/xload/get_load.c | 4 | ||||
-rw-r--r-- | app/xload/get_rload.c | 2 | ||||
-rw-r--r-- | app/xload/xload.c | 3 |
8 files changed, 223 insertions, 52 deletions
diff --git a/app/xload/ChangeLog b/app/xload/ChangeLog index deb8050fd..d3357ca09 100644 --- a/app/xload/ChangeLog +++ b/app/xload/ChangeLog @@ -1,3 +1,115 @@ +commit 57adc3d88856d96975479ba6a386ca1af1bc3cb8 +Author: Alan Coopersmith <alan.coopersmith@oracle.com> +Date: Fri Mar 9 17:51:02 2018 -0800 + + xload 1.1.3 + + Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com> + +commit 09e23fa098ab44c5861afa0ad30032cede22e1a7 +Author: Mihail Konev <k.mvc@ya.ru> +Date: Thu Jan 26 14:00:21 2017 +1000 + + autogen: add default patch prefix + + Signed-off-by: Mihail Konev <k.mvc@ya.ru> + +commit dafec869b1040ba26aa9b7411576293cbeaef227 +Author: Emil Velikov <emil.l.velikov@gmail.com> +Date: Mon Mar 9 12:00:52 2015 +0000 + + autogen.sh: use quoted string variables + + Place quotes around the $srcdir, $ORIGDIR and $0 variables to prevent + fall-outs, when they contain space. + + Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com> + Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net> + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit f137e5de4b21d253f5c0a475b347645145513a69 +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Tue Jan 24 10:32:07 2017 +1000 + + autogen.sh: use exec instead of waiting for configure to finish + + Syncs the invocation of configure with the one from the server. + + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + Reviewed-by: Emil Velikov <emil.velikov@collabora.com> + +commit 57e2f649e76cba9e9959ca072ba10285cd17a060 +Author: Jon TURNEY <jon.turney@dronecode.org.uk> +Date: Tue Apr 21 13:10:48 2015 +0100 + + Don't try to use [gs]et[ug]id on Win32 + + Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk> + Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com> + Reviewed-by: David Macek <david.macek.0@gmail.com> + +commit 3d5d39cc98b4c5cbecbc1f10db1f6c01963efa94 +Author: Jon TURNEY <jon.turney@dronecode.org.uk> +Date: Tue Apr 21 13:10:37 2015 +0100 + + Use Windows load interface for Win32 build, as well as Cygwin + + Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk> + Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com> + Reviewed-by: David Macek <david.macek.0@gmail.com> + +commit 5c74908c5abe5f91651e78b291ef7e1d02cca25a +Author: Alan Coopersmith <alan.coopersmith@oracle.com> +Date: Sat May 31 22:14:29 2014 -0700 + + autogen.sh: Honor NOCONFIGURE=1 + + See http://people.gnome.org/~walters/docs/build-api.txt + + Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com> + +commit 9d036c3cb4c1e777ed65dfb9c59db6ec9229e6f5 +Author: Alan Coopersmith <alan.coopersmith@oracle.com> +Date: Sat May 31 22:14:29 2014 -0700 + + configure: Drop AM_MAINTAINER_MODE + + Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com> + +commit 23f4a318f3df9823aa2076616a7a06b3972e8d6b +Author: Yaakov Selkowitz <yselkowitz@users.sourceforge.net> +Date: Wed Dec 18 18:07:47 2013 +0000 + + Use wrapped windows header to fix compilation for Cygwin + + xload uses a windows-specific interface to obtain the load average, as + getloadavg() is not implemented for Cygwin. + + Including some versions of windows.h after including X11 headers can lead to + compilation errors as 'Status' is used as a type name in Xlib.h, but a parameter + or memeber name in Windows headers. + + Include X11/Xwindows.h rather than windows.h directly, which wraps it in a such + way to avoid any conflict with X11 headers. + + In file included from /usr/include/w32api/minwindef.h:146:0, + from /usr/include/w32api/windef.h:8, + from /usr/include/w32api/windows.h:69, + from /jhbuild/checkout/xorg/app/xload/get_load.c:53: + /usr/include/w32api/winnt.h:4951:15: error: two or more data types in declaration specifiers + DWORD64 Status; + ^ + In file included from /usr/include/w32api/minwindef.h:146:0, + from /usr/include/w32api/windef.h:8, + from /usr/include/w32api/windows.h:69, + from /jhbuild/checkout/xorg/app/xload/get_load.c:53: + /usr/include/w32api/winnt.h:5090:13: error: two or more data types in declaration specifiers + DWORD Status; + ^ + + Signed-off-by: Yaakov Selkowitz <yselkowitz@users.sourceforge.net> + Reviewed-by: Jon TURNEY <jon.turney@dronecode.org.uk> + commit 0705cf954e2d92b379493accd1f0f984d87ec575 Author: Alan Coopersmith <alan.coopersmith@oracle.com> Date: Sat Aug 3 21:42:59 2013 -0700 diff --git a/app/xload/aclocal.m4 b/app/xload/aclocal.m4 index 393441973..890503ac9 100644 --- a/app/xload/aclocal.m4 +++ b/app/xload/aclocal.m4 @@ -1243,7 +1243,7 @@ AC_SUBST([am__untar]) m4_include([m4/ax_define_dir.m4]) dnl xorg-macros.m4. Generated from xorg-macros.m4.in xorgversion.m4 by configure. dnl -dnl Copyright (c) 2005, 2006, Oracle and/or its affiliates. All rights reserved. +dnl Copyright (c) 2005, 2015, Oracle and/or its affiliates. All rights reserved. dnl dnl Permission is hereby granted, free of charge, to any person obtaining a dnl copy of this software and associated documentation files (the "Software"), @@ -1280,7 +1280,7 @@ dnl DEALINGS IN THE SOFTWARE. # See the "minimum version" comment for each macro you use to see what # version you require. m4_defun([XORG_MACROS_VERSION],[ -m4_define([vers_have], [1.19.0]) +m4_define([vers_have], [1.19.2]) m4_define([maj_have], m4_substr(vers_have, 0, m4_index(vers_have, [.]))) m4_define([maj_needed], m4_substr([$1], 0, m4_index([$1], [.]))) m4_if(m4_cmp(maj_have, maj_needed), 0,, @@ -1358,6 +1358,17 @@ AC_DEFUN([XORG_MANPAGE_SECTIONS],[ AC_REQUIRE([AC_CANONICAL_HOST]) AC_REQUIRE([AC_PROG_SED]) +case $host_os in + solaris*) + # Solaris 2.0 - 11.3 use SysV man page section numbers, so we + # check for a man page file found in later versions that use + # traditional section numbers instead + AC_CHECK_FILE([/usr/share/man/man7/attributes.7], + [SYSV_MAN_SECTIONS=false], [SYSV_MAN_SECTIONS=true]) + ;; + *) SYSV_MAN_SECTIONS=false ;; +esac + if test x$APP_MAN_SUFFIX = x ; then APP_MAN_SUFFIX=1 fi @@ -1373,9 +1384,9 @@ if test x$LIB_MAN_DIR = x ; then fi if test x$FILE_MAN_SUFFIX = x ; then - case $host_os in - solaris*) FILE_MAN_SUFFIX=4 ;; - *) FILE_MAN_SUFFIX=5 ;; + case $SYSV_MAN_SECTIONS in + true) FILE_MAN_SUFFIX=4 ;; + *) FILE_MAN_SUFFIX=5 ;; esac fi if test x$FILE_MAN_DIR = x ; then @@ -1383,9 +1394,9 @@ if test x$FILE_MAN_DIR = x ; then fi if test x$MISC_MAN_SUFFIX = x ; then - case $host_os in - solaris*) MISC_MAN_SUFFIX=5 ;; - *) MISC_MAN_SUFFIX=7 ;; + case $SYSV_MAN_SECTIONS in + true) MISC_MAN_SUFFIX=5 ;; + *) MISC_MAN_SUFFIX=7 ;; esac fi if test x$MISC_MAN_DIR = x ; then @@ -1393,9 +1404,9 @@ if test x$MISC_MAN_DIR = x ; then fi if test x$DRIVER_MAN_SUFFIX = x ; then - case $host_os in - solaris*) DRIVER_MAN_SUFFIX=7 ;; - *) DRIVER_MAN_SUFFIX=4 ;; + case $SYSV_MAN_SECTIONS in + true) DRIVER_MAN_SUFFIX=7 ;; + *) DRIVER_MAN_SUFFIX=4 ;; esac fi if test x$DRIVER_MAN_DIR = x ; then @@ -1403,9 +1414,9 @@ if test x$DRIVER_MAN_DIR = x ; then fi if test x$ADMIN_MAN_SUFFIX = x ; then - case $host_os in - solaris*) ADMIN_MAN_SUFFIX=1m ;; - *) ADMIN_MAN_SUFFIX=8 ;; + case $SYSV_MAN_SECTIONS in + true) ADMIN_MAN_SUFFIX=1m ;; + *) ADMIN_MAN_SUFFIX=8 ;; esac fi if test x$ADMIN_MAN_DIR = x ; then @@ -1666,13 +1677,24 @@ m4_ifval([$1], fi]) # Test for the ability of xmlto to generate a text target +# +# NOTE: xmlto 0.0.27 or higher return a non-zero return code in the +# following test for empty XML docbook files. +# For compatibility reasons use the following empty XML docbook file and if +# it fails try it again with a non-empty XML file. have_xmlto_text=no cat > conftest.xml << "EOF" EOF AS_IF([test "$have_xmlto" = yes], [AS_IF([$XMLTO --skip-validation txt conftest.xml >/dev/null 2>&1], [have_xmlto_text=yes], - [AC_MSG_WARN([xmlto cannot generate text format, this format skipped])])]) + [# Try it again with a non-empty XML file. + cat > conftest.xml << "EOF" +<x></x> +EOF + AS_IF([$XMLTO --skip-validation txt conftest.xml >/dev/null 2>&1], + [have_xmlto_text=yes], + [AC_MSG_WARN([xmlto cannot generate text format, this format skipped])])])]) rm -f conftest.xml AM_CONDITIONAL([HAVE_XMLTO_TEXT], [test $have_xmlto_text = yes]) AM_CONDITIONAL([HAVE_XMLTO], [test "$have_xmlto" = yes]) @@ -3068,8 +3090,9 @@ AC_REQUIRE([PKG_PROG_PKG_CONFIG]) macros_datadir=`$PKG_CONFIG --print-errors --variable=pkgdatadir xorg-macros` INSTALL_CMD="(cp -f "$macros_datadir/INSTALL" \$(top_srcdir)/.INSTALL.tmp && \ mv \$(top_srcdir)/.INSTALL.tmp \$(top_srcdir)/INSTALL) \ -|| (rm -f \$(top_srcdir)/.INSTALL.tmp; touch \$(top_srcdir)/INSTALL; \ -echo 'util-macros \"pkgdatadir\" from xorg-macros.pc not found: installing possibly empty INSTALL.' >&2)" +|| (rm -f \$(top_srcdir)/.INSTALL.tmp; test -e \$(top_srcdir)/INSTALL || ( \ +touch \$(top_srcdir)/INSTALL; \ +echo 'failed to copy INSTALL from util-macros: installing empty INSTALL.' >&2))" AC_SUBST([INSTALL_CMD]) ]) # XORG_INSTALL dnl Copyright 2005 Red Hat, Inc @@ -3130,10 +3153,11 @@ AC_DEFUN([XORG_RELEASE_VERSION],[ # # AC_DEFUN([XORG_CHANGELOG], [ -CHANGELOG_CMD="(GIT_DIR=\$(top_srcdir)/.git git log > \$(top_srcdir)/.changelog.tmp && \ +CHANGELOG_CMD="((GIT_DIR=\$(top_srcdir)/.git git log > \$(top_srcdir)/.changelog.tmp) 2>/dev/null && \ mv \$(top_srcdir)/.changelog.tmp \$(top_srcdir)/ChangeLog) \ -|| (rm -f \$(top_srcdir)/.changelog.tmp; touch \$(top_srcdir)/ChangeLog; \ -echo 'git directory not found: installing possibly empty changelog.' >&2)" +|| (rm -f \$(top_srcdir)/.changelog.tmp; test -e \$(top_srcdir)/ChangeLog || ( \ +touch \$(top_srcdir)/ChangeLog; \ +echo 'git failed to create ChangeLog: installing empty ChangeLog.' >&2))" AC_SUBST([CHANGELOG_CMD]) ]) # XORG_CHANGELOG diff --git a/app/xload/compile b/app/xload/compile index 531136b06..a85b723c7 100644 --- a/app/xload/compile +++ b/app/xload/compile @@ -3,7 +3,7 @@ scriptversion=2012-10-14.11; # UTC -# Copyright (C) 1999-2013 Free Software Foundation, Inc. +# Copyright (C) 1999-2014 Free Software Foundation, Inc. # Written by Tom Tromey <tromey@cygnus.com>. # # This program is free software; you can redistribute it and/or modify diff --git a/app/xload/configure b/app/xload/configure index 1cb4a3045..0099affd8 100644 --- a/app/xload/configure +++ b/app/xload/configure @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.69 for xload 1.1.2. +# Generated by GNU Autoconf 2.69 for xload 1.1.3. # # Report bugs to <https://bugs.freedesktop.org/enter_bug.cgi?product=xorg>. # @@ -581,8 +581,8 @@ MAKEFLAGS= # Identity of this package. PACKAGE_NAME='xload' PACKAGE_TARNAME='xload' -PACKAGE_VERSION='1.1.2' -PACKAGE_STRING='xload 1.1.2' +PACKAGE_VERSION='1.1.3' +PACKAGE_STRING='xload 1.1.3' PACKAGE_BUGREPORT='https://bugs.freedesktop.org/enter_bug.cgi?product=xorg' PACKAGE_URL='' @@ -1321,7 +1321,7 @@ if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures xload 1.1.2 to adapt to many kinds of systems. +\`configure' configures xload 1.1.3 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1391,7 +1391,7 @@ fi if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of xload 1.1.2:";; + short | recursive ) echo "Configuration of xload 1.1.3:";; esac cat <<\_ACEOF @@ -1512,7 +1512,7 @@ fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -xload configure 1.1.2 +xload configure 1.1.3 generated by GNU Autoconf 2.69 Copyright (C) 2012 Free Software Foundation, Inc. @@ -1927,7 +1927,7 @@ cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by xload $as_me 1.1.2, which was +It was created by xload $as_me 1.1.3, which was generated by GNU Autoconf 2.69. Invocation command line was $ $0 $@ @@ -4068,7 +4068,7 @@ fi # Define the identity of the package. PACKAGE='xload' - VERSION='1.1.2' + VERSION='1.1.3' cat >>confdefs.h <<_ACEOF @@ -10485,10 +10485,11 @@ _ACEOF -CHANGELOG_CMD="(GIT_DIR=\$(top_srcdir)/.git git log > \$(top_srcdir)/.changelog.tmp && \ +CHANGELOG_CMD="((GIT_DIR=\$(top_srcdir)/.git git log > \$(top_srcdir)/.changelog.tmp) 2>/dev/null && \ mv \$(top_srcdir)/.changelog.tmp \$(top_srcdir)/ChangeLog) \ -|| (rm -f \$(top_srcdir)/.changelog.tmp; touch \$(top_srcdir)/ChangeLog; \ -echo 'git directory not found: installing possibly empty changelog.' >&2)" +|| (rm -f \$(top_srcdir)/.changelog.tmp; test -e \$(top_srcdir)/ChangeLog || ( \ +touch \$(top_srcdir)/ChangeLog; \ +echo 'git failed to create ChangeLog: installing empty ChangeLog.' >&2))" @@ -10496,14 +10497,45 @@ echo 'git directory not found: installing possibly empty changelog.' >&2)" macros_datadir=`$PKG_CONFIG --print-errors --variable=pkgdatadir xorg-macros` INSTALL_CMD="(cp -f "$macros_datadir/INSTALL" \$(top_srcdir)/.INSTALL.tmp && \ mv \$(top_srcdir)/.INSTALL.tmp \$(top_srcdir)/INSTALL) \ -|| (rm -f \$(top_srcdir)/.INSTALL.tmp; touch \$(top_srcdir)/INSTALL; \ -echo 'util-macros \"pkgdatadir\" from xorg-macros.pc not found: installing possibly empty INSTALL.' >&2)" +|| (rm -f \$(top_srcdir)/.INSTALL.tmp; test -e \$(top_srcdir)/INSTALL || ( \ +touch \$(top_srcdir)/INSTALL; \ +echo 'failed to copy INSTALL from util-macros: installing empty INSTALL.' >&2))" +case $host_os in + solaris*) + # Solaris 2.0 - 11.3 use SysV man page section numbers, so we + # check for a man page file found in later versions that use + # traditional section numbers instead + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for /usr/share/man/man7/attributes.7" >&5 +$as_echo_n "checking for /usr/share/man/man7/attributes.7... " >&6; } +if ${ac_cv_file__usr_share_man_man7_attributes_7+:} false; then : + $as_echo_n "(cached) " >&6 +else + test "$cross_compiling" = yes && + as_fn_error $? "cannot check for file existence when cross compiling" "$LINENO" 5 +if test -r "/usr/share/man/man7/attributes.7"; then + ac_cv_file__usr_share_man_man7_attributes_7=yes +else + ac_cv_file__usr_share_man_man7_attributes_7=no +fi +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_file__usr_share_man_man7_attributes_7" >&5 +$as_echo "$ac_cv_file__usr_share_man_man7_attributes_7" >&6; } +if test "x$ac_cv_file__usr_share_man_man7_attributes_7" = xyes; then : + SYSV_MAN_SECTIONS=false +else + SYSV_MAN_SECTIONS=true +fi + + ;; + *) SYSV_MAN_SECTIONS=false ;; +esac + if test x$APP_MAN_SUFFIX = x ; then APP_MAN_SUFFIX=1 fi @@ -10519,9 +10551,9 @@ if test x$LIB_MAN_DIR = x ; then fi if test x$FILE_MAN_SUFFIX = x ; then - case $host_os in - solaris*) FILE_MAN_SUFFIX=4 ;; - *) FILE_MAN_SUFFIX=5 ;; + case $SYSV_MAN_SECTIONS in + true) FILE_MAN_SUFFIX=4 ;; + *) FILE_MAN_SUFFIX=5 ;; esac fi if test x$FILE_MAN_DIR = x ; then @@ -10529,9 +10561,9 @@ if test x$FILE_MAN_DIR = x ; then fi if test x$MISC_MAN_SUFFIX = x ; then - case $host_os in - solaris*) MISC_MAN_SUFFIX=5 ;; - *) MISC_MAN_SUFFIX=7 ;; + case $SYSV_MAN_SECTIONS in + true) MISC_MAN_SUFFIX=5 ;; + *) MISC_MAN_SUFFIX=7 ;; esac fi if test x$MISC_MAN_DIR = x ; then @@ -10539,9 +10571,9 @@ if test x$MISC_MAN_DIR = x ; then fi if test x$DRIVER_MAN_SUFFIX = x ; then - case $host_os in - solaris*) DRIVER_MAN_SUFFIX=7 ;; - *) DRIVER_MAN_SUFFIX=4 ;; + case $SYSV_MAN_SECTIONS in + true) DRIVER_MAN_SUFFIX=7 ;; + *) DRIVER_MAN_SUFFIX=4 ;; esac fi if test x$DRIVER_MAN_DIR = x ; then @@ -10549,9 +10581,9 @@ if test x$DRIVER_MAN_DIR = x ; then fi if test x$ADMIN_MAN_SUFFIX = x ; then - case $host_os in - solaris*) ADMIN_MAN_SUFFIX=1m ;; - *) ADMIN_MAN_SUFFIX=8 ;; + case $SYSV_MAN_SECTIONS in + true) ADMIN_MAN_SUFFIX=1m ;; + *) ADMIN_MAN_SUFFIX=8 ;; esac fi if test x$ADMIN_MAN_DIR = x ; then @@ -11508,7 +11540,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by xload $as_me 1.1.2, which was +This file was extended by xload $as_me 1.1.3, which was generated by GNU Autoconf 2.69. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -11574,7 +11606,7 @@ _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" ac_cs_version="\\ -xload config.status 1.1.2 +xload config.status 1.1.3 configured by $0, generated by GNU Autoconf 2.69, with options \\"\$ac_cs_config\\" diff --git a/app/xload/configure.ac b/app/xload/configure.ac index 9a9b05a26..f13d07b56 100644 --- a/app/xload/configure.ac +++ b/app/xload/configure.ac @@ -23,7 +23,7 @@ dnl Process this file with autoconf to create configure. # Initialize Autoconf AC_PREREQ([2.60]) -AC_INIT([xload], [1.1.2], +AC_INIT([xload], [1.1.3], [https://bugs.freedesktop.org/enter_bug.cgi?product=xorg], [xload]) AC_CONFIG_MACRO_DIR([m4]) AC_CONFIG_SRCDIR([Makefile.am]) diff --git a/app/xload/get_load.c b/app/xload/get_load.c index 0c67bbd10..7dd5650c0 100644 --- a/app/xload/get_load.c +++ b/app/xload/get_load.c @@ -48,9 +48,9 @@ from the X Consortium. #include <stdlib.h> #include "xload.h" -#if defined(__CYGWIN__) +#if defined(__CYGWIN__) || defined(_WIN32) # define WIN32_LEAN_AND_MEAN -# include <windows.h> +# include <X11/Xwindows.h> typedef struct { DWORD stat; union { diff --git a/app/xload/get_rload.c b/app/xload/get_rload.c index ecfd28641..c3f9dfb0e 100644 --- a/app/xload/get_rload.c +++ b/app/xload/get_rload.c @@ -9,7 +9,7 @@ /* Not all OS supports get_rload steal the STUB idea from get_load */ -#if defined(QNX4) || defined(__CYGWIN__) +#if defined(QNX4) || defined(__CYGWIN__) || defined(_WIN32) #define RLOADSTUB #endif diff --git a/app/xload/xload.c b/app/xload/xload.c index 32adcdd2f..4c07102ae 100644 --- a/app/xload/xload.c +++ b/app/xload/xload.c @@ -178,6 +178,8 @@ main(int argc, char **argv) /* For security reasons, we reset our uid/gid after doing the necessary system initialization and before calling any X routines. */ InitLoadPoint(); + +#if !defined(_WIN32) || defined(__CYGWIN__) /* reset gid first while still (maybe) root */ if (setgid(getgid()) == -1) { fprintf(stderr, gettext("%s: setgid failed: %s\n"), @@ -189,6 +191,7 @@ main(int argc, char **argv) ProgramName, strerror(errno)); exit(1); } +#endif XtSetLanguageProc(NULL, (XtLanguageProc) NULL, NULL); |