gethostname.c
来自「RTEMS (Real-Time Executive for Multiproc」· C语言 代码 · 共 27 行
C
27 行
/* * $Id: gethostname.c,v 1.2 1998/08/20 21:56:23 joel Exp $ */#include "config.h"/* * Solaris doesn't include the gethostname call by default. */#include <sys/utsname.h>#include <sys/systeminfo.h>#include <netdb.h>/* * PUBLIC: #ifndef HAVE_GETHOSTNAME * PUBLIC: int gethostname __P((char *, int)); * PUBLIC: #endif */intgethostname(host, len) char *host; int len;{ return (sysinfo(SI_HOSTNAME, host, len) == -1 ? -1 : 0);}
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?