[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[debian-users:42132] Re: kernelとglibc
- From: YOSHIFUJI Hideaki / 吉藤英明 <yoshfuji@xxxxxxxxxxxxxx>
- Subject: [debian-users:42132] Re: kernelとglibc
- Date: Wed, 8 Dec 2004 22:50:10 +0900
- List-help: <mailto:debian-users-ctl@debian.or.jp?body=help>
- List-id: debian-users.debian.or.jp
- List-owner: <mailto:debian-users-admin@debian.or.jp>
- List-post: <mailto:debian-users@debian.or.jp>
- List-software: fml [fml 4.0.3 release (20011202/4.0.3)]
- List-unsubscribe: <mailto:debian-users-ctl@debian.or.jp?body=unsubscribe>
- Organization: USAGI Project
- X-face: "5$Al-.M>NJ%a'@hhZdQm:."qn~PA^gq4o*>iCFToq*bAi#4FRtx}enhuQKz7fNqQz\BYU] $~O_5m-9'}MIs`XGwIEscw;e5b>n"B_?j/AkL~i/MEa<!5P`&C$@oP>ZBLP
- X-fingerprint: 9022 65EB 1ECF 3AD1 0BDF 80D8 4807 F894 E062 0EEA
- X-ml-info: If you have a question, send e-mail with the body "help" (without quotes) to the address debian-users-ctl@debian.or.jp; help=<mailto:debian-users-ctl@debian.or.jp?body=help>
- X-ml-name: debian-users
- X-mlserver: fml [fml 4.0.3 release (20011202/4.0.3)]; post only (only members can post)
- X-original-to: debian-users@debian.or.jp
- X-pgp-key-url: http://www.yoshifuji.org/%7Ehideaki/hideaki@xxxxxxxxxxxxxxxxx
- X-spam-level: **
- X-spam-status: No, hits=2.7 required=10.0 tests=IN_REP_TO,ISO2022JP_BODY,ISO2022JP_CHARSET, MAILTO_TO_SPAM_ADDR,NOSPAM_INC,RCVD_IN_ORBS, RCVD_IN_OSIRUSOFT_COM,REFERENCES,SPAM_PHRASE_00_01, X_OSIRU_OPEN_RELAY version=2.44
- X-url: http://www.yoshifuji.org/%7Ehideaki/
- References: <20041208115115867.ITKN.41545.t-mta1.odn.ne.jp@xxxxxxxxxxxxxx>
- Message-id: <20041208.145144.56606243.yoshfuji@xxxxxxxxxxxxxx>
- X-mail-count: 42132
- X-mailer: Mew version 2.2 on Emacs 20.7 / Mule 4.1 (AOI)
In article <20041208115115867.ITKN.41545.t-mta1.odn.ne.jp@xxxxxxxxxxxxxx> (at Wed, 8 Dec 2004 20:51:32 +0900), <hab47260@xxxxxxxxxxxxx> says:
> kernel とglibcのバージョンを聞かれたのですが
> 返答に困りました
>
> どう調べればよいかわからないのです
すでに結果は出ているようですが、
たとえば以下のようなプログラムで調べることもできます。
/* ---- SNIP ---- */
#include <stdio.h>
#include <sys/utsname.h>
#include <gnu/libc-version.h>
static struct utsname uts;
static const char *get_kernel_version(void)
{
if (uname(&uts) < 0)
return "unknown";
return uts.release;
}
int main (void) {
printf("kernel: %s\n", get_kernel_version());
printf("glibc: %s\n", gnu_get_libc_version());
return 0;
}
/* ---- SNIP ---- */
こんな感じ:
% ./a.out
kernel: 2.6.10-rc2
glibc: 2.3.2
--yoshfuji