summaryrefslogtreecommitdiff
path: root/src/uname.c
AgeCommit message (Collapse)Author
2007-07-23Update all copyright notices to use the newer form.Jim Meyering
2007-07-10New program: archKarel Zak
* NEWS: Mention arch. * README: Add arch to the list of programs. * AUTHORS: Add arch. * src/uname.c: Include "uname.h". (PROGRAM_NAME): Handle arch, too. (ARCH_AUTHORS): Define. (uname_long_options, arch_long_options): Renamed and new globals. (usage): Handle arch-mode as well as uname-mode. (decode_switches): New function, extracted from main, to handle arch-mode as well as uname-mode. (main): Handle both modes. * src/uname-arch.c: New program, alias for "uname -m". * src/uname-uname.c: New file, default uname mode. * src/uname.h: New file, uname modes. * src/Makefile.am (EXTRA_PROGRAMS): Add arch. (uname_SOURCES, arch_SOURCES): Define. * man/arch.x: New file. * man/Makefile.am (dist_man_MANS): Add arch.1. (arch.1): New dependency. * tests/misc/arch: New test, compare "arch" with "uname -m" * configure.ac (OPTIONAL_BIN_PROGS): Add arch. (MAN): Add arch.1. * .x-sc_require_config_h: Exempt uname-arch.c and uname-uname.c from the always-include-<config.h> rule. Signed-off-by: Karel Zak <kzak@redhat.com> Signed-off-by: Jim Meyering <jim@meyering.net>
2007-07-10Change "version 2" to "version 3" in all copyright notices.Jim Meyering
2007-03-28Help translators include translation team's web or email address.Jim Meyering
* src/system.h (emit_bug_reporting_address): New function. * src/base64.c: Use it rather than a literal printf. * src/basename.c, src/cat.c, src/chgrp.c, src/chmod.c: * src/chown.c, src/chroot.c, src/cksum.c, src/comm.c, src/cp.c: * src/csplit.c, src/cut.c, src/date.c, src/dd.c, src/df.c: * src/dircolors.c, src/dirname.c, src/du.c, src/echo.c, src/env.c: * src/expand.c, src/expr.c, src/factor.c, src/fmt.c, src/fold.c: * src/head.c, src/hostid.c, src/hostname.c, src/id.c, src/install.c: * src/join.c, src/kill.c, src/link.c, src/ln.c, src/logname.c: * src/ls.c, src/md5sum.c, src/mkdir.c, src/mkfifo.c, src/mknod.c: * src/mv.c, src/nice.c, src/nl.c, src/nohup.c, src/od.c: * src/paste.c, src/pathchk.c, src/pinky.c, src/pr.c, src/printenv.c: * src/printf.c, src/ptx.c, src/pwd.c, src/readlink.c, src/rm.c: * src/rmdir.c, src/seq.c, src/setuidgid.c, src/shred.c, src/shuf.c: * src/sleep.c, src/sort.c, src/split.c, src/stat.c, src/stty.c: * src/su.c, src/sum.c, src/sync.c, src/system.h, src/tac.c: * src/tail.c, src/tee.c, src/test.c, src/touch.c, src/tr.c: * src/true.c, src/tsort.c, src/tty.c, src/uname.c, src/unexpand.c: * src/uniq.c, src/unlink.c, src/uptime.c, src/users.c, src/wc.c: * src/who.c, src/whoami.c, src/yes.c: Likewise.
2006-08-17Add/fix copyright notices and adjust to latest GNU FDL.Paul Eggert
2005-09-15(usage, main): uname -a no longer generates the -p and -i outputs ifPaul Eggert
they are unknown.
2005-05-14Update FSF postal mail address.Jim Meyering
2005-05-14Update FSF postal mail address.Jim Meyering
2005-03-29Indent cpp directives.Jim Meyering
2004-11-09[__APPLE__]: Include <mach/machine.h> and <mach-o/arch.h>.Jim Meyering
(main) [__APPLE__]: Get the processor type via syscall rather than hard-coding "powerpc". From toby@opendarwin.org.
2004-09-21Remove unused "case 0".Paul Eggert
2004-08-04Do not depend on HAVE_SYSCTL when decidingPaul Eggert
whether to include files. Include <sys/param.h> if HAVE_SYS_PARAM_H (not HAVE_SYSCTL). (main) [defined __POWERPC__]: Add a kludge to work around a Mac OS X bug, so that uname -p defaults to "powerpc" if sysctl ((int[]) {CTL_HW, HW_MACHINE_ARCH}, 2, buffer, &bufsize, 0, 0) fails. Problem reported by Petter Reinholdtsen in: http://lists.gnu.org/archive/html/bug-gnu-utils/2003-02/msg00201.html
2004-08-03(print_element): Use bool for booleans.Paul Eggert
2004-06-21(main): Standardize on the diagnostics given when someone givesJim Meyering
too few operands ("missing operand after `xxx'") or too many operands ("extra operand `xxx'"). Include "quote.h" and/or "error.h" if it wasn't already being included.
2004-06-08(main): Fix typo introduced on 2003-05-10 thatJim Meyering
prevented a diagnostic of any operands.
2004-01-21(usage): Use EXIT_SUCCESS, not 0, for clarity.Jim Meyering
2003-10-18Most .c files (AUTHORS): Revert the WRITTEN_BY/AUTHORS changeJim Meyering
of 2003-09-19. Now, AUTHORS is a comma-separated list of strings. Update the call to parse_long_options so that `AUTHORS, NULL' are the last parameters. * src/true.c (main): Append NULL to version_etc argument list. * src/sys2.h (case_GETOPT_VERSION_CHAR): Likewise.
2003-09-18(WRITTEN_BY): Rename from AUTHORS.Jim Meyering
Begin each WRITTEN_BY string with `Written by ' and end it with `.'. Mark each WRITTEN_BY string as translatable.
2003-07-23Don't include headers already included by system.h:Jim Meyering
Don't include closeout.h.
2003-06-17(main): Call initialize_main.Jim Meyering
2003-05-10(main): When failing due to unaccepted arguments,Jim Meyering
also say `too many arguments' rather than just `Try `uname --help' for more information.'.
2002-08-31Change `exit (0)' to `exit (EXIT_SUCCESS)',Jim Meyering
`exit (1)' to `exit (EXIT_FAILURE)', and `usage (1)' to `usage (EXIT_FAILURE)'.
2002-08-30Change `error (1, ...' to `error (EXIT_FAILURE, ...'.Jim Meyering
2002-07-18(main): Test sysctl(...) >= 0, not == 0, sinceJim Meyering
on NetBSD the return value may well be positive. Use one-line aggregate initializations. Use tightly scoped static buffers to avoid warnings about unused variables on some systems.
2002-07-18(UNAME_HARDWARE_PLATFORM, UNAME_PROCESSOR): New macros.Jim Meyering
(main): Use them, along with sysctl, to support uname -i and uname -p on BSD hosts.
2002-07-15Remove unnecessary uses of `defined' whenJim Meyering
operating on `HAVE_...' symbols. Remove unnecessary parentheses.
2002-07-02(usage): Use the PACKAGE_BUGREPORT e-mail address, rather than hard-coding it.Jim Meyering
2001-12-15Use new macros, HELP_OPTION_DESCRIPTION and VERSION_OPTION_DESCRIPTIONJim Meyering
instead of hard-coding --help and --version descriptions. Split --help output into smaller pieces. Use fputs, not printf.
2001-09-07Correct copyright notice as per latest coding standards.Jim Meyering
Remove list of options in comment, which wasn't worth maintaining separately from usage(). (print_element): Move definition up, avoiding the need for declaration and allowing inlining on some platforms. Keep track of whether something has been printed; this is more natural than modifying `toprint'. (PRINT_KERNEL_NAME): Renamed from PRINT_SYSNAME. (PRINT_KERNEL_RELEASE): Renamed from PRINT_RELEASE. (PRINT_KERNEL_VERSION): Renamed from PRINT_VERSION. (PRINT_HARDWARE_PLATFORM, PRINT_OPERATING_SYSTEM): New macros. (toprint): Remove global var; now local in `main'. (long_options, usage, main): Implement changes described in NEWS. Reorder options to reflect output order. (main): Use buffers one byte longer, for compatibility with Solaris 8. Output newline at end. -a sets `toprint' to -1 now; this is simpler. Do not bother invoking system calls like uname if the resulting information does not need to be printed. Do not fail if sysinfo fails; just print "unknown".
2000-05-07Include "closeout.h".Jim Meyering
(main): Call atexit with close_stdout.
1999-03-31No longer include long-options.h.Jim Meyering
[long_options]: Add entries for --help and --version. Remove parse_long_options call. (main) [getopt switch]: Add a case for each of --help and --version.
1999-03-31(PROGRAM_NAME, AUTHORS): Define and use.Jim Meyering
1999-03-06Include long-options.h.Jim Meyering
[long_options]: Remove the "help" and "version" entries. Remove declarations of show_help and show_version. (main): Use parse_long_options, including author name(s). Remove the show_version and show_help blocks.
1999-01-25(usage): Remove static attribute.Jim Meyering
Move function be the first in the file.
1998-09-19update bug-reporting addressJim Meyering
1997-12-21s/__P/PARAMS/Jim Meyering
1997-10-07update bug-reporting addressJim Meyering
1997-05-01indent cpp-directivesJim Meyering
1997-02-09update copyrights for 1997Jim Meyering
1997-02-01bracket bug address with <> and append a periodJim Meyering
1997-02-01Compare getopt_long return value against -1, not EOF. Use NULL, not '(int ↵Jim Meyering
*) 0' as last parameter in getopt_long call.
1996-11-30(main) [HAVE_SYSINFO && SI_ARCHITECTURE]: Support -p (print processor type).Jim Meyering
(usage): Document it.
1996-11-03change bug-reporting addressJim Meyering
1996-11-02change bug-reporting addressJim Meyering
1996-10-05(main): update --version output to conform to coding standardJim Meyering
1996-09-02(usage): Tell where to report bugs.Jim Meyering
1996-04-24update Copyright years for 1996Jim Meyering
1996-03-24Update FSF's address.Jim Meyering
1996-03-21(main): Declare to be of type int, not void.Jim Meyering
1996-03-16Don't include version.h.Jim Meyering
(main): Use PACKAGE_VERSION instead of version_string.