This is the mail archive of the
libc-help@sourceware.org
mailing list for the glibc project.
Re: Kernel Version
- From: Petr Baudis <pasky at suse dot cz>
- To: Shameem Ahamed <shameem dot ahamed at hotmail dot com>
- Cc: libc-help at sourceware dot org, libc-help-help at sourceware dot org,debian-glibc at lists dot debian dot org
- Date: Sat, 21 Mar 2009 11:31:04 +0100
- Subject: Re: Kernel Version
- References: <BLU149-W32AB80A117E0782A1D0EBF9F970@phx.gbl>
Hello,
On Sat, Mar 21, 2009 at 01:28:15AM +0530, Shameem Ahamed wrote:
> Is there any glibc supported system call or library function which returns the kernel details ( specifically the architecture, whether it is a 32 bit or 64 bit). I was thinking that sysconf system call supports it. But i checked the man pages, and couldn't find a match.
use the uname(2) syscall. How to find out the architecture depends on
what do you want to do, the architecture your program is compiled for
and the kernel architecture may be different.
Petr "Pasky" Baudis