Source-Changes-HG archive

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

[src/netbsd-2-0]: src Pull up revision 1.19 (requested by jmc in ticket #527):



details:   https://anonhg.NetBSD.org/src/rev/7eabf5c650a7
branches:  netbsd-2-0
changeset: 561522:7eabf5c650a7
user:      tron <tron%NetBSD.org@localhost>
date:      Tue Jun 22 07:22:16 2004 +0000

description:
Pull up revision 1.19 (requested by jmc in ticket #527):
Completely rework how tools/compat is done. Purge all uses/references to
_NETBSD_SOURCE as this makes cross building from older/newer versions of
NetBSD harder, not easier (and also makes the resulting tools 'different')
Wrap all required code with the inclusion of nbtool_config.h, attempt to
only use POSIX code in all places (or when reasonable test w. configure and
provide definitions: ala u_int, etc).
Reviewed by lukem. Tested on FreeBSD 4.9, Redhat Linux ES3, NetBSD 1.6.2 x86
NetBSD current (x86 and amd64) and Solaris 9.
Fixes PR's: PR#17762 PR#25944

diffstat:

 usr.bin/stat/stat.c        |  12 ++++++++----
 usr.sbin/makefs/ffs/mkfs.c |   8 ++++++--
 2 files changed, 14 insertions(+), 6 deletions(-)

diffs (77 lines):

diff -r bdb6467a5bb6 -r 7eabf5c650a7 usr.bin/stat/stat.c
--- a/usr.bin/stat/stat.c       Tue Jun 22 07:21:53 2004 +0000
+++ b/usr.bin/stat/stat.c       Tue Jun 22 07:22:16 2004 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: stat.c,v 1.17.2.1 2004/05/30 07:13:26 tron Exp $ */
+/*     $NetBSD: stat.c,v 1.17.2.2 2004/06/22 07:22:16 tron Exp $ */
 
 /*
  * Copyright (c) 2002 The NetBSD Foundation, Inc.
@@ -42,7 +42,7 @@
 
 #include <sys/cdefs.h>
 #if !defined(lint)
-__RCSID("$NetBSD: stat.c,v 1.17.2.1 2004/05/30 07:13:26 tron Exp $");
+__RCSID("$NetBSD: stat.c,v 1.17.2.2 2004/06/22 07:22:16 tron Exp $");
 #endif
 
 #if ! HAVE_NBTOOL_CONFIG_H
@@ -706,8 +706,8 @@
        case SHOW_st_btime:
                if (!gottime) {
                        gottime = 1;
-                       secs = st->st_birthtimespec.tv_sec;
-                       nsecs = st->st_birthtimespec.tv_nsec;
+                       secs = st->st_birthtime;
+                       nsecs = st->st_birthtimensec;
                }
 #endif /* HAVE_STRUCT_STAT_ST_BIRTHTIME */
                small = (sizeof(secs) == 4);
@@ -802,7 +802,9 @@
                                        (void)strcat(sdata, "*");
                                break;
                        case S_IFLNK:   (void)strcat(sdata, "@");       break;
+#ifdef S_IFSOCK
                        case S_IFSOCK:  (void)strcat(sdata, "=");       break;
+#endif
 #ifdef S_IFWHT
                        case S_IFWHT:   (void)strcat(sdata, "%");       break;
 #endif /* S_IFWHT */
@@ -820,7 +822,9 @@
                        case S_IFBLK:   sdata = "Block Device";         break;
                        case S_IFREG:   sdata = "Regular File";         break;
                        case S_IFLNK:   sdata = "Symbolic Link";        break;
+#ifdef S_IFSOCK
                        case S_IFSOCK:  sdata = "Socket";               break;
+#endif
 #ifdef S_IFWHT
                        case S_IFWHT:   sdata = "Whiteout File";        break;
 #endif /* S_IFWHT */
diff -r bdb6467a5bb6 -r 7eabf5c650a7 usr.sbin/makefs/ffs/mkfs.c
--- a/usr.sbin/makefs/ffs/mkfs.c        Tue Jun 22 07:21:53 2004 +0000
+++ b/usr.sbin/makefs/ffs/mkfs.c        Tue Jun 22 07:22:16 2004 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: mkfs.c,v 1.18 2003/09/07 14:24:09 fvdl Exp $   */
+/*     $NetBSD: mkfs.c,v 1.18.2.1 2004/06/22 07:22:16 tron Exp $       */
 
 /*
  * Copyright (c) 2002 Networks Associates Technology, Inc.
@@ -38,13 +38,17 @@
  * SUCH DAMAGE.
  */
 
+#if HAVE_NBTOOL_CONFIG_H
+#include "nbtool_config.h"
+#endif
+
 #include <sys/cdefs.h>
 #ifndef lint
 #if 0
 static char sccsid[] = "@(#)mkfs.c     8.11 (Berkeley) 5/3/95";
 #else
 #ifdef __RCSID
-__RCSID("$NetBSD: mkfs.c,v 1.18 2003/09/07 14:24:09 fvdl Exp $");
+__RCSID("$NetBSD: mkfs.c,v 1.18.2.1 2004/06/22 07:22:16 tron Exp $");
 #endif
 #endif
 #endif /* not lint */



Home | Main Index | Thread Index | Old Index