public inbox for util-linux@vger.kernel.org
 help / color / mirror / Atom feed
From: Sami Kerola <kerolasa@iki.fi>
To: util-linux@vger.kernel.org
Cc: kerolasa@iki.fi
Subject: [PATCH 2/7] setarch: prefer preprocessor rather than autotools check
Date: Sun, 28 Jul 2013 22:11:16 +0100	[thread overview]
Message-ID: <1375045881-11978-2-git-send-email-kerolasa@iki.fi> (raw)
In-Reply-To: <1375045881-11978-1-git-send-email-kerolasa@iki.fi>

It seems to be pointless to spend time in ./configure phase when
preprocessor has to perform #ifndef check anyway.

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
---
 configure.ac        | 12 ------------
 sys-utils/setarch.c | 22 +++++++++++-----------
 2 files changed, 11 insertions(+), 23 deletions(-)

diff --git a/configure.ac b/configure.ac
index 398aaf0..006de93 100644
--- a/configure.ac
+++ b/configure.ac
@@ -252,18 +252,6 @@ AC_CHECK_MEMBERS([struct termios.c_line],,,
 AC_CHECK_MEMBERS([struct stat.st_mtim.tv_nsec],,,
 	[#include <sys/stat.h>])
 
-AC_CHECK_DECLS([
- UNAME26,
- ADDR_NO_RANDOMIZE,
- FDPIC_FUNCPTRS,
- MMAP_PAGE_ZERO,
- ADDR_COMPAT_LAYOUT,
- READ_IMPLIES_EXEC,
- ADDR_LIMIT_32BIT,
- WHOLE_SECONDS,
- STICKY_TIMEOUTS,
- ADDR_LIMIT_3GB], [], [], [#include <linux/personality.h>])
-
 AC_COMPILE_IFELSE([AC_LANG_PROGRAM(
 [[
 #ifdef HAVE_SYS_SWAP_H
diff --git a/sys-utils/setarch.c b/sys-utils/setarch.c
index 051cbef..99724c6 100644
--- a/sys-utils/setarch.c
+++ b/sys-utils/setarch.c
@@ -53,37 +53,37 @@ enum {
 	} while(0)
 
 
-#if !HAVE_DECL_UNAME26
+#ifndef UNAME26
 # define UNAME26                 0x0020000
 #endif
-#if !HAVE_DECL_ADDR_NO_RANDOMIZE
+#ifndef ADDR_NO_RANDOMIZE
 # define ADDR_NO_RANDOMIZE       0x0040000
 #endif
-#if !HAVE_DECL_FDPIC_FUNCPTRS
+#ifndef FDPIC_FUNCPTRS
 # define FDPIC_FUNCPTRS          0x0080000
 #endif
-#if !HAVE_DECL_MMAP_PAGE_ZERO
+#ifndef MMAP_PAGE_ZERO
 # define MMAP_PAGE_ZERO          0x0100000
 #endif
-#if !HAVE_DECL_ADDR_COMPAT_LAYOUT
+#ifndef ADDR_COMPAT_LAYOUT
 # define ADDR_COMPAT_LAYOUT      0x0200000
 #endif
-#if !HAVE_DECL_READ_IMPLIES_EXEC
+#ifndef READ_IMPLIES_EXEC
 # define READ_IMPLIES_EXEC       0x0400000
 #endif
-#if !HAVE_DECL_ADDR_LIMIT_32BIT
+#ifndef ADDR_LIMIT_32BIT
 # define ADDR_LIMIT_32BIT        0x0800000
 #endif
-#if !HAVE_DECL_SHORT_INODE
+#ifndef SHORT_INODE
 # define SHORT_INODE             0x1000000
 #endif
-#if !HAVE_DECL_WHOLE_SECONDS
+#ifndef WHOLE_SECONDS
 # define WHOLE_SECONDS           0x2000000
 #endif
-#if !HAVE_DECL_STICKY_TIMEOUTS
+#ifndef STICKY_TIMEOUTS
 # define STICKY_TIMEOUTS         0x4000000
 #endif
-#if !HAVE_DECL_ADDR_LIMIT_3GB
+#ifndef ADDR_LIMIT_3GB
 # define ADDR_LIMIT_3GB          0x8000000
 #endif
 
-- 
1.8.3.4


  reply	other threads:[~2013-07-28 21:11 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-07-28 21:11 [PATCH 1/7] lscpu: fix shadow declaration [smatch scan] Sami Kerola
2013-07-28 21:11 ` Sami Kerola [this message]
2013-07-28 21:11 ` [PATCH 3/7] build-sys: use m4 quoting consistently Sami Kerola
2013-07-28 21:11 ` [PATCH 4/7] build-sys: prefer AS_CASE rather than shell 'case' Sami Kerola
2013-07-28 21:11 ` [PATCH 5/7] build-sys: prefer AS_IF rather than shell 'if' Sami Kerola
2013-07-28 21:11 ` [PATCH 6/7] build-sys: use backticks rather than $() for commands in configure Sami Kerola
2013-07-28 21:11 ` [PATCH 7/7] rev: use string printing rather than character output Sami Kerola
2013-08-01 11:41 ` [PATCH 1/7] lscpu: fix shadow declaration [smatch scan] Karel Zak

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1375045881-11978-2-git-send-email-kerolasa@iki.fi \
    --to=kerolasa@iki.fi \
    --cc=util-linux@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox