Commit 27acd96d authored by John van Groningen's avatar John van Groningen
Browse files

port to 64 bit windows

parent 0707a06b
......@@ -2,7 +2,7 @@
Clean string
============
*/
typedef struct clean_string {int length; char chars [1]; } *CleanString;
typedef struct clean_string {size_t length; char chars [1]; } *CleanString;
/*
Debugging
......
......@@ -526,9 +526,18 @@ void clear_p_at_node_tree (void)
static NodeP reorder_bits (NodeP node)
{
#ifdef _WIN64
unsigned __int64 n,m;
n=(unsigned __int64)node;
m=n & 0x000ffffffff;
n= (m<<32) | ((n^m)>>32);
#else
unsigned long n,m;
n=(long)node;
#endif
m=n & 0x000ffffL;
n= (m<<16) | ((n^m)>>16);
......
......@@ -6441,7 +6441,11 @@ void InitCoding (void)
InitBasicDescriptor (BoolObj, "BOOL", SizeOfBool);
InitBasicDescriptor (CharObj, "CHAR", SizeOfChar);
InitBasicDescriptor (StringObj, "STRING", SizeOfAStackElem);
#ifdef G_A64
InitBasicDescriptor (RealObj, "REAL", 1);
#else
InitBasicDescriptor (RealObj, "REAL", SizeOfReal);
#endif
InitBasicDescriptor (FileObj, "FILE", SizeOfFile);
InitBasicDescriptor (ArrayObj, "ARRAY", SizeOfAStackElem);
InitBasicDescriptor (UnboxedArrayObj, "ARRAY", SizeOfAStackElem);
......
......@@ -344,7 +344,7 @@ static unsigned MemUse (void)
if (! free_pos)
l = (long) (usedblocks-1) * BLOCK_SIZE;
else
l = (long) (usedblocks-1) * BLOCK_SIZE + ((long) free_pos - (long) SA_store[usedblocks-1]);
l = (long) (usedblocks-1) * BLOCK_SIZE + (long) ((size_t) free_pos - (size_t) SA_store[usedblocks-1]);
return (unsigned) ((l-1) / KBYTE) + 1;
}
......
......@@ -47,17 +47,23 @@ typedef unsigned long SysTime;
#ifdef _WINDOWS_
# include <stdarg.h>
# define FileTime FILETIME
# ifdef __MWERKS__
# include <x86_prefix.h>
# ifdef _WIN64
# undef _WINDOWS_
# include <windows.h>
# define FileTime struct _FILETIME
# else
# define _X86_
# ifdef __MWERKS__
# include <x86_prefix.h>
# else
# define _X86_
# endif
# include <windef.h>
# include <winbase.h>
# define FileTime FILETIME
# endif
# include <windef.h>
# include <winbase.h>
#else
# if defined (POWER) && defined (KARBON)
#include <UTCUtils.h>
# include <UTCUtils.h>
typedef UTCDateTime FileTime;
# else
typedef unsigned long FileTime;
......
#include "version.h"
#ifdef _WIN64
int VERSION=919;
#else
int VERSION=920;
#endif
......@@ -7,13 +7,18 @@
#include "system.h"
#include <stdio.h>
#ifdef __MWERKS__
# include <x86_prefix.h>
#ifdef _WIN64
# undef _WINDOWS_
# include <windows.h>
#else
# ifdef __MWERKS__
# include <x86_prefix.h>
# else
# define _X86_
# endif
# include <windef.h>
# include <winbase.h>
#endif
#include <windef.h>
#include <winbase.h>
char *GetFileExtension (FileKind kind)
{
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment