Submit #3097 ยป 0001-telnetd-print-system-information-OS-and-architecture.patch
libexec/telnetd/utility.c | ||
---|---|---|
* $FreeBSD: src/crypto/telnet/telnetd/utility.c,v 1.5.2.4 2002/04/13 10:59:09 markm Exp $
|
||
*/
|
||
#ifdef __FreeBSD__
|
||
#if defined(__FreeBSD__) || defined(__DragonFly__)
|
||
#include <locale.h>
|
||
#include <sys/utsname.h>
|
||
#endif
|
||
... | ... | |
*putlocation++ = cc;
|
||
}
|
||
#ifdef __FreeBSD__
|
||
#if defined(__FreeBSD__) || defined(__DragonFly__)
|
||
static char fmtstr[] = { "%+" };
|
||
#else
|
||
static char fmtstr[] = { "%l:%M%P on %A, %d %B %Y" };
|
||
... | ... | |
char *slash;
|
||
time_t t;
|
||
char db[100];
|
||
#ifdef __FreeBSD__
|
||
#if defined(__FreeBSD__) || defined(__DragonFly__)
|
||
static struct utsname kerninfo;
|
||
if (!*kerninfo.sysname)
|
||
... | ... | |
break;
|
||
case 'd':
|
||
#ifdef __FreeBSD__
|
||
#if defined(__FreeBSD__) || defined(__DragonFly__)
|
||
setlocale(LC_TIME, "");
|
||
#endif
|
||
(void)time(&t);
|
||
... | ... | |
putstr(db);
|
||
break;
|
||
#ifdef __FreeBSD__
|
||
#if defined(__FreeBSD__) || defined(__DragonFly__)
|
||
case 's':
|
||
putstr(kerninfo.sysname);
|
||
break;
|