This is the mail archive of the libc-help@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Kernel Version


On Friday 20 March 2009 15:58:15 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.

if (sizeof(void*) == 4)
	/* 32 bit */
else if (sizeof(void*) == 8)
	/* 64 bit */
else
	/* magic */

or maybe `man 2 personality`

in the future, you might want to:
 - fix your mailer.  long lines unwrapped lines are not welcome in the open 
source world.
 - not cross post to as many lists as you can find.  cross-posting is frowned 
upon when you dont have a good reason to do it.  asking for help is not a good 
reason.
-mike

Attachment: signature.asc
Description: This is a digitally signed message part.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]