From: Oscar F. <of...@wa...> - 2003-05-21 21:03:35
|
"Alan Smallbone" <asm...@fo...> writes: > Hi Oscar, > > Thanks for responding, I have attached a zip file which I hacked > bits of the program out of and made it into a short executable that > illustrates the problem that I am seeing. It is not in the "mywrite" > definition as I first thought, it appears to be in how the data is > passed to it from the "WRITELONG" as defined in this program. In the > zip file is the header file and the test case program, and please, > it is not the best thing in the world as an example. Also included > are results from the two versions of the c compiler the > fwrite.out_test1_V1 is from version 2.95.3-6 of gcc and is in the > correct order, the fwrite.out_test1_V2 file is from gcc version 3.2 > from the latest version of mingw. Thanks so much for the help. [Please keep discussion on list, thanks.] I think this is the problem: WRITELONG( '8BPS' ); In C++, how the compiler handles multibyte character constants is implementation-defined. I guess the same applies to C. Maybe gcc 2.9x keeps the byte order and 3.x swaps it. Have you tried with integer constants instead of multibyte character constants? -- Oscar |