71 lines
1.8 KiB
Diff
71 lines
1.8 KiB
Diff
From a71a0e40017c72d863fb88832ff984d02d8e7714 Mon Sep 17 00:00:00 2001
|
|
From: Peter Lemenkov <lemenkov@gmail.com>
|
|
Date: Sat, 18 Sep 2010 09:05:43 +0400
|
|
Subject: [PATCH 3/9] Use macros from configure stage instead of HAVE_UTSNAME
|
|
|
|
Signed-off-by: Peter Lemenkov <lemenkov@gmail.com>
|
|
---
|
|
Makefile.am | 6 ------
|
|
configure.ac | 4 ----
|
|
flashrom.c | 5 +++--
|
|
3 files changed, 3 insertions(+), 12 deletions(-)
|
|
|
|
diff --git a/Makefile.am b/Makefile.am
|
|
index a539f12..5c4ee86 100644
|
|
--- a/Makefile.am
|
|
+++ b/Makefile.am
|
|
@@ -5,12 +5,6 @@ man_MANS = flashrom.8
|
|
# FIXME use "config.h" in the future
|
|
DEFS += -DFLASHROM_VERSION=\"@VERSION@\"
|
|
|
|
-if HAVE_SYS_UTSNAME
|
|
-if HAVE_UNAME
|
|
-DEFS += -DHAVE_UTSNAME=1
|
|
-endif
|
|
-endif
|
|
-
|
|
if HAVE_DMIDECODE
|
|
DEFS += -DDMIDECODE_PATH=\"@DMIDECODE@\"
|
|
else
|
|
diff --git a/configure.ac b/configure.ac
|
|
index 6bbeac0..be5503a 100644
|
|
--- a/configure.ac
|
|
+++ b/configure.ac
|
|
@@ -307,10 +307,6 @@ AM_CONDITIONAL(HAVE_SERIAL, test "$serial" = "yes")
|
|
AM_CONDITIONAL(HAVE_PCI, test "$pci" = "yes")
|
|
AM_CONDITIONAL(HAVE_PRINT_WIKI, test "$print_wiki" = "yes")
|
|
|
|
-# FIXME remove in the future
|
|
-AM_CONDITIONAL(HAVE_SYS_UTSNAME, test "$ac_cv_header_sys_utsname_h" = "yes")
|
|
-AM_CONDITIONAL(HAVE_UNAME, test "$ac_cv_func_uname" = "yes")
|
|
-
|
|
AC_CONFIG_FILES([Makefile])
|
|
AC_OUTPUT
|
|
|
|
diff --git a/flashrom.c b/flashrom.c
|
|
index 0fdcd5f..b0df817 100644
|
|
--- a/flashrom.c
|
|
+++ b/flashrom.c
|
|
@@ -31,7 +31,8 @@
|
|
#include <stdlib.h>
|
|
#include <ctype.h>
|
|
#include <getopt.h>
|
|
-#if HAVE_UTSNAME == 1
|
|
+
|
|
+#if HAVE_SYS_UTSNAME_H == 1
|
|
#include <sys/utsname.h>
|
|
#endif
|
|
#include "flash.h"
|
|
@@ -1485,7 +1486,7 @@ void list_programmers_linebreak(int startcol, int cols, int paren)
|
|
|
|
void print_sysinfo(void)
|
|
{
|
|
-#if HAVE_UTSNAME == 1
|
|
+#if HAVE_UNAME == 1
|
|
struct utsname osinfo;
|
|
uname(&osinfo);
|
|
|
|
--
|
|
1.7.10.4
|
|
|