*** sh-utils-2.0.11/lib/xstat.in.bak Sun Oct 29 13:28:55 2000 --- sh-utils-2.0.11/lib/xstat.in Sat Jul 13 15:01:42 2002 *************** *** 4,10 **** /* Work around the bug in some systems whereby @xstat@ succeeds when given the zero-length file name argument. The @xstat@ from SunOS4.1.4 has this bug. ! Copyright (C) 1997-2000 Free Software Foundation, Inc. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by --- 4,10 ---- /* Work around the bug in some systems whereby @xstat@ succeeds when given the zero-length file name argument. The @xstat@ from SunOS4.1.4 has this bug. ! Copyright (C) 1997-2002 Free Software Foundation, Inc. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by *************** *** 31,36 **** --- 31,37 ---- extern int errno; #endif @BEGIN_LSTAT_ONLY@ + #include #if HAVE_STDLIB_H # include *** sh-utils-2.0.11/lib/mountlist.c.bak Sat Jul 1 15:36:04 2000 --- sh-utils-2.0.11/lib/mountlist.c Sat Jul 13 15:16:00 2002 *************** *** 123,128 **** --- 123,129 ---- # include #endif + #undef MNT_IGNORE #if defined (MNTOPT_IGNORE) && defined (HAVE_HASMNTOPT) # define MNT_IGNORE(M) hasmntopt ((M), MNTOPT_IGNORE) #else *** sh-utils-2.0.11/src/uname.c.bak Sat May 6 16:17:53 2000 --- sh-utils-2.0.11/src/uname.c Sat Jul 13 17:01:40 2002 *************** *** 1,5 **** /* uname -- print system information ! Copyright (C) 1989-2000 Free Software Foundation, Inc. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by --- 1,5 ---- /* uname -- print system information ! Copyright (C) 1989-2002 Free Software Foundation, Inc. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by *************** *** 38,43 **** --- 38,47 ---- # include #endif + #if defined (HAVE_SYSCTL) && defined (HAVE_SYS_SYSCTL_H) + # include + #endif + #include "system.h" #include "error.h" #include "closeout.h" *************** *** 187,193 **** --- 191,211 ---- if (sysinfo (SI_ARCHITECTURE, processor, sizeof (processor)) == -1) error (1, errno, _("cannot get processor type")); #else + # if defined (HAVE_SYSCTL) && defined (HAVE_SYS_SYSCTL_H) && defined (HW_MODEL) + /* FreeBSD specific: fetch sysctl "hw.model". */ + { + int request[2] = { CTL_HW, HW_MODEL }; + size_t result_len = sizeof (processor); + + if (sysctl (request, 2, processor, &result_len, NULL, 0) >= 0 + && result_len < sizeof (processor)) + processor[result_len] = '\0'; + else + strcpy (processor, "unknown"); + } + # else strcpy (processor, "unknown"); + # endif #endif print_element (PRINT_SYSNAME, name.sysname); *** sh-utils-2.0.11/src/uptime.c.bak Sat May 6 16:18:05 2000 --- sh-utils-2.0.11/src/uptime.c Sat Jul 13 17:07:23 2002 *************** *** 1,5 **** /* GNU's uptime. ! Copyright (C) 1992-2000 Free Software Foundation, Inc. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by --- 1,5 ---- /* GNU's uptime. ! Copyright (C) 1992-2002 Free Software Foundation, Inc. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by *************** *** 21,26 **** --- 21,30 ---- #include #include + #if defined (HAVE_SYSCTL) && defined (HAVE_SYS_SYSCTL_H) + # include + #endif + #include "error.h" #include "long-options.h" #include "readutmp.h" *************** *** 78,83 **** --- 82,98 ---- fclose (fp); } #endif /* HAVE_PROC_UPTIME */ + #if defined (HAVE_SYSCTL) && defined (HAVE_SYS_SYSCTL_H) && defined (KERN_BOOTTIME) + /* FreeBSD specific: fetch sysctl "kern.boottime". */ + { + int request[2] = { CTL_KERN, KERN_BOOTTIME }; + struct timeval result; + size_t result_len = sizeof (result); + + if (sysctl (request, 2, &result, &result_len, NULL, 0) >= 0) + boot_time = result.tv_sec; + } + #endif /* Loop through all the utmp entries we just read and count up the valid ones, also in the process possibly gleaning boottime. */ while (n--) *** sh-utils-2.0.11/m4/ls-mntd-fs.m4.bak Sat Jul 1 15:44:25 2000 --- sh-utils-2.0.11/m4/ls-mntd-fs.m4 Sat Jul 13 15:09:48 2002 *************** *** 53,58 **** --- 53,81 ---- fi fi + if test -z "$ac_list_mounted_fs"; then + # 4.4BSD and DEC OSF/1. + AC_MSG_CHECKING([for getmntinfo function]) + AC_CACHE_VAL(fu_cv_sys_mounted_getmntinfo, + [ + ok= + if test $ac_cv_func_getmntinfo = yes; then + AC_EGREP_HEADER(f_type;, sys/mount.h, + ok=yes) + fi + test -n "$ok" \ + && fu_cv_sys_mounted_getmntinfo=yes \ + || fu_cv_sys_mounted_getmntinfo=no + ]) + AC_MSG_RESULT($fu_cv_sys_mounted_getmntinfo) + if test $fu_cv_sys_mounted_getmntinfo = yes; then + ac_list_mounted_fs=found + AC_DEFINE(MOUNTED_GETMNTINFO, 1, + [Define if there is a function named getmntinfo for reading the + list of mounted filesystems. (4.4BSD)]) + fi + fi + if test $ac_cv_func_getmntent = yes; then # This system has the getmntent function. *************** *** 156,184 **** fi if test -z "$ac_list_mounted_fs"; then - # 4.4BSD and DEC OSF/1. - AC_MSG_CHECKING([for getmntinfo function]) - AC_CACHE_VAL(fu_cv_sys_mounted_getmntinfo, - [ - ok= - if test $ac_cv_func_getmntinfo = yes; then - AC_EGREP_HEADER(f_type;, sys/mount.h, - ok=yes) - fi - test -n "$ok" \ - && fu_cv_sys_mounted_getmntinfo=yes \ - || fu_cv_sys_mounted_getmntinfo=no - ]) - AC_MSG_RESULT($fu_cv_sys_mounted_getmntinfo) - if test $fu_cv_sys_mounted_getmntinfo = yes; then - ac_list_mounted_fs=found - AC_DEFINE(MOUNTED_GETMNTINFO, 1, - [Define if there is a function named getmntinfo for reading the - list of mounted filesystems. (4.4BSD)]) - fi - fi - - if test -z "$ac_list_mounted_fs"; then # Ultrix AC_MSG_CHECKING([for getmnt function]) AC_CACHE_VAL(fu_cv_sys_mounted_getmnt, --- 179,184 ---- *** sh-utils-2.0.11/config.guess.bak Thu Oct 19 16:19:13 2000 --- sh-utils-2.0.11/config.guess Sat Jul 13 14:59:53 2002 *************** *** 658,664 **** echo ${UNAME_MACHINE}-unknown-bsdi${UNAME_RELEASE} exit 0 ;; *:FreeBSD:*:*) ! echo ${UNAME_MACHINE}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` exit 0 ;; *:OpenBSD:*:*) echo ${UNAME_MACHINE}-unknown-openbsd`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'` --- 658,676 ---- echo ${UNAME_MACHINE}-unknown-bsdi${UNAME_RELEASE} exit 0 ;; *:FreeBSD:*:*) ! # Determine whether the default compiler uses glibc. ! eval $set_cc_for_build ! sed 's/^ //' << EOF >$dummy.c ! #include ! #if __GLIBC__ >= 2 ! LIBC=gnu ! #else ! LIBC= ! #endif ! EOF ! eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^LIBC=` ! rm -f $dummy.c ! echo ${UNAME_MACHINE}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`${LIBC:+-$LIBC} exit 0 ;; *:OpenBSD:*:*) echo ${UNAME_MACHINE}-unknown-openbsd`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'` *** sh-utils-2.0.11/config.sub.bak Thu Oct 19 16:19:14 2000 --- sh-utils-2.0.11/config.sub Sat Jul 13 15:00:32 2002 *************** *** 105,111 **** # Here we must recognize all the valid KERNEL-OS combinations. maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'` case $maybe_os in ! nto-qnx* | linux-gnu*) os=-$maybe_os basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'` ;; --- 105,111 ---- # Here we must recognize all the valid KERNEL-OS combinations. maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'` case $maybe_os in ! nto-qnx* | linux-gnu* | freebsd*-gnu*) os=-$maybe_os basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'` ;; *** sh-utils-2.0.11/configure.bak Sun Oct 29 08:58:57 2000 --- sh-utils-2.0.11/configure Sat Jul 13 15:12:12 2002 *************** *** 15724,15729 **** --- 15724,15771 ---- fi fi + if test -z "$ac_list_mounted_fs"; then + # 4.4BSD and DEC OSF/1. + echo "configure:15923: checking for getmntinfo function" >&5 + echo $ECHO_N "checking for getmntinfo function... $ECHO_C" >&6 + if test "${fu_cv_sys_mounted_getmntinfo+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 + else + + ok= + if test $ac_cv_func_getmntinfo = yes; then + cat >conftest.$ac_ext <<_ACEOF + #line 15932 "configure" + #include "confdefs.h" + #include + + _ACEOF + if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + egrep "f_type;" >/dev/null 2>&1; then + ok=yes + + fi + rm -f conftest* + + fi + test -n "$ok" \ + && fu_cv_sys_mounted_getmntinfo=yes \ + || fu_cv_sys_mounted_getmntinfo=no + + fi + + echo "configure:15951: result: $fu_cv_sys_mounted_getmntinfo" >&5 + echo "${ECHO_T}$fu_cv_sys_mounted_getmntinfo" >&6 + if test $fu_cv_sys_mounted_getmntinfo = yes; then + ac_list_mounted_fs=found + + cat >>confdefs.h <<\EOF + #define MOUNTED_GETMNTINFO 1 + EOF + + fi + fi + if test $ac_cv_func_getmntent = yes; then # This system has the getmntent function. *************** *** 15919,15966 **** fi if test -z "$ac_list_mounted_fs"; then - # 4.4BSD and DEC OSF/1. - echo "configure:15923: checking for getmntinfo function" >&5 - echo $ECHO_N "checking for getmntinfo function... $ECHO_C" >&6 - if test "${fu_cv_sys_mounted_getmntinfo+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 - else - - ok= - if test $ac_cv_func_getmntinfo = yes; then - cat >conftest.$ac_ext <<_ACEOF - #line 15932 "configure" - #include "confdefs.h" - #include - - _ACEOF - if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - egrep "f_type;" >/dev/null 2>&1; then - ok=yes - - fi - rm -f conftest* - - fi - test -n "$ok" \ - && fu_cv_sys_mounted_getmntinfo=yes \ - || fu_cv_sys_mounted_getmntinfo=no - - fi - - echo "configure:15951: result: $fu_cv_sys_mounted_getmntinfo" >&5 - echo "${ECHO_T}$fu_cv_sys_mounted_getmntinfo" >&6 - if test $fu_cv_sys_mounted_getmntinfo = yes; then - ac_list_mounted_fs=found - - cat >>confdefs.h <<\EOF - #define MOUNTED_GETMNTINFO 1 - EOF - - fi - fi - - if test -z "$ac_list_mounted_fs"; then # Ultrix echo "configure:15965: checking for getmnt function" >&5 echo $ECHO_N "checking for getmnt function... $ECHO_C" >&6 --- 15961,15966 ---- *** sh-utils-2.0.11/aclocal.m4.bak Sun Oct 29 08:58:39 2000 --- sh-utils-2.0.11/aclocal.m4 Sat Jul 13 15:11:01 2002 *************** *** 3020,3025 **** --- 3020,3048 ---- fi fi + if test -z "$ac_list_mounted_fs"; then + # 4.4BSD and DEC OSF/1. + AC_MSG_CHECKING([for getmntinfo function]) + AC_CACHE_VAL(fu_cv_sys_mounted_getmntinfo, + [ + ok= + if test $ac_cv_func_getmntinfo = yes; then + AC_EGREP_HEADER(f_type;, sys/mount.h, + ok=yes) + fi + test -n "$ok" \ + && fu_cv_sys_mounted_getmntinfo=yes \ + || fu_cv_sys_mounted_getmntinfo=no + ]) + AC_MSG_RESULT($fu_cv_sys_mounted_getmntinfo) + if test $fu_cv_sys_mounted_getmntinfo = yes; then + ac_list_mounted_fs=found + AC_DEFINE(MOUNTED_GETMNTINFO, 1, + [Define if there is a function named getmntinfo for reading the + list of mounted filesystems. (4.4BSD)]) + fi + fi + if test $ac_cv_func_getmntent = yes; then # This system has the getmntent function. *************** *** 3123,3151 **** fi if test -z "$ac_list_mounted_fs"; then - # 4.4BSD and DEC OSF/1. - AC_MSG_CHECKING([for getmntinfo function]) - AC_CACHE_VAL(fu_cv_sys_mounted_getmntinfo, - [ - ok= - if test $ac_cv_func_getmntinfo = yes; then - AC_EGREP_HEADER(f_type;, sys/mount.h, - ok=yes) - fi - test -n "$ok" \ - && fu_cv_sys_mounted_getmntinfo=yes \ - || fu_cv_sys_mounted_getmntinfo=no - ]) - AC_MSG_RESULT($fu_cv_sys_mounted_getmntinfo) - if test $fu_cv_sys_mounted_getmntinfo = yes; then - ac_list_mounted_fs=found - AC_DEFINE(MOUNTED_GETMNTINFO, 1, - [Define if there is a function named getmntinfo for reading the - list of mounted filesystems. (4.4BSD)]) - fi - fi - - if test -z "$ac_list_mounted_fs"; then # Ultrix AC_MSG_CHECKING([for getmnt function]) AC_CACHE_VAL(fu_cv_sys_mounted_getmnt, --- 3146,3151 ----