fixes for win64 compilation.

This commit is contained in:
Vitor Santos Costa 2014-09-16 19:15:56 +01:00
parent 0ad92137a9
commit 8461026303
15 changed files with 122 additions and 90 deletions

View File

@ -298,11 +298,9 @@ C_SOURCES= \
library/dialect/swi/fli/blobs.c \
# library/mpi/mpi.c library/mpi/mpe.c \
# library/lammpi/yap_mpi.c library/lamm1pi/hash.c library/lammpi/prologterms2c.c
CXX_SOURCES = \
CXX/yapi.cpp \
JIT/JIT_Compiler.cpp
PLCONS_SOURCES = \
console/LGPL/pl-nt.c \

View File

@ -580,6 +580,9 @@
/* Define to 1 if you have the <regex.h> header file. */
#undef HAVE_REGEX_H
/* Define to 1 if you have the <Rembedded.h> header file. */
#undef HAVE_REMBEDDED_H
/* Define to 1 if you have the `rename' function. */
#undef HAVE_RENAME
@ -590,9 +593,6 @@
/* Define to 1 if you have the `rint' function. */
#undef HAVE_RINT
/* Define to 1 if you have the <Rinterface.h> header file. */
#undef HAVE_RINTERFACE_H
/* Define to 1 if you have the `rl_begin_undo_group' function. */
#undef HAVE_RL_BEGIN_UNDO_GROUP
@ -623,9 +623,15 @@
/* Define to 1 if you have the `rl_reset_after_signal' function. */
#undef HAVE_RL_RESET_AFTER_SIGNAL
/* Define to 1 if you have the `rl_set_keyboard_input_timeout' function. */
#undef HAVE_RL_SET_KEYBOARD_INPUT_TIMEOUT
/* Define to 1 if you have the `rl_set_prompt' function. */
#undef HAVE_RL_SET_PROMPT
/* Define to 1 if you have the <R.h> header file. */
#undef HAVE_R_H
/* Define to 1 if you have the `sbrk' function. */
#undef HAVE_SBRK

60
configure vendored
View File

@ -8433,7 +8433,7 @@ _ACEOF
fi
done
for ac_func in rl_begin_undo_group rl_discard_argument
for ac_func in rl_begin_undo_group rl_discard_argument rl_set_keyboard_input_timeout
do :
as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
@ -13489,23 +13489,23 @@ if test "$yap_cv_R" != "no" -a -e "$srcdir"/packages/real/Makefile.in; then
if test $i_am_cross_compiling = yes
if test "$host" = "$build"
then
REAL_TARGET="ritf"
REAL_INCLUDES=-I"\"$yap_cv_R\""/include
REAL_INCLUDES=-I"$yap_cv_R"/include
case "$target_cpu" in
i*86*)
REAL_LIBS="-L\"$yap_cv_R\"/bin/i386 -lR"
REAL_LIBS="-L"$yap_cv_R"/bin/i386 -lR"
;;
x86*)
REAL_LIBS="-L\"$yap_cv_R\"/bin/x64 -lR"
REAL_LIBS="-L"$yap_cv_R"/bin/x64 -lR"
;;
**)
REAL_TARGET="dummy"
;;
esac
else
for ac_prog in R
for ac_prog in R.exe R
do
# Extract the first word of "$ac_prog", so it can be a program name with args.
set dummy $ac_prog; ac_word=$2
@ -13546,7 +13546,7 @@ fi
test -n "$REXE" && break
done
test -n "$REXE" || REXE=""none""
test -n "$REXE" || REXE=""none" "
if test $REXE = none; then
REAL_TARGET="dummy"
@ -13554,18 +13554,46 @@ test -n "$REXE" || REXE=""none""
REAL_TARGET="ritf"
REAL_INCLUDES="$($REXE CMD config --cppflags | grep -v ^WARNING)"
REAL_LIBS="$($REXE CMD config --ldflags | grep -v ^WARNING)"
if test x"$REAL_INCLUDES" = x; then
REAL_INCLUDES=-I"$yap_cv_R"/include
case "$target_cpu" in
i*86*)
REAL_LIBS="-L$yap_cv_R/bin/i386 -lR"
;;
x86*)
REAL_LIBS="-L$yap_cv_R/bin/x64 -lR"
;;
**)
REAL_TARGET="dummy"
;;
esac
fi
fi
ocppflags="$CPPFLAGS"
ocflags="$CFLAGS"
CPPFLAGS+=" $REAL_INCLUDES"
CFLAGS+=" $REAL_INCLUDES"
for ac_header in Rinterface.h
for ac_header in R.h
do :
ac_fn_c_check_header_mongrel "$LINENO" "Rinterface.h" "ac_cv_header_Rinterface_h" "$ac_includes_default"
if test "x$ac_cv_header_Rinterface_h" = xyes; then :
ac_fn_c_check_header_mongrel "$LINENO" "R.h" "ac_cv_header_R_h" "$ac_includes_default"
if test "x$ac_cv_header_R_h" = xyes; then :
cat >>confdefs.h <<_ACEOF
#define HAVE_RINTERFACE_H 1
#define HAVE_R_H 1
_ACEOF
fi
done
for ac_header in Rembedded.h
do :
ac_fn_c_check_header_mongrel "$LINENO" "Rembedded.h" "ac_cv_header_Rembedded_h" "$ac_includes_default"
if test "x$ac_cv_header_Rembedded_h" = xyes; then :
cat >>confdefs.h <<_ACEOF
#define HAVE_REMBEDDED_H 1
_ACEOF
fi
@ -13573,9 +13601,9 @@ fi
done
CFLAGS="$ocflags"
CPPFLAGS="$ocppflags"
fi
fi
@ -13814,7 +13842,7 @@ else
JAVA_TEST=Test.java
CLASS_TEST=Test.class
cat << \EOF > $JAVA_TEST
/* #line 13817 "configure" */
/* #line 13845 "configure" */
public class Test {
}
EOF
@ -13990,7 +14018,7 @@ EOF
if uudecode$EXEEXT Test.uue; then
ac_cv_prog_uudecode_base64=yes
else
echo "configure: 13993: uudecode had trouble decoding base 64 file 'Test.uue'" >&5
echo "configure: 14021: uudecode had trouble decoding base 64 file 'Test.uue'" >&5
echo "configure: failed file was:" >&5
cat Test.uue >&5
ac_cv_prog_uudecode_base64=no
@ -14121,7 +14149,7 @@ else
JAVA_TEST=Test.java
CLASS_TEST=Test.class
cat << \EOF > $JAVA_TEST
/* #line 14124 "configure" */
/* #line 14152 "configure" */
public class Test {
}
EOF
@ -14156,7 +14184,7 @@ JAVA_TEST=Test.java
CLASS_TEST=Test.class
TEST=Test
cat << \EOF > $JAVA_TEST
/* [#]line 14159 "configure" */
/* [#]line 14187 "configure" */
public class Test {
public static void main (String args[]) {
System.exit (0);

View File

@ -32,7 +32,7 @@
#define BUFSIZE 512
#define OBUFSIZE 2048
void PROTO(init_matlab, (void));
void init_matlab(void);
static YAP_Functor MatlabAddress;
static Engine *Meng = NULL;
@ -760,7 +760,7 @@ init_matlab(void)
#ifdef _WIN32
int WINAPI PROTO(win_matlab, (HANDLE, DWORD, LPVOID));
int WINAPI win_matlab(HANDLE, DWORD, LPVOID);
int WINAPI win_matlab(HANDLE hinst, DWORD reason, LPVOID reserved)
{

View File

@ -2896,7 +2896,7 @@ matrix_sum_out_logs(void)
j--;
}
dd = d*dims[prdim];
bzero(ndata, sizeof(double)*nmat[MAT_SIZE]);
memset(ndata, 0, sizeof(double)*nmat[MAT_SIZE]);
for (i=0; i< mat[MAT_SIZE]; i++) {
YAP_Int k = i % d + (i/dd)*d;
ndata[k] += exp(data[i]);
@ -3306,7 +3306,7 @@ init_matrix(void)
#ifdef _WIN32
int WINAPI PROTO(win_matrixs, (HANDLE, DWORD, LPVOID));
int WINAPI win_matrixs(HANDLE, DWORD, LPVOID);
int WINAPI win_matrixs(HANDLE hinst, DWORD reason, LPVOID reserved)
{

View File

@ -50,12 +50,12 @@ static char *rcsid = "$Header: /Users/vitor/Yap/yap-cvsbackup/library/mpi/mpe.c,
#include "Yatom.h"
#include <mpe.h>
STATIC_PROTO (Int p_init, (void));
STATIC_PROTO (Int p_start, (void));
STATIC_PROTO (Int p_close, (void));
STATIC_PROTO (Int p_create_event, (void));
STATIC_PROTO (Int p_create_state, (void));
STATIC_PROTO (Int p_log, (void));
static Int p_init(void);
static Int p_start(void);
static Int p_close(void);
static Int p_create_event(void);
static Int p_create_state(void);
static Int p_log(void);
/*

View File

@ -69,7 +69,7 @@ init_random(void)
#ifdef _WIN32
int WINAPI PROTO(win_random, (HANDLE, DWORD, LPVOID));
int WINAPI win_random(HANDLE, DWORD, LPVOID);
int WINAPI win_random(HANDLE hinst, DWORD reason, LPVOID reserved)
{

View File

@ -90,12 +90,12 @@ extern "C" {
#endif
/* === engine.c === */
static int PROTO(matcher, (struct re_guts *g, char *string, size_t nmatch, regmatch_t pmatch[], int eflags));
static char * PROTO(dissect, (struct match *m, char *start, char *stop, sopno startst, sopno stopst));
static char * PROTO(backref, (struct match *m, char *start, char *stop, sopno startst, sopno stopst, sopno lev));
static char * PROTO(fast, (struct match *m, char *start, char *stop, sopno startst, sopno stopst));
static char * PROTO(slow, (struct match *m, char *start, char *stop, sopno startst, sopno stopst));
static states PROTO(step, (struct re_guts *g, sopno start, sopno stop, states bef, int ch, states aft));
static int matcher(struct re_guts *g, char *string, size_t nmatch, regmatch_t pmatch[], int eflags);
static char * dissect(struct match *m, char *start, char *stop, sopno startst, sopno stopst);
static char * backref(struct match *m, char *start, char *stop, sopno startst, sopno stopst, sopno lev);
static char * fast(struct match *m, char *start, char *stop, sopno startst, sopno stopst);
static char * slow(struct match *m, char *start, char *stop, sopno startst, sopno stopst);
static states step(struct re_guts *g, sopno start, sopno stop, states bef, int ch, states aft);
#define BOL (OUT+1)
#define EOL (BOL+1)
#define BOLEOL (BOL+2)
@ -106,13 +106,13 @@ static states PROTO(step, (struct re_guts *g, sopno start, sopno stop, states be
#define NONCHAR(c) ((c) > CHAR_MAX)
#define NNONCHAR (CODEMAX-CHAR_MAX)
#ifdef REDEBUG
static void PROTO(print, (struct match *m, char *caption, states st, int ch, FILE *d));
static void print(struct match *m, char *caption, states st, int ch, FILE *d);
#endif
#ifdef REDEBUG
static void PROTO(at, (struct match *m, char *title, char *start, char *stop, sopno startst, sopno stopst));
static void at(struct match *m, char *title, char *start, char *stop, sopno startst, sopno stopst);
#endif
#ifdef REDEBUG
static char * PROTO(pchar, (int ch));
static char * pchar(int ch);
#endif
#ifdef __cplusplus

View File

@ -153,50 +153,50 @@ extern "C" {
#endif
/* === regcomp.c === */
static void PROTO(p_ere,(struct parse *p, int stop));
static void PROTO(p_ere_exp,(struct parse *p));
static void PROTO(p_str,(struct parse *p));
static void PROTO(p_bre,(struct parse *p, int end1, int end2));
static int PROTO(p_simp_re,(struct parse *p, int starordinary));
static int PROTO(p_count,(struct parse *p));
static void PROTO(p_bracket,(struct parse *p));
static void PROTO(p_b_term,(struct parse *p, cset *cs));
static void PROTO(p_b_cclass,(struct parse *p, cset *cs));
static void PROTO(p_b_eclass,(struct parse *p, cset *cs));
static char PROTO(p_b_symbol,(struct parse *p));
static char PROTO(p_b_coll_elem,(struct parse *p, int endc));
static char PROTO(othercase,(int ch));
static void PROTO(bothcases,(struct parse *p, int ch));
static void PROTO(ordinary,(struct parse *p, int ch));
static void PROTO(nonnewline,(struct parse *p));
static void PROTO(repeat,(struct parse *p, sopno start, int from, int to));
static int PROTO(seterr,(struct parse *p, int e));
static cset *PROTO(allocset,(struct parse *p));
static void PROTO(freeset,(struct parse *p, cset *cs));
static int PROTO(freezeset,(struct parse *p, cset *cs));
static int PROTO(firstch,(struct parse *p, cset *cs));
static int PROTO(nch,(struct parse *p, cset *cs));
static void p_ere(struct parse *p, int stop);
static void p_ere_exp(struct parse *p);
static void p_str(struct parse *p);
static void p_bre(struct parse *p, int end1, int end2);
static int p_simp_re(struct parse *p, int starordinary);
static int p_count(struct parse *p);
static void p_bracket(struct parse *p);
static void p_b_term(struct parse *p, cset *cs);
static void p_b_cclass(struct parse *p, cset *cs);
static void p_b_eclass(struct parse *p, cset *cs);
static char p_b_symbol(struct parse *p);
static char p_b_coll_elem(struct parse *p, int endc);
static char othercase(int ch);
static void bothcases(struct parse *p, int ch);
static void ordinary(struct parse *p, int ch);
static void nonnewline(struct parse *p);
static void repeat(struct parse *p, sopno start, int from, int to);
static int seterr(struct parse *p, int e);
static cset *allocset(struct parse *p);
static void freeset(struct parse *p, cset *cs);
static int freezeset(struct parse *p, cset *cs);
static int firstch(struct parse *p, cset *cs);
static int nch(struct parse *p, cset *cs);
#if 0
static void PROTO(mcadd,(struct parse *p, cset *cs, char *cp));
static void mcadd(struct parse *p, cset *cs, char *cp);
#endif
#if used
static void PROTO(mcsub,(cset *cs, char *cp));
static int PROTO(mcin,(cset *cs, char *cp));
static char *PROTO(mcfind,(cset *cs, char *cp));
static void mcsub(cset *cs, char *cp);
static int mcin(cset *cs, char *cp);
static char *mcfind(cset *cs, char *cp);
#endif
static void PROTO(mcinvert,(struct parse *p, cset *cs));
static void PROTO(mccase,(struct parse *p, cset *cs));
static int PROTO(isinsets,(struct re_guts *g, int c));
static int PROTO(samesets,(struct re_guts *g, int c1, int c2));
static void PROTO(categorize,(struct parse *p, struct re_guts *g));
static sopno PROTO(dupl,(struct parse *p, sopno start, sopno finish));
static void PROTO(doemit,(struct parse *p, sop op, size_t opnd));
static void PROTO(doinsert,(struct parse *p, sop op, size_t opnd, sopno pos));
static void PROTO(dofwd,(struct parse *p, sopno pos, sop value));
static void PROTO(enlarge,(struct parse *p, sopno size));
static void PROTO(stripsnug,(struct parse *p, struct re_guts *g));
static void PROTO(findmust,(struct parse *p, struct re_guts *g));
static sopno PROTO(pluscount,(struct parse *p, struct re_guts *g));
static void mcinvert(struct parse *p, cset *cs);
static void mccase(struct parse *p, cset *cs);
static int isinsets(struct re_guts *g, int c);
static int samesets(struct re_guts *g, int c1, int c2);
static void categorize(struct parse *p, struct re_guts *g);
static sopno dupl(struct parse *p, sopno start, sopno finish);
static void doemit(struct parse *p, sop op, size_t opnd);
static void doinsert(struct parse *p, sop op, size_t opnd, sopno pos);
static void dofwd(struct parse *p, sopno pos, sop value);
static void enlarge(struct parse *p, sopno size);
static void stripsnug(struct parse *p, struct re_guts *g);
static void findmust(struct parse *p, struct re_guts *g);
static sopno pluscount(struct parse *p, struct re_guts *g);
#ifdef __cplusplus
}

View File

@ -57,7 +57,7 @@ extern "C" {
#endif
/* === regerror.c === */
static char * PROTO(regatoi, (const regex_t *preg, char *localbuf));
static char * regatoi(const regex_t *preg, char *localbuf);
#ifdef __cplusplus
}

View File

@ -179,7 +179,7 @@ init_regexp(void)
#include <windows.h>
int WINAPI PROTO(win_regexp, (HANDLE, DWORD, LPVOID));
int WINAPI winegexp(HANDLE, DWORD, LPVOID);
int WINAPI win_regexp(HANDLE hinst, DWORD reason, LPVOID reserved)
{

View File

@ -93,9 +93,9 @@ typedef struct {
#define REG_LARGE 01000 /* force large representation */
#define REG_BACKR 02000 /* force use of backref code */
int PROTO(yap_regcomp, (regex_t *, const char *, int));
size_t PROTO(yap_regerror, (int, const regex_t *, char *, size_t));
int PROTO(yap_regexec, (const regex_t *, const char *, size_t, regmatch_t [], int));
void PROTO(yap_regfree, (regex_t *));
int yap_regcomp(regex_t *, const char *, int);
size_t yap_regerror(int, const regex_t *, char *, size_t);
int yap_regexec(const regex_t *, const char *, size_t, regmatch_t [], int);
void yap_regfree(regex_t *);
#endif /* !_REGEX_H_ */

View File

@ -1107,7 +1107,7 @@ init_sys(void)
#include <windows.h>
int WINAPI PROTO(win_sys, (HANDLE, DWORD, LPVOID));
int WINAPI win_sys(HANDLE, DWORD, LPVOID);
int WINAPI win_sys(HANDLE hinst, DWORD reason, LPVOID reserved)
{

View File

@ -182,7 +182,7 @@ UTESTS_OBJS = \
SOBJS = horus.@SO@
HCLI = hcli
HCLI = hcli@EXEC_SUFFIX@
UTESTING = $(srcdir)/run_tests

@ -1 +1 @@
Subproject commit 9ee28c0798c4d7b348c8033e84da6c0a81887e79
Subproject commit 86b82220ec929fab1e648109c53f5b46b0569190