X-Git-Url: http://erislabs.net/gitweb/?a=blobdiff_plain;ds=sidebyside;f=lib%2Fphysmem.c;h=844817bf0a98e2fd28ef3baa17c8808b86867185;hb=8436691c12d9e2397dcd604c7ea261314520af9a;hp=4f192d11b2bbb0124370bda595d1fc8947780710;hpb=33ad5e9f9a412dffe953ed2dacff65700827710d;p=gnulib.git diff --git a/lib/physmem.c b/lib/physmem.c index 4f192d11b..844817bf0 100644 --- a/lib/physmem.c +++ b/lib/physmem.c @@ -1,5 +1,7 @@ /* Calculate the size of physical memory. - Copyright (C) 2000, 2001, 2003 Free Software Foundation, Inc. + + Copyright (C) 2000, 2001, 2003, 2005, 2006 Free Software + Foundation, Inc. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -13,19 +15,15 @@ You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, - Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ + Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ /* Written by Paul Eggert. */ -#if HAVE_CONFIG_H -# include -#endif +#include #include "physmem.h" -#if HAVE_UNISTD_H -# include -#endif +#include #if HAVE_SYS_PSTAT_H # include @@ -82,7 +80,7 @@ typedef WINBOOL (WINAPI *PFN_MS_EX) (lMEMORYSTATUSEX*); /* Return the total amount of physical memory. */ double -physmem_total () +physmem_total (void) { #if defined _SC_PHYS_PAGES && defined _SC_PAGESIZE { /* This works on linux-gnu, solaris2 and cygwin. */ @@ -186,7 +184,7 @@ physmem_total () /* Return the amount of physical memory available. */ double -physmem_available () +physmem_available (void) { #if defined _SC_AVPHYS_PAGES && defined _SC_PAGESIZE { /* This works on linux-gnu, solaris2 and cygwin. */ @@ -292,7 +290,7 @@ physmem_available () # include int -main () +main (void) { printf ("%12.f %12.f\n", physmem_total (), physmem_available ()); exit (0); @@ -302,6 +300,6 @@ main () /* Local Variables: -compile-command: "gcc -DDEBUG -DHAVE_CONFIG_H -I.. -g -O -Wall -W physmem.c" +compile-command: "gcc -DDEBUG -g -O -Wall -W physmem.c" End: */