Skip to content

Commit c6daf07

Browse files
Fix some 64-bit issues with Windows deployment
1 parent 6865dfa commit c6daf07

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

engine/src/deploy_windows.cpp

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -38,18 +38,18 @@ along with LiveCode. If not see <http://www.gnu.org/licenses/>. */
3838
//
3939

4040
#ifndef FIELD_OFFSET
41-
#define FIELD_OFFSET(type, field) ((LONG)(LONG_PTR)&(((type *)0)->field))
41+
#define FIELD_OFFSET(type, field) ((LONG)(intptr_t)&(((type *)0)->field))
4242
#endif
4343

4444
typedef char CHAR;
4545
typedef unsigned short WCHAR;
4646

4747
typedef unsigned char BYTE;
4848
typedef unsigned short WORD;
49-
typedef unsigned long DWORD;
49+
typedef unsigned int DWORD;
5050

51-
typedef long *LONG_PTR;
52-
typedef long LONG;
51+
typedef unsigned int LONG_PTR;
52+
typedef int LONG;
5353

5454
#define IMAGE_DOS_SIGNATURE 0x5A4D // MZ
5555
#define IMAGE_OS2_SIGNATURE 0x454E // NE
@@ -540,7 +540,7 @@ static inline void swap_dword(DWORD& x)
540540
#endif
541541
}
542542

543-
static inline void swap_long(long& x)
543+
static inline void swap_long(LONG& x)
544544
{
545545
#ifdef __BIG_ENDIAN__
546546
uint32_t y;

0 commit comments

Comments
 (0)