]> granicus.if.org Git - strace/commitdiff
sysinfo.c: remove obsolete code
authorElvira Khabirova <lineprinter0@gmail.com>
Mon, 3 Aug 2015 02:37:52 +0000 (05:37 +0300)
committerDmitry V. Levin <ldv@altlinux.org>
Sun, 16 Aug 2015 09:37:28 +0000 (09:37 +0000)
struct sysinfo members totalhigh, freehigh and mem_unit are present
since Linux 2.3.48.

* configure.ac (AC_CHECK_MEMBERS): Remove struct sysinfo checks.
* sysinfo.c (sys_sysinfo): Remove HAVE_STRUCT_SYSINFO_* checks.

configure.ac
sysinfo.c

index f66fb002fb51c9fd71cbc9c598ad4edadc26b001..fbd20d21cfc625acd642c15ceb85e23070815e02 100644 (file)
@@ -314,10 +314,6 @@ AC_CHECK_MEMBERS([struct sigevent._sigev_un._pad,
                  siginfo_t.si_timerid,
                  siginfo_t.si_overrun],,, [#include <signal.h>])
 
-AC_CHECK_MEMBERS([struct sysinfo.totalhigh,
-                 struct sysinfo.freehigh,
-                 struct sysinfo.mem_unit],,, [#include <sys/sysinfo.h>])
-
 AC_CHECK_TYPES([struct flock64],,, [#include <fcntl.h>])
 
 AC_CHECK_HEADERS([libaio.h], [
index 0e724dad8b7e08406f31ac586296e911f3836085..4d9e30c67ecaac21ca630f46517fbb36d464ce3d 100644 (file)
--- a/sysinfo.c
+++ b/sysinfo.c
@@ -18,15 +18,9 @@ SYS_FUNC(sysinfo)
                        ", totalswap=%llu"
                        ", freeswap=%llu"
                        ", procs=%u"
-#ifdef HAVE_STRUCT_SYSINFO_TOTALHIGH
                        ", totalhigh=%llu"
-#endif
-#ifdef HAVE_STRUCT_SYSINFO_FREEHIGH
                        ", freehigh=%llu"
-#endif
-#ifdef HAVE_STRUCT_SYSINFO_MEM_UNIT
                        ", mem_unit=%u"
-#endif
                        "}",
                        (unsigned long long) si.uptime
                        , (unsigned long long) si.loads[0]
@@ -39,15 +33,9 @@ SYS_FUNC(sysinfo)
                        , (unsigned long long) si.totalswap
                        , (unsigned long long) si.freeswap
                        , (unsigned) si.procs
-#ifdef HAVE_STRUCT_SYSINFO_TOTALHIGH
                        , (unsigned long long) si.totalhigh
-#endif
-#ifdef HAVE_STRUCT_SYSINFO_FREEHIGH
                        , (unsigned long long) si.freehigh
-#endif
-#ifdef HAVE_STRUCT_SYSINFO_MEM_UNIT
                        , si.mem_unit
-#endif
                        );
        }