Windows Threaded Patches
This commit is contained in:
parent
9a35d17861
commit
7f8f80fdbe
@ -118,7 +118,7 @@ Yap_InitPlIO (void)
|
|||||||
*/
|
*/
|
||||||
static int newline = TRUE;
|
static int newline = TRUE;
|
||||||
|
|
||||||
#ifdef DEBUG
|
#if DEBUG
|
||||||
|
|
||||||
static int eolflg = 1;
|
static int eolflg = 1;
|
||||||
|
|
||||||
|
@ -38,6 +38,7 @@ Yap_LoadForeignFile(char *file, int flags)
|
|||||||
{
|
{
|
||||||
void *ptr= (void *)LoadLibrary(file);
|
void *ptr= (void *)LoadLibrary(file);
|
||||||
if (!ptr) {
|
if (!ptr) {
|
||||||
|
CACHE_REGS
|
||||||
LOCAL_ErrorSay[0]='\0';
|
LOCAL_ErrorSay[0]='\0';
|
||||||
FormatMessage(FORMAT_MESSAGE_FROM_SYSTEM | FORMAT_MESSAGE_IGNORE_INSERTS,
|
FormatMessage(FORMAT_MESSAGE_FROM_SYSTEM | FORMAT_MESSAGE_IGNORE_INSERTS,
|
||||||
NULL, GetLastError(),
|
NULL, GetLastError(),
|
||||||
|
@ -123,7 +123,7 @@ Yap_LookupVar(char *var) /* lookup variable in variables table */
|
|||||||
CACHE_REGS
|
CACHE_REGS
|
||||||
VarEntry *p;
|
VarEntry *p;
|
||||||
|
|
||||||
#ifdef DEBUG
|
#if DEBUG
|
||||||
if (GLOBAL_Option[4])
|
if (GLOBAL_Option[4])
|
||||||
fprintf(GLOBAL_stderr,"[LookupVar %s]", var);
|
fprintf(GLOBAL_stderr,"[LookupVar %s]", var);
|
||||||
#endif
|
#endif
|
||||||
@ -786,7 +786,7 @@ ParseTerm(int prio, JMPBUFF *FailBuff USES_REGS)
|
|||||||
FAIL;
|
FAIL;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
#ifdef DEBUG
|
#if DEBUG
|
||||||
if (GLOBAL_Option['p' - 'a' + 1]) {
|
if (GLOBAL_Option['p' - 'a' + 1]) {
|
||||||
Yap_DebugPutc(LOCAL_c_error_stream,'[');
|
Yap_DebugPutc(LOCAL_c_error_stream,'[');
|
||||||
Yap_DebugPlWrite(t);
|
Yap_DebugPlWrite(t);
|
||||||
|
@ -1310,12 +1310,12 @@ Yap_tokenizer(IOSTREAM *inp_stream, int store_comments, Term *tposp)
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
#ifdef DEBUG
|
#if DEBUG
|
||||||
fprintf(GLOBAL_stderr, "\n++++ token: wrong char type %c %d\n", ch, chtype(ch));
|
fprintf(GLOBAL_stderr, "\n++++ token: wrong char type %c %d\n", ch, chtype(ch));
|
||||||
#endif
|
#endif
|
||||||
t->Tok = Ord(kind = eot_tok);
|
t->Tok = Ord(kind = eot_tok);
|
||||||
}
|
}
|
||||||
#ifdef DEBUG
|
#if DEBUG
|
||||||
if(GLOBAL_Option[2]) fprintf(GLOBAL_stderr,"[Token %d %ld]",Ord(kind),(unsigned long int)t->TokInfo);
|
if(GLOBAL_Option[2]) fprintf(GLOBAL_stderr,"[Token %d %ld]",Ord(kind),(unsigned long int)t->TokInfo);
|
||||||
#endif
|
#endif
|
||||||
if (LOCAL_ErrorMessage) {
|
if (LOCAL_ErrorMessage) {
|
||||||
|
@ -18,6 +18,11 @@ typedef uintptr_t term_t;
|
|||||||
|
|
||||||
#ifndef _FLI_H_INCLUDED
|
#ifndef _FLI_H_INCLUDED
|
||||||
|
|
||||||
|
#ifdef __WINDOWS__
|
||||||
|
#include <windows.h>
|
||||||
|
#include <windows/uxnt.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
typedef void *record_t;
|
typedef void *record_t;
|
||||||
typedef struct mod_entry *module_t;
|
typedef struct mod_entry *module_t;
|
||||||
typedef uintptr_t atom_t;
|
typedef uintptr_t atom_t;
|
||||||
@ -29,6 +34,7 @@ typedef struct pred_entry *predicate_t;
|
|||||||
typedef uintptr_t PL_fid_t; /* opaque foreign context handle */
|
typedef uintptr_t PL_fid_t; /* opaque foreign context handle */
|
||||||
#define fid_t PL_fid_t /* avoid AIX name-clash */
|
#define fid_t PL_fid_t /* avoid AIX name-clash */
|
||||||
|
|
||||||
|
typedef uintptr_t word; /* Anonymous 4 byte object */
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#define GLOBAL_LD (LOCAL_PL_local_data_p)
|
#define GLOBAL_LD (LOCAL_PL_local_data_p)
|
||||||
|
Reference in New Issue
Block a user