On Tue, Mar 04, 2003 at 09:41:54AM -0800, Philip Brown wrote: > On Tue, Mar 04, 2003 at 01:27:28PM +0000, Alan Cox wrote: > > On Tue, 2003-03-04 at 08:22, Philip Brown wrote: > > > "unsigned long" is semi-unspecified, but is reasonably assumed to be > > > a 32-bit quantity. > > > > On all 64bit bit platforms I have met unsigned long is a 64bit quantity. > > In fact I can't think of a single exception > > Well then, obviously, you dont use solaris :-)
He uses Solaris and compiles for 64-bit mode, rather than the 32-bit mode you're compiling for. > sparc$ ./t [compiled with gcc 2.95.2] > Size of unsigned long is 4 > Size of long long is 8 > sparc$ isalist > sparcv9+vis sparcv9 sparcv8plus+vis sparcv8plus sparcv8 sparcv8-fsmuld > sparcv7 sparc > [that confirms the sparc is running with a 64bit kernel] The 64-bit kernel is perfectly capable of running 32-bit binaries, and that's precisely what you're doing. Solaris in 64-bit mode is just like every other 64-bit UNIX. Every useful 32-bit UNIX is ILP32. Every mainstream 64-bit UNIX is I32LP64. (Ignoring oddities like UNICOS.) If sizeof(long)==4, you're on a 32-bit platform. If sizeof(long)==8, you're on a 64-bit platform. $ uname -a SunOS exa 5.8 Generic_108528-15 sun4u sparc SUNW,Ultra-5_10 $ cat foo.c #include <stdio.h> int main(void) { printf("void*=%d\nlong=%d\nint=%d\n", sizeof(void*), sizeof(long), sizeof(int)); return 0; } $ cc foo.c $ ./a.out void*=4 long=4 int=4 $ cc -xarch=v9 foo.c $ ./a.out void*=8 long=8 int=4 $ cc -V cc: Sun WorkShop 6 update 1 C 5.2 2000/09/11 usage: cc [ options] files. Use 'cc -flags' for details -andy ------------------------------------------------------- This SF.net email is sponsored by: Etnus, makers of TotalView, The debugger for complex code. Debugging C/C++ programs can leave you feeling lost and disoriented. TotalView can help you find your way. Available on major UNIX and Linux platforms. Try it free. www.etnus.com _______________________________________________ Dri-devel mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/dri-devel