From: Jim Freeze Date: 2004-06-11T02:20:12+09:00 Subject: Re: #include required for Opteron but not Pentium. On Thursday, 10 June 2004 at 23:30:31 +0900, Sam Roberts wrote: > Quoteing jim@freeze.org, on Thu, Jun 10, 2004 at 03:21:59PM +0900: > > On Thursday, 10 June 2004 at 14:06:20 +0900, nobu.nokada@softhome.net wrote: > > > > I'm trying to find a solution that works on both 32bit and 64bit > > > > machines without code changes. And it would be best if I didn't > > > > have to have it fail on a 64bit machine to find out. > > > > > > Why without changes? It isn't your own code? > > > > No, it's my code. I just find it a little disconcerting that the missing > > include did not even generate a warning for the 32bit compile, but > > it is required for the 64bit compile. > > What compiler are you using? Are you sure you have the warning levels > cranked high? Default build options on many compilers won't tell you > about this kind of stuff. > gcc The warnings are whatever is generated by mkmf/create_makefile by default. > ./a.out sizeof(char) 1 bytes 8 bits sizeof(short) 2 bytes 16 bits sizeof(int) 4 bytes 32 bits sizeof(void *) 4 bytes 32 bits sizeof(float) 4 bytes 32 bits sizeof(double) 8 bytes 64 bits sizeof(long) 4 bytes 32 bits sizeof(long long)8 bytes 64 bits > uname -a SunOS juno 5.8 Generic_108528-19 sun4u sparc SUNW,Ultra-5_10 Apparently, our 64bit suns are using a 32bit compiler and hence the 32bit pointers. > ./a.out sizeof(char) 1 bytes 8 bits sizeof(short) 2 bytes 16 bits sizeof(int) 4 bytes 32 bits sizeof(void *) 8 bytes 64 bits sizeof(float) 4 bytes 32 bits sizeof(double) 8 bytes 64 bits sizeof(long) 8 bytes 64 bits sizeof(long long)8 bytes 64 bits > uname -a Linux op2 2.4.21-4.ELsmp #1 SMP Fri Oct 3 17:32:58 EDT 2003 x86_64 x86_64 x86_64 GNU/Linux -- Jim Freeze A [golf] ball sliced or hooked into the rough shall be lifted and placed in the fairway at a point equal to the distance it carried or rolled into the rough. Such veering right or left frequently results from friction between the face of the club and the cover of the ball and the player should not be penalized for the erratic behavior of the ball resulting from such uncontrollable physical phenomena. -- Donald A. Metz