Source-Changes-HG archive

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

[src/trunk]: src/usr.bin/stat Unset HAVE_DEVNAME for tools build.



details:   https://anonhg.NetBSD.org/src/rev/050f498512c1
branches:  trunk
changeset: 783675:050f498512c1
user:      dsl <dsl%NetBSD.org@localhost>
date:      Thu Jan 03 13:28:41 2013 +0000

description:
Unset HAVE_DEVNAME for tools build.
config only checks for the symbol in libc, we need the correct prototype.
Which is excluded even on NetBSD (_NETBSD_SOURCE isn't defined in stdlib.h).

diffstat:

 usr.bin/stat/stat.c |  12 +++++++-----
 1 files changed, 7 insertions(+), 5 deletions(-)

diffs (37 lines):

diff -r e4b68803170c -r 050f498512c1 usr.bin/stat/stat.c
--- a/usr.bin/stat/stat.c       Thu Jan 03 13:19:32 2013 +0000
+++ b/usr.bin/stat/stat.c       Thu Jan 03 13:28:41 2013 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: stat.c,v 1.37 2012/12/02 21:13:07 erh Exp $ */
+/*     $NetBSD: stat.c,v 1.38 2013/01/03 13:28:41 dsl Exp $ */
 
 /*
  * Copyright (c) 2002-2011 The NetBSD Foundation, Inc.
@@ -31,11 +31,13 @@
 
 #if HAVE_NBTOOL_CONFIG_H
 #include "nbtool_config.h"
+/* config checked libc, we need the prototype as well */
+#undef HAVE_DEVNAME
 #endif
 
 #include <sys/cdefs.h>
 #if !defined(lint)
-__RCSID("$NetBSD: stat.c,v 1.37 2012/12/02 21:13:07 erh Exp $");
+__RCSID("$NetBSD: stat.c,v 1.38 2013/01/03 13:28:41 dsl Exp $");
 #endif
 
 #if ! HAVE_NBTOOL_CONFIG_H
@@ -607,9 +609,9 @@
                sdata = (what == SHOW_st_dev) ?
                    devname(st->st_dev, S_IFBLK) :
                    devname(st->st_rdev, 
-                   S_ISCHR(st->st_mode) ? S_IFCHR :
-                   S_ISBLK(st->st_mode) ? S_IFBLK :
-                   0U);
+                       S_ISCHR(st->st_mode) ? S_IFCHR :
+                       S_ISBLK(st->st_mode) ? S_IFBLK :
+                       0U);
                if (sdata == NULL)
                        sdata = "???";
 #endif /* HAVE_DEVNAME */



Home | Main Index | Thread Index | Old Index