emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] trunk r117743: * configure.ac (HAVE_LINUX_SYSINFO): Avoid


From: Dmitry Antipov
Subject: [Emacs-diffs] trunk r117743: * configure.ac (HAVE_LINUX_SYSINFO): Avoid false positive on Solaris.
Date: Tue, 26 Aug 2014 14:43:13 +0000
User-agent: Bazaar (2.6b2)

------------------------------------------------------------
revno: 117743
revision-id: address@hidden
parent: address@hidden
committer: Dmitry Antipov <address@hidden>
branch nick: trunk
timestamp: Tue 2014-08-26 18:42:06 +0400
message:
  * configure.ac (HAVE_LINUX_SYSINFO): Avoid false positive on Solaris.
modified:
  ChangeLog                      changelog-20091113204419-o5vbwnq5f7feedwu-1538
  configure.ac                   
configure.in-20091113204419-o5vbwnq5f7feedwu-783
=== modified file 'ChangeLog'
--- a/ChangeLog 2014-08-26 06:25:59 +0000
+++ b/ChangeLog 2014-08-26 14:42:06 +0000
@@ -5,6 +5,8 @@
        support.  Unconditionally check for sigsetjmp and siglongjmp.
        (HAVE_STACK_OVERFLOW_HANDLING): Define if we can support it.
 
+       (HAVE_LINUX_SYSINFO): Avoid false positive on Solaris.
+
 2014-08-25  Ken Brown  <address@hidden>
 
        * configure.ac (G_SLICE_ALWAYS_MALLOC): Remove obsolete macro.

=== modified file 'configure.ac'
--- a/configure.ac      2014-08-26 06:25:59 +0000
+++ b/configure.ac      2014-08-26 14:42:06 +0000
@@ -1526,10 +1526,15 @@
             [Define to 1 if personality LINUX32 can be set.])
 fi
 
+# Note that Solaris has sys/sysinfo.h which defines struct
+# sysinfo as well.  To make sure that we're using GNU/Linux
+# sysinfo, we explicitly set one of its fields.
 if test "$ac_cv_header_sys_sysinfo_h" = yes; then
   AC_MSG_CHECKING([if Linux sysinfo may be used])
   AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <sys/sysinfo.h>]],
-                                     [[struct sysinfo si; sysinfo (&si)]])],
+                                     [[struct sysinfo si;
+                                       si.totalram = 0;
+                                       sysinfo (&si)]])],
     emacs_cv_linux_sysinfo=yes, emacs_cv_linux_sysinfo=no)
   AC_MSG_RESULT($emacs_cv_linux_sysinfo)
   if test $emacs_cv_linux_sysinfo = yes; then


reply via email to

[Prev in Thread] Current Thread [Next in Thread]