summaryrefslogtreecommitdiff
path: root/coreutils
diff options
context:
space:
mode:
authorRon Yorston <rmy@pobox.com>2012-02-08 16:12:35 +0000
committerRon Yorston <rmy@pobox.com>2012-02-09 11:52:53 +0000
commit6e29c121e0afdcfceb1418c2faa6ed070a358f71 (patch)
treeec27cd8779dfc323d1ae0583b89710af47d83a0f /coreutils
parente8ee6096339c6226ee776a945a271a023b8fe0f8 (diff)
downloadbusybox-w32-6e29c121e0afdcfceb1418c2faa6ed070a358f71.tar.gz
busybox-w32-6e29c121e0afdcfceb1418c2faa6ed070a358f71.tar.bz2
busybox-w32-6e29c121e0afdcfceb1418c2faa6ed070a358f71.zip
Implementation of uname for WIN32
Diffstat (limited to 'coreutils')
-rw-r--r--coreutils/uname.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/coreutils/uname.c b/coreutils/uname.c
index d1c50e222..c259b1771 100644
--- a/coreutils/uname.c
+++ b/coreutils/uname.c
@@ -56,7 +56,11 @@ typedef struct {
56 struct utsname name; 56 struct utsname name;
57 char processor[sizeof(((struct utsname*)NULL)->machine)]; 57 char processor[sizeof(((struct utsname*)NULL)->machine)];
58 char platform[sizeof(((struct utsname*)NULL)->machine)]; 58 char platform[sizeof(((struct utsname*)NULL)->machine)];
59#if ENABLE_PLATFORM_MINGW32
60 char os[sizeof("MS/Windows")];
61#else
59 char os[sizeof("GNU/Linux")]; 62 char os[sizeof("GNU/Linux")];
63#endif
60} uname_info_t; 64} uname_info_t;
61 65
62static const char options[] ALIGN1 = "snrvmpioa"; 66static const char options[] ALIGN1 = "snrvmpioa";
@@ -123,7 +127,11 @@ int uname_main(int argc UNUSED_PARAM, char **argv)
123#endif 127#endif
124 strcpy(uname_info.processor, unknown_str); 128 strcpy(uname_info.processor, unknown_str);
125 strcpy(uname_info.platform, unknown_str); 129 strcpy(uname_info.platform, unknown_str);
130#if ENABLE_PLATFORM_MINGW32
131 strcpy(uname_info.os, "MS/Windows");
132#else
126 strcpy(uname_info.os, "GNU/Linux"); 133 strcpy(uname_info.os, "GNU/Linux");
134#endif
127#if 0 135#if 0
128 /* Fedora does something like this */ 136 /* Fedora does something like this */
129 strcpy(uname_info.processor, uname_info.name.machine); 137 strcpy(uname_info.processor, uname_info.name.machine);