bc: convert to "G trick" - this returns bc to zero bss increase
[oweals/busybox.git] / coreutils / uname.c
index d6e447e33c3c4835d2bdc5c8a9b683eebdecac1a..765809658a1e600b008a0c4303e295f286d3c5ff 100644 (file)
@@ -1,5 +1,6 @@
 /* vi: set sw=4 ts=4: */
-/* uname -- print system information
+/*
+ * uname -- print system information
  * Copyright (C) 1989-1999 Free Software Foundation, Inc.
  *
  * Licensed under GPLv2 or later, see file LICENSE in this source tree.
@@ -126,11 +127,9 @@ int uname_main(int argc UNUSED_PARAM, char **argv UNUSED_PARAM)
 {
        uname_info_t uname_info;
        IF_UNAME(const char *unknown_str = "unknown";)
-       unsigned toprint;
-
-       toprint = (1 << 4); /* "arch" = "uname -m" */
-
 #if ENABLE_UNAME
+       unsigned toprint = (1 << 4); /* "arch" = "uname -m" */
+
        if (!ENABLE_BB_ARCH || applet_name[0] == 'u') {
 # if ENABLE_LONG_OPTS
                static const char uname_longopts[] ALIGN1 =
@@ -147,8 +146,7 @@ int uname_main(int argc UNUSED_PARAM, char **argv UNUSED_PARAM)
                        "operating-system\0"  No_argument       "o"
                ;
 # endif
-               IF_LONG_OPTS(applet_long_options = uname_longopts);
-               toprint = getopt32(argv, options);
+               toprint = getopt32long(argv, options, uname_longopts);
                if (argv[optind]) { /* coreutils-6.9 compat */
                        bb_show_usage();
                }
@@ -183,7 +181,7 @@ int uname_main(int argc UNUSED_PARAM, char **argv UNUSED_PARAM)
                strcpy(uname_info.processor, unknown_str);
                strcpy(uname_info.platform, unknown_str);
                strcpy(uname_info.os, CONFIG_UNAME_OSNAME);
-# if 0
+# if ENABLE_FEDORA_COMPAT
                /* Fedora does something like this */
                strcpy(uname_info.processor, uname_info.name.machine);
                strcpy(uname_info.platform, uname_info.name.machine);