Perhaps "if(sizeof(void*)==4) { /* 32 */} else if(sizeof(void*) ==8) { /* 64 */ }" ? Or do you need something for the preprocessor? -yan On 9/6/07, Luigi Rizzo <rizzo_at_icir.org> wrote: > > hi, > i was wondering what is the proper way to tell a 64 vs 32 bit > architecture. > > I see that some code in sys/ uses ' #ifdef __LP64__ ' but i am not > sure if this is generic enough (ie not gcc or FreeBSD specific), > and also suitable for userland (i.e. works on linux or other platforms > as well). > > cheers > luigi > _______________________________________________ > freebsd-current_at_freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-current > To unsubscribe, send any mail to "freebsd-current-unsubscribe_at_freebsd.org" >Received on Thu Sep 06 2007 - 17:50:45 UTC
This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:39:17 UTC