[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[debian-users:42134] Re: kernelとglibc
- From: "suzuki@miyagi" <hab47260@xxxxxxxxxxxxx>
- Subject: [debian-users:42134] Re: kernelとglibc
- Date: Thu, 9 Dec 2004 09:49:18 +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>
- 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-spam-level: ***
- X-spam-status: No, hits=3.1 required=10.0 tests=FROM_ENDS_IN_NUMS,IN_REP_TO,ISO2022JP_BODY, ISO2022JP_CHARSET,RCVD_IN_ORBS,RCVD_IN_OSIRUSOFT_COM, REFERENCES,SPAM_PHRASE_00_01,X_OSIRU_OPEN_RELAY version=2.44
- References: <20041208.145144.56606243.yoshfuji@xxxxxxxxxxxxxx>
- Message-id: <20041209004917952.GDBH.135738.t-mta8.odn.ne.jp@xxxxxxxxxxxxxx>
- X-mail-count: 42134
- X-mailer: EdMax Ver2.85.5F
鈴木@宮城 です
>
> /* ---- 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 ---- */
> moto:/home/t-suzu# ./a.out
> こんな感じ:
>
> % ./a.out
> kernel: 2.6.10-rc2
> glibc: 2.3.2
>
> --yoshfuji
yoshifuji さん ありがとうございます
さっそく、ぱくらさせていただきました
# ./a.out
kernel: 2.2.20-idepci
glibc: 2.2.5
こんな感じになりました
また よろしくお願いします