diff -urN shellutils-1.16/debian/rules shellutils-1.16.new/debian/rules --- shellutils-1.16/debian/rules Tue Aug 17 13:30:25 1999 +++ shellutils-1.16.new/debian/rules Tue Aug 17 13:29:32 1999 @@ -62,6 +62,11 @@ : # Do not include `su' on the Hurd. if [ x$(DEB_HOST_GNU_SYSTEM) = xgnu ] ; then rm $(d)/bin/su ; fi + if [ x$(DEB_BUILD_ARCH) = xsparc ] ; then \ + install -m 644 debian/uname-sparc.1 \ + debian/tmp/usr/man/man1/uname.1; \ + fi + : # Link for archaic shells ln -f $(d)/usr/bin/test $(d)/usr/bin/[ ln -s test.1 $(d)/usr/man/man1/[.1 diff -urN shellutils-1.16/debian/uname-sparc.1 shellutils-1.16.new/debian/uname-sparc.1 --- shellutils-1.16/debian/uname-sparc.1 Wed Dec 31 19:00:00 1969 +++ shellutils-1.16.new/debian/uname-sparc.1 Tue Aug 17 13:27:03 1999 @@ -0,0 +1,63 @@ +.TH UNAME 1 "GNU Shell Utilities" "FSF" \" -*- nroff -*- +.SH NAME +uname \- print system information +.SH SYNOPSIS +.B uname +[\-snrvma] [\-\-sysname] [\-\-nodename] [\-\-release] +[\-\-machine] [\-\-all] [\-\-help] [\-\-version] +.SH DESCRIPTION +This documentation is no longer being maintained and may be inaccurate +or incomplete. The Texinfo documentation is now the authoritative source. +.PP +This manual page +documents the GNU version of +.BR uname . +.B uname +prints information about the machine and operating system it is run on. +If no options are given, +.B uname +acts as if the +.I \-s +option +were given. If multiple options are given or the +.I \-a +option is given, the selected information is printed in the order +`snrvm' with a space between items. +.SS OPTIONS +.TP +.I "\-m, \-\-machine" +Print the machine (hardware) type. +.TP +.I "\-n, \-\-nodename" +Print the machine's network node hostname. +.TP +.I "\-r, \-\-release" +Print the operating system release. +.TP +.I "\-s, \-\-sysname" +Print the operating system name. +.TP +.I "\-v" +Print the operating system version. +.TP +.I "\-a, \-\-all" +Print all of the above information. +.TP +.I "\-\-help" +Print a usage message on standard output and exit successfully. +.TP +.I "\-\-version" +Print version information on standard output then exit successfully. +.SH Debian/SPARC Specific Options +.TP +.I "FAKE_SPARC" +This environment variable, when set to "yes" forces the uname machine +output to "sparc". This is useful on Sparc 64 (UltraSPARC) systems when +compiling in a 32bit user space (most sparc64 systems are 32bit user +space running on a 64bit kernel). Most notably this will allow autoconf +configure scripts to correctly identify the environment as "sparc" instead +of "sparc64". +.SH CAVEATS +Linux terminology differs from that of traditional unix. "Release" +in uname refers to what Linux users call "Version", and "Version" +reports build information. diff -urN shellutils-1.16/src/uname.c shellutils-1.16.new/src/uname.c --- shellutils-1.16/src/uname.c Tue Aug 17 13:30:25 1999 +++ shellutils-1.16.new/src/uname.c Tue Aug 17 13:22:00 1999 @@ -94,6 +94,9 @@ struct utsname name; int c; char processor[256]; +#if defined(__sparc__) && defined(__linux__) + char *fake_sparc = getenv("FAKE_SPARC"); +#endif program_name = argv[0]; setlocale (LC_ALL, ""); @@ -167,6 +170,11 @@ error (1, errno, _("cannot get processor type")); #else strcpy (processor, "unknown"); +#endif + +#if defined(__sparc__) && defined(__linux__) + if (fake_sparc != NULL && (fake_sparc[0] == 'y' || fake_sparc[0] == 'Y')) + strcpy (name.machine, "sparc"); #endif print_element (PRINT_SYSNAME, name.sysname);