Will you please stop posting the same message 7 times? USENET isn't
instantaneous. Just because you don't see your reply immediatly after
hitting "Post", doesn't mean it didn't go through.
And the comment someone else made still stands: If you're trying to
port code from one environment to another, you'd better damned well
know the intricacies of said code.
Not to mention that your LPVOID typedef is bogus.
More like:
http://msdn.microsoft.com/en-us/library/aa383751(VS.85).aspx
_________________________________________________________
typedef unsigned long DWORD;
typedef unsigned short WORD;
typedef long LONG;
typedef unsigned char BYTE;
typedef void* LPVOID;
typedef char windows_static_assert
[
sizeof(DWORD) * CHAR_BIT == 32 &&
sizeof(WORD) * CHAR_BIT == 16 &&
sizeof(LONG) * CHAR_BIT == 32 &&
sizeof(BYTE) * CHAR_BIT == 8
? 1 : -1
];
_________________________________________________________
Does that help?
It probably does, for some systems. The LONG type is very Windows
specific, so the definition is likely to fail on 64 bit Linux systems.
Bo Persson
Indeed... Humm, well I guess the OP could try something crazy like this:
_____________________________________________________________
#if (UINT_MAX == 0xFFFFFFFFU)
# if ! defined (INT32)
typedef signed int int32;
typedef unsigned int uint32;
# endif
# define INT32
#endif
#if (ULONG_MAX == 0xFFFFFFFFU)
# if ! defined (INT32)
typedef signed long int32;
typedef unsigned long uint32;
# endif
# define INT32
#endif
#if ! defined (INT32)
# error there is no exact 32-bit integer.
#endif
typedef char windows_static_assert
[
sizeof(int32) * CHAR_BIT == 32 ? 1 : -1
];
typedef int32 LONG;
typedef uint32 ULONG;
_____________________________________________________________
OP is wanting to compile on Linux, where most probably a proper
<stdint.h> header is present, so no need for such trickery.
#include <stdint.h>
typedef int32_t LONG;
typedef uint32_t ULONG;
Paavo
good point!
:^)
I don't think such guesswork will help an OP who looks totally lost!
--
Ian Collins