71 lines
1.8 KiB
Diff
71 lines
1.8 KiB
Diff
From b3f7e7254eefb073dd61119c513cb028291a122a Mon Sep 17 00:00:00 2001
|
|
From: Peter Lemenkov <lemenkov@gmail.com>
|
|
Date: Sat, 18 Sep 2010 09:05:43 +0400
|
|
Subject: [PATCH 03/10] Use macros from config.h instead of HAVE_UTSNAME
|
|
|
|
Signed-off-by: Peter Lemenkov <lemenkov@gmail.com>
|
|
---
|
|
Makefile.am | 6 ------
|
|
configure.ac | 4 ----
|
|
flashrom.c | 6 ++++--
|
|
3 files changed, 4 insertions(+), 12 deletions(-)
|
|
|
|
diff --git a/Makefile.am b/Makefile.am
|
|
index 06e76da..9eb6522 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 c5e89fe..c73e276 100644
|
|
--- a/configure.ac
|
|
+++ b/configure.ac
|
|
@@ -250,9 +250,5 @@ 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 c565a43..6360d97 100644
|
|
--- a/flashrom.c
|
|
+++ b/flashrom.c
|
|
@@ -31,7 +31,9 @@
|
|
#include <stdlib.h>
|
|
#include <ctype.h>
|
|
#include <getopt.h>
|
|
-#if HAVE_UTSNAME == 1
|
|
+#include "config.h"
|
|
+
|
|
+#if HAVE_SYS_UTSNAME_H == 1
|
|
#include <sys/utsname.h>
|
|
#endif
|
|
#include "flash.h"
|
|
@@ -1607,7 +1609,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.6.4
|
|
|