--- src/lib/libcmd/date.c +++ src/lib/libcmd/date.c 2007-03-30 12:51:14.345910709 +0200 @@ -214,10 +214,19 @@ settime(const char* cmd, Time_t now, int if (!adjust && !network) return tmxsettime(now); argv = args; +#ifdef __linux__ + s = "/bin/date"; +#else s = "/usr/bin/date"; +#endif if (!streq(cmd, s) && (!eaccess(s, X_OK) || !eaccess(s+=4, X_OK))) { *argv++ = s; +#ifdef __linux__ + tmxfmt(buf, sizeof(buf), "%m%d%H" "%M%Y.%S", now); + if (tm_info.flags & TM_UTC) + *argv++ = "--utc"; +#else if (streq(astconf("UNIVERSE", NiL, NiL), "att")) { tmxfmt(buf, sizeof(buf), "%m%d%H" "%M%Y.%S", now); @@ -232,6 +241,7 @@ settime(const char* cmd, Time_t now, int if (tm_info.flags & TM_UTC) *argv++ = "-u"; } +#endif *argv++ = buf; *argv = 0; if (!procrun(s, args)) --- src/lib/libcmd/uname.c +++ src/lib/libcmd/uname.c 2007-03-28 18:38:01.234930006 +0200 @@ -77,6 +77,7 @@ __STDPP__directive pragma pp:hide getdom #include #include +#include #include #include "FEATURE/utsname" @@ -84,9 +85,11 @@ __STDPP__directive pragma pp:hide getdom #define MAXHOSTNAME 64 #if _lib_uname && _sys_utsname +# include +#endif -#include - +#ifdef __linux__ +# include #endif #if defined(__STDPP__directive) && defined(__STDPP__hide) @@ -267,6 +270,9 @@ b_uname(int argc, char** argv, void* con { case 'a': flags |= OPT_all|((1L< 0) { + if (strncmp(line, "vendor_id", 9) == 0) { + if (strstr(line, "AuthenticAMD")) + s = "athlon"; + break; + } + } + sfclose(io); + } + } + } +#endif + if (!s && !*(s = astconf("ARCHITECTURE", NiL, NiL))) s = ut.machine; output(OPT_processor, s, "processor"); } if (flags & OPT_implementation) { - if (!*(s = astconf("PLATFORM", NiL, NiL)) && !*(s = astconf("HW_NAME", NiL, NiL))) + s = NULL; +#ifdef __linux__ + if (!s) { + strcpy((s = buf), ut.machine); + if (s[0] == 'i' && s[2] == '8' && s[3] == '6' && s[4] == '\0') + s[1] = '3'; + } +#endif + if (!s && !*(s = astconf("PLATFORM", NiL, NiL)) && !*(s = astconf("HW_NAME", NiL, NiL))) { if (t = strchr(hosttype, '.')) t++;