summaryrefslogtreecommitdiff
path: root/get_load.c
AgeCommit message (Collapse)Author
2015-05-07Use Windows load interface for Win32 build, as well as CygwinJon TURNEY
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>
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-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>
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-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>
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-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>
2008-11-28Compile warning fixes.Paulo Cesar Pereira de Andrade
Ansify some functions with K&R definitions.
2008-05-06__DARWIN__ -> __APPLE__Jeremy Huddleston
https://bugs.freedesktop.org/show_bug.cgi?id=9017
2007-09-24Bug #12534: nlist() needs to be handled differently in Mac OS XPeter Dyballa
X.Org Bugzilla #12534 <https://bugs.freedesktop.org/show_bug.cgi?id=12534> Patch #11704 <https://bugs.freedesktop.org/attachment.cgi?id=11704>
2005-10-02Bug #3811 <https://bugs.freedesktop.org/show_bug.cgi?id=3811> GNU/kFreeBSDXORG-6_8_99_903XORG-6_8_99_902XORG-6_8_99_901Alan Coopersmith
support for xload & memleak (Robert Millan)
2005-07-27Switch xload on Solaris from libkvm to libkstat so it works with bothXORG-6_8_99_900Alan Coopersmith
32-bit and 64-bit kernels, and without group kmem. Add #include "config.h" for modularization
2004-04-23Merging XORG-CURRENT into trunkxprint_packagertest_20041217_basexprint_packagertest_20041125_basesco_port_update-baserel-0-6-1lg3d-rel-0-7-0lg3d-rel-0-6-2lg3d-baseXORG-6_8_99_9XORG-6_8_99_8XORG-6_8_99_7XORG-6_8_99_6XORG-6_8_99_5XORG-6_8_99_4XORG-6_8_99_3XORG-6_8_99_2XORG-6_8_99_16XORG-6_8_99_15XORG-6_8_99_14XORG-6_8_99_13XORG-6_8_99_12XORG-6_8_99_11XORG-6_8_99_10XORG-6_8_99_1XORG-6_8_2XORG-6_8_1_904XORG-6_8_1_903XORG-6_8_1_902XORG-6_8_1_901XORG-6_8_1XORG-6_8_0XORG-6_7_99_904XORG-6_7_99_903XORG-6_7_99_902XORG-6_7_99_901XORG-6_7_99_2XORG-6_7_99_1XACE-SELINUX-MERGExprint_packagertest_20041217xprint_packagertest_20041125sco_port_updatelg3d-masterlg3d-eventlg3d-dev-0-7-1lg3d-dev-0-7-0lg3d-dev-0-6-latestlg3d-dev-0-6-2lg3d-dev-0-6-1-latestlg3d-dev-0-6-1-currentlg3d-dev-0-6-1-1lg3d-dev-0-6-1lg3dXORG-6_8-branchCOMPOSITEWRAPEgbert Eich
2004-03-14Importing vendor version xf86-4_4_99_1 on Sun Mar 14 00:26:39 PST 2004xf86-4_4_99_1Egbert Eich
2004-03-03Importing vendor version xf86-4_4_0 on Wed Mar 3 04:09:24 PST 2004xf86-4_4_0STSF-CURRENTEgbert Eich
2004-02-26readding XFree86's cvs IDsxf86-4_3_99_903Egbert Eich
2004-02-26Importing vendor version xf86-4_3_99_903 on Wed Feb 26 01:21:00 PST 2004Egbert Eich
2004-01-29Importing vendor version xf86-012804-2330 on Thu Jan 29 00:06:33 PST 2004xf86-4_3_99_903_specialxf86-012804-2330Egbert Eich
2003-12-19XFree86 4.3.99.902 (RC 2)xf86-4_3_99_902Kaleb Keithley
2003-12-04XFree86 4.3.99.901 (RC 1)xf86-4_3_99_901Kaleb Keithley
2003-11-25XFree86 4.3.99.16 Bring the tree up to date for the Cygwin folksxf86-4_3_99_16Kaleb Keithley
2003-11-14Initial revisionXORG-STABLEKaleb Keithley