summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2014-05-02Use wrapped windows header to fix compilation for CygwinYaakov Selkowitz
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>
2013-08-03xload 1.1.2xload-1.1.2Alan Coopersmith
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2013-07-18Add noreturn attribute to usage() as suggested by -Wmissing-noreturnAlan Coopersmith
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2013-03-30Use C99 struct initializers for XKeyboardControl valuesAlan Coopersmith
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2013-02-24Use 'imdent' to make the deeply nested #ifdef levels easier to followAlan Coopersmith
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2013-02-24Cleanup trailing whitespaceAlan Coopersmith
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2013-02-24Make getloadavg() the first choice on Unix systems that have itAlan Coopersmith
Only fall back to complex, platform specific code if the simpler, more portable option isn't found by configure. Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2013-02-24unifdef -UX_NOT_POSIXAlan Coopersmith
This just provided a declaration for lseek() for some of the ancient Unix variants that were missing it in system headers. Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2013-02-24unifdef -U__UNIXOS2__Alan Coopersmith
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2013-02-24unifdef -UsequentAlan Coopersmith
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2013-02-24unifdef -UhcxAlan Coopersmith
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2013-02-24unifdef -UUTEKAlan Coopersmith
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2013-02-24unifdef -UalliantAlan Coopersmith
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2013-02-24unifdef -UsonyAlan Coopersmith
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2013-02-24unifdef -UumipsAlan Coopersmith
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2013-02-24unifdef -UMOTOROLAAlan Coopersmith
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2013-02-24unifdef -UAIXV3Alan Coopersmith
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2013-02-24unifdef -UCRAYAlan Coopersmith
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2013-02-20Combine usage message stringsAlan Coopersmith
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2012-08-23Eliminate use of tab stops. Helps with translation to DocBook.Eric S. Raymond
Signed-off-by: Eric S. Raymond <esr@thyrsus.com>
2012-03-22xload 1.1.1xload-1.1.1Alan Coopersmith
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2012-01-18Solaris: use getloadavg from libc instead of kstatsAlan Coopersmith
The simpler interface (based on the BSD function) has been in libc since Solaris 7, and avoids datasize bugs like the previous fix, so might as well use it. Purge all the other ancient Solaris & SunOS support variants as well. This does mean if you want to keep running xload on a Sun OS version from before 1998 you will need to use a branch of xload from before 2012 (such as the one included in those old releases). Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2012-01-18Solaris: Read avenrun_1min kstat as a uint32, not a longAlan Coopersmith
Fixes garbage data & crashes when built as a 64-bit binary on Solaris SPARC, since the high 32-bits was being filled with randomness. Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com> Reviewed-by: Arvind Umrao <arvind.umrao@oracle.com> Reviewed-by: Jay Cotton <jay.cotton@oracle.com>
2011-12-20Remove DG/UX supportAlan Coopersmith
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2011-12-20Convert sprintf to snprintfAlan Coopersmith
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2011-12-20Mark domaindir variable as const char * for gcc -Wwrite-stringsAlan Coopersmith
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2011-12-20Mark xload_error as noreturnAlan Coopersmith
Silences a gcc warning Raises the minimum version of xproto needed to build to 7.0.17 Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2011-12-20Mark string arguments to xload_error as const char * for gcc -Wwrite-stringsAlan Coopersmith
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2011-01-19config: move man pages into their own directoryGaetan Nadon
Use services provided by XORG_MANPAGE_SECTIONS. Use standard Makefile for man pages. Signed-off-by: Gaetan Nadon <memsize@videotron.ca>
2011-01-13man: replace hard coded man page section with substitution stringsGaetan Nadon
Signed-off-by: Gaetan Nadon <memsize@videotron.ca>
2011-01-13man: remove trailing spaces and tabsGaetan Nadon
Using s/[ \t]*$// Signed-off-by: Gaetan Nadon <memsize@videotron.ca>
2011-01-12config: replace deprecated AC_HELP_STRING with AS_HELP_STRINGGaetan Nadon
This silences an Automake warning. Signed-off-by: Gaetan Nadon <memsize@videotron.ca>
2010-11-20Purge RCS/CVS version tagsAlan Coopersmith
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2010-11-20Remove ancient Domain/OS support (unifdef -Uapollo)Alan Coopersmith
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2010-11-20Remove ancient A/UX support (unifdef -UmacII)Alan Coopersmith
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2010-11-20config: replace deprecated AM_CONFIG_HEADER with AC_CONFIG_HEADERSAlan Coopersmith
Regroup AC statements under the Autoconf initialization section. Regroup AM statements under the Automake initialization section. Add missing AC_CONFIG_SRCDIR Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2010-10-07Fix old-style function definitions on CygwinYaakov Selkowitz
get_load.c: In function ‘InitLoadPoint’: get_load.c:74:6: warning: old-style function definition get_load.c: In function ‘GetLoadPoint’: get_load.c:92:6: warning: old-style function definition Signed-off-by: Yaakov Selkowitz <yselkowitz@users.sourceforge.net> Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com> Reviewed-by: Jon TURNEY <jon.turney@dronecode.org.uk> Tested-by: Jon TURNEY <jon.turney@dronecode.org.uk>
2010-10-07Avoid excess Win32 includes on CygwinYaakov Selkowitz
Fixes compilation errors due to recent w32api <winspool.h>, which is not needed to compile xload. Signed-off-by: Yaakov Selkowitz <yselkowitz@users.sourceforge.net> Reviewed-by: Jon TURNEY <jon.turney@dronecode.org.uk> Tested-by: Jon TURNEY <jon.turney@dronecode.org.uk>
2010-09-26xload 1.1.0xload-1.1.0Alan Coopersmith
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2010-09-23config: Remove unnecessary calls from configure.acAlan Coopersmith
AC_PROG_CC & AC_PROG_INSTALL are provided by XORG_DEFAULT_OPTIONS now Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2010-09-23config: update AC_PREREQ statement to 2.60Gaetan Nadon
Unrelated to the previous patches, the new value simply reflects the reality that the minimum level for autoconf to configure all x.org modules is 2.60 dated June 2006. ftp://ftp.gnu.org/gnu/autoconf/autoconf-2.60.tar.gz Signed-off-by: Gaetan Nadon <memsize@videotron.ca>
2010-08-06Sun copyrights are now owned by OracleAlan Coopersmith
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2010-07-01Xmu functions are called directly, so include it in PKG_CHECK_MODULESAlan Coopersmith
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2010-07-01config: upgrade to util-macros 1.8 for additional man page supportAlan Coopersmith
Use MAN_SUBST now supplied in XORG_MANPAGE_SECTIONS The value of MAN_SUBST is the same for all X.Org packages. Use AC_PROG_SED now supplied by XORG_DEFAULT_OPTIONS The existing statement can now be removed from the configuration file. Use XORG_DEFAULT_OPTIONS provided $(SED) Use platform appropriate version of sed. Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2010-03-31config: ignore xload.po when using GETTEXTGaetan Nadon
Signed-off-by: Gaetan Nadon <memsize@videotron.ca>
2010-03-31 config: update and relocate AX_DEFINE_DIR macroGaetan Nadon
Remove deprecated acinclude.m4 macro container file Use separate macro files as per autoconf recommendation Use the latest macro from GNU Signed-off-by: Gaetan Nadon <memsize@videotron.ca>
2010-02-16Let xload build on systems without gettext().Matthieu Herrb
Signed-off-by: Matthieu Herrb <matthieu.herrb@laas.fr> Reviewed-by: Julien Cristau <jcristau@debian.org> Reviewed-by: Alan Coopersmith <alan.coopersmith@sun.com>
2010-01-15Integrate gettext support with autotools build systemAlan Coopersmith
Mostly cribbed from prior work for libXpm Signed-off-by: Alan Coopersmith <alan.coopersmith@sun.com>
2010-01-15Internationalize xload: Call gettext on strings printed to stderrJay Hobson
Originally done for Solaris 9 to fix Sun bug 4365629 http://bugs.opensolaris.org/bugdatabase/view_bug.do?bug_id=4365629 Signed-off-by: Alan Coopersmith <alan.coopersmith@sun.com>
2010-01-15Use automake silencer on man page generation tooAlan Coopersmith
Signed-off-by: Alan Coopersmith <alan.coopersmith@sun.com>