win64
This commit is contained in:
parent
2c82906714
commit
0602031bd9
10
Makefile.in
10
Makefile.in
@ -72,7 +72,8 @@ C_PARSER_FLAGS= @YAPLIB_CFLAGS@ $(YAP_EXTRAS) $(DEFS) $(CPPFLAGS)
|
||||
ARCH=@ARCH@
|
||||
AWK=@AWK@
|
||||
CPP=@CPP@
|
||||
RC=windres
|
||||
RC=@RC@
|
||||
RCFLAGS=@RCFLAGS@
|
||||
DEFS=@DEFS@ -D_YAP_NOT_INSTALLED_=1 -DDESTDIR=\"$(DESTDIR)\"
|
||||
LIBS=@LIBS@
|
||||
DLL_LIBS=@LIBS@ @EXTRA_LIBS_FOR_DLLS@
|
||||
@ -459,12 +460,9 @@ yap_random.o: library/random/yap_random.c config.h
|
||||
%.o: library/regex/%.c @NO_BUILTIN_REGEXP@ library/regex/regex2.h library/regex/engine.c config.h
|
||||
$(CC) -c $(CFLAGS) -I$(srcdir)/include -Ilibrary/regex $< -o $@
|
||||
|
||||
swi.o: library/dialect/swi/fli/swi.c library/dialect/swi/fli/swi.h include/SWI-Prolog.h os/SWI-Stream.h config.h
|
||||
%.o: library/dialect/swi/fli/%.c library/dialect/swi/fli/swi.h include/SWI-Prolog.h os/SWI-Stream.h config.h
|
||||
$(CC) -c $(CFLAGS) -I$(srcdir)/include -Ilibrary/dialect/swi/fli $< -o $@
|
||||
|
||||
blobs.o: library/dialect/swi/fli/blobs.c library/dialect/swi/fli/swi.h include/SWI-Prolog.h config.h
|
||||
$(CC) -c $(CFLAGS) -I$(srcdir)/include -I$(srcdir)/library/dialect/swi/fli $< -o $@
|
||||
|
||||
%.o: os/%.c config.h
|
||||
$(CC) -c $(CFLAGS) -I$(srcdir)/include -I$(srcdir) -Ios @EXTRA_INCLUDES_FOR_WIN32@ $< -o $@
|
||||
|
||||
@ -478,7 +476,7 @@ pl-ntmain.o: console/LGPL/pl-ntmain.c config.h
|
||||
$(CC) -c $(CFLAGS) -DPL_CONSOLE=1 -I$(srcdir)/include -I$(srcdir) -I$(srcdir)/os @EXTRA_INCLUDES_FOR_WIN32@ $< -o $@
|
||||
|
||||
yapres.o: console/LGPL/yap.rc console/LGPL/manifest.xml config.h
|
||||
$(RC) -DUNICODE -D_UNICODE -DPL_CONSOLE=1 -I. -I$(srcdir)/include -I$(srcdir) -I$(srcdir)/os -I$(srcdir)/console/LGPL @EXTRA_INCLUDES_FOR_WIN32@ -i $< -o $@
|
||||
$(RC) $(RCFLAGS) -DUNICODE -D_UNICODE -DPL_CONSOLE=1 -I. -I$(srcdir)/include -I$(srcdir) -I$(srcdir)/os -I$(srcdir)/console/LGPL @EXTRA_INCLUDES_FOR_WIN32@ -i $< -o $@
|
||||
|
||||
uxnt.o: os/windows/uxnt.c config.h
|
||||
$(CC) -c $(CFLAGS) -I$(srcdir)/include -I$(srcdir) -Ios @EXTRA_INCLUDES_FOR_WIN32@ $< -o $@
|
||||
|
283
configure
vendored
283
configure
vendored
@ -780,8 +780,10 @@ build_cpu
|
||||
build
|
||||
C_PARSER_FLAGS
|
||||
C_INTERF_FLAGS
|
||||
RCFLAGS
|
||||
GCC
|
||||
AWK
|
||||
RC
|
||||
ac_ct_CXX
|
||||
CXXFLAGS
|
||||
CXX
|
||||
@ -834,6 +836,7 @@ SHELL'
|
||||
ac_subst_files=''
|
||||
ac_user_opts='
|
||||
enable_option_checking
|
||||
enable_abi
|
||||
enable_tabling
|
||||
enable_or_parallelism
|
||||
enable_depth_limit
|
||||
@ -1510,6 +1513,7 @@ Optional Features:
|
||||
--disable-option-checking ignore unrecognized --enable/--with options
|
||||
--disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
|
||||
--enable-FEATURE[=ARG] include FEATURE [ARG=yes]
|
||||
--enable-abi support an ABI
|
||||
--enable-tabling support tabling
|
||||
--enable-or-parallelism support or-parallelism as: copy,sba,a-cow,threads
|
||||
--enable-depth-limit support depth-bound computation
|
||||
@ -2694,13 +2698,6 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu
|
||||
|
||||
DOC_VERSION=4.2.9
|
||||
|
||||
ac_config_headers="$ac_config_headers config.h"
|
||||
|
||||
ac_config_headers="$ac_config_headers YapTermConfig.h"
|
||||
|
||||
|
||||
mycflags="$CFLAGS"
|
||||
|
||||
ac_ext=c
|
||||
ac_cpp='$CPP $CPPFLAGS'
|
||||
ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
|
||||
@ -3884,6 +3881,117 @@ ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
|
||||
ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
|
||||
ac_compiler_gnu=$ac_cv_c_compiler_gnu
|
||||
|
||||
if test -n "$ac_tool_prefix"; then
|
||||
# Extract the first word of "${ac_tool_prefix}windres", so it can be a program name with args.
|
||||
set dummy ${ac_tool_prefix}windres; ac_word=$2
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
|
||||
$as_echo_n "checking for $ac_word... " >&6; }
|
||||
if ${ac_cv_prog_RC+:} false; then :
|
||||
$as_echo_n "(cached) " >&6
|
||||
else
|
||||
if test -n "$RC"; then
|
||||
ac_cv_prog_RC="$RC" # Let the user override the test.
|
||||
else
|
||||
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
|
||||
for as_dir in $PATH
|
||||
do
|
||||
IFS=$as_save_IFS
|
||||
test -z "$as_dir" && as_dir=.
|
||||
for ac_exec_ext in '' $ac_executable_extensions; do
|
||||
if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
|
||||
ac_cv_prog_RC="${ac_tool_prefix}windres"
|
||||
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
|
||||
break 2
|
||||
fi
|
||||
done
|
||||
done
|
||||
IFS=$as_save_IFS
|
||||
|
||||
fi
|
||||
fi
|
||||
RC=$ac_cv_prog_RC
|
||||
if test -n "$RC"; then
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $RC" >&5
|
||||
$as_echo "$RC" >&6; }
|
||||
else
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
|
||||
$as_echo "no" >&6; }
|
||||
fi
|
||||
|
||||
|
||||
fi
|
||||
if test -z "$ac_cv_prog_RC"; then
|
||||
ac_ct_RC=$RC
|
||||
# Extract the first word of "windres", so it can be a program name with args.
|
||||
set dummy windres; ac_word=$2
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
|
||||
$as_echo_n "checking for $ac_word... " >&6; }
|
||||
if ${ac_cv_prog_ac_ct_RC+:} false; then :
|
||||
$as_echo_n "(cached) " >&6
|
||||
else
|
||||
if test -n "$ac_ct_RC"; then
|
||||
ac_cv_prog_ac_ct_RC="$ac_ct_RC" # Let the user override the test.
|
||||
else
|
||||
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
|
||||
for as_dir in $PATH
|
||||
do
|
||||
IFS=$as_save_IFS
|
||||
test -z "$as_dir" && as_dir=.
|
||||
for ac_exec_ext in '' $ac_executable_extensions; do
|
||||
if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
|
||||
ac_cv_prog_ac_ct_RC="windres"
|
||||
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
|
||||
break 2
|
||||
fi
|
||||
done
|
||||
done
|
||||
IFS=$as_save_IFS
|
||||
|
||||
fi
|
||||
fi
|
||||
ac_ct_RC=$ac_cv_prog_ac_ct_RC
|
||||
if test -n "$ac_ct_RC"; then
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RC" >&5
|
||||
$as_echo "$ac_ct_RC" >&6; }
|
||||
else
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
|
||||
$as_echo "no" >&6; }
|
||||
fi
|
||||
|
||||
if test "x$ac_ct_RC" = x; then
|
||||
RC=":"
|
||||
else
|
||||
case $cross_compiling:$ac_tool_warned in
|
||||
yes:)
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
|
||||
$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
|
||||
ac_tool_warned=yes ;;
|
||||
esac
|
||||
RC=$ac_ct_RC
|
||||
fi
|
||||
else
|
||||
RC="$ac_cv_prog_RC"
|
||||
fi
|
||||
|
||||
|
||||
# if we are trying to use -m32 in a WIN32/mingw setup then
|
||||
# we cannot trust lpthread
|
||||
# we cannot trust RC
|
||||
# Check whether --enable-abi was given.
|
||||
if test "${enable_abi+set}" = set; then :
|
||||
enableval=$enable_abi; CC="$CC -m$enableval"; CPP="$CPP -m$enableval"; CXX="$CXX -m$enableval"; RCFLAGS="--output-format=coff --target=pe-i386" ; pthreadlib="`pwd`/pthreadGC2.dll"; win_abi="$enableval"
|
||||
else
|
||||
win_abi=no
|
||||
fi
|
||||
|
||||
|
||||
ac_config_headers="$ac_config_headers config.h"
|
||||
|
||||
ac_config_headers="$ac_config_headers YapTermConfig.h"
|
||||
|
||||
|
||||
mycflags="$CFLAGS"
|
||||
|
||||
for ac_prog in gawk mawk nawk awk
|
||||
do
|
||||
# Extract the first word of "$ac_prog", so it can be a program name with args.
|
||||
@ -3929,6 +4037,8 @@ done
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
ac_ext=c
|
||||
ac_cpp='$CPP $CPPFLAGS'
|
||||
ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
|
||||
@ -5240,6 +5350,9 @@ then
|
||||
then
|
||||
# locale complaints without this.
|
||||
if test "$threads" = yes; then
|
||||
if test $win_abi = 32; then
|
||||
LIBS="$LIBS $pthreadlib"
|
||||
else
|
||||
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -lpthread" >&5
|
||||
$as_echo_n "checking for main in -lpthread... " >&6; }
|
||||
@ -5280,6 +5393,7 @@ _ACEOF
|
||||
|
||||
fi
|
||||
|
||||
fi
|
||||
fi
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -lmscrt" >&5
|
||||
$as_echo_n "checking for main in -lmscrt... " >&6; }
|
||||
@ -5760,6 +5874,51 @@ fi
|
||||
LIBS="-lcygwin"
|
||||
EXTRA_LIBS_FOR_DLLS="\$(abs_top_builddir)/yap.dll"
|
||||
EXTRA_INCLUDES_FOR_WIN32="-I\$(srcdir)/packages/PLStream/windows"
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lpthread" >&5
|
||||
$as_echo_n "checking for pthread_create in -lpthread... " >&6; }
|
||||
if ${ac_cv_lib_pthread_pthread_create+:} false; then :
|
||||
$as_echo_n "(cached) " >&6
|
||||
else
|
||||
ac_check_lib_save_LIBS=$LIBS
|
||||
LIBS="-lpthread $LIBS"
|
||||
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
|
||||
/* end confdefs.h. */
|
||||
|
||||
/* Override any GCC internal prototype to avoid an error.
|
||||
Use char because int might match the return type of a GCC
|
||||
builtin and then its argument prototype would still apply. */
|
||||
#ifdef __cplusplus
|
||||
extern "C"
|
||||
#endif
|
||||
char pthread_create ();
|
||||
int
|
||||
main ()
|
||||
{
|
||||
return pthread_create ();
|
||||
;
|
||||
return 0;
|
||||
}
|
||||
_ACEOF
|
||||
if ac_fn_c_try_link "$LINENO"; then :
|
||||
ac_cv_lib_pthread_pthread_create=yes
|
||||
else
|
||||
ac_cv_lib_pthread_pthread_create=no
|
||||
fi
|
||||
rm -f core conftest.err conftest.$ac_objext \
|
||||
conftest$ac_exeext conftest.$ac_ext
|
||||
LIBS=$ac_check_lib_save_LIBS
|
||||
fi
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthread_pthread_create" >&5
|
||||
$as_echo "$ac_cv_lib_pthread_pthread_create" >&6; }
|
||||
if test "x$ac_cv_lib_pthread_pthread_create" = xyes; then :
|
||||
cat >>confdefs.h <<_ACEOF
|
||||
#define HAVE_LIBPTHREAD 1
|
||||
_ACEOF
|
||||
|
||||
LIBS="-lpthread $LIBS"
|
||||
|
||||
fi
|
||||
|
||||
fi
|
||||
else
|
||||
if test "$prefix" = "NONE"
|
||||
@ -6147,6 +6306,51 @@ _ACEOF
|
||||
|
||||
LIBS="-lresolv $LIBS"
|
||||
|
||||
fi
|
||||
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lpthread" >&5
|
||||
$as_echo_n "checking for pthread_create in -lpthread... " >&6; }
|
||||
if ${ac_cv_lib_pthread_pthread_create+:} false; then :
|
||||
$as_echo_n "(cached) " >&6
|
||||
else
|
||||
ac_check_lib_save_LIBS=$LIBS
|
||||
LIBS="-lpthread $LIBS"
|
||||
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
|
||||
/* end confdefs.h. */
|
||||
|
||||
/* Override any GCC internal prototype to avoid an error.
|
||||
Use char because int might match the return type of a GCC
|
||||
builtin and then its argument prototype would still apply. */
|
||||
#ifdef __cplusplus
|
||||
extern "C"
|
||||
#endif
|
||||
char pthread_create ();
|
||||
int
|
||||
main ()
|
||||
{
|
||||
return pthread_create ();
|
||||
;
|
||||
return 0;
|
||||
}
|
||||
_ACEOF
|
||||
if ac_fn_c_try_link "$LINENO"; then :
|
||||
ac_cv_lib_pthread_pthread_create=yes
|
||||
else
|
||||
ac_cv_lib_pthread_pthread_create=no
|
||||
fi
|
||||
rm -f core conftest.err conftest.$ac_objext \
|
||||
conftest$ac_exeext conftest.$ac_ext
|
||||
LIBS=$ac_check_lib_save_LIBS
|
||||
fi
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthread_pthread_create" >&5
|
||||
$as_echo "$ac_cv_lib_pthread_pthread_create" >&6; }
|
||||
if test "x$ac_cv_lib_pthread_pthread_create" = xyes; then :
|
||||
cat >>confdefs.h <<_ACEOF
|
||||
#define HAVE_LIBPTHREAD 1
|
||||
_ACEOF
|
||||
|
||||
LIBS="-lpthread $LIBS"
|
||||
|
||||
fi
|
||||
|
||||
fi
|
||||
@ -6334,51 +6538,6 @@ fi
|
||||
|
||||
if test "$threads" = yes
|
||||
then
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lpthread" >&5
|
||||
$as_echo_n "checking for pthread_create in -lpthread... " >&6; }
|
||||
if ${ac_cv_lib_pthread_pthread_create+:} false; then :
|
||||
$as_echo_n "(cached) " >&6
|
||||
else
|
||||
ac_check_lib_save_LIBS=$LIBS
|
||||
LIBS="-lpthread $LIBS"
|
||||
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
|
||||
/* end confdefs.h. */
|
||||
|
||||
/* Override any GCC internal prototype to avoid an error.
|
||||
Use char because int might match the return type of a GCC
|
||||
builtin and then its argument prototype would still apply. */
|
||||
#ifdef __cplusplus
|
||||
extern "C"
|
||||
#endif
|
||||
char pthread_create ();
|
||||
int
|
||||
main ()
|
||||
{
|
||||
return pthread_create ();
|
||||
;
|
||||
return 0;
|
||||
}
|
||||
_ACEOF
|
||||
if ac_fn_c_try_link "$LINENO"; then :
|
||||
ac_cv_lib_pthread_pthread_create=yes
|
||||
else
|
||||
ac_cv_lib_pthread_pthread_create=no
|
||||
fi
|
||||
rm -f core conftest.err conftest.$ac_objext \
|
||||
conftest$ac_exeext conftest.$ac_ext
|
||||
LIBS=$ac_check_lib_save_LIBS
|
||||
fi
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthread_pthread_create" >&5
|
||||
$as_echo "$ac_cv_lib_pthread_pthread_create" >&6; }
|
||||
if test "x$ac_cv_lib_pthread_pthread_create" = xyes; then :
|
||||
cat >>confdefs.h <<_ACEOF
|
||||
#define HAVE_LIBPTHREAD 1
|
||||
_ACEOF
|
||||
|
||||
LIBS="-lpthread $LIBS"
|
||||
|
||||
fi
|
||||
|
||||
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
|
||||
$as_echo_n "checking for grep that handles long lines and -e... " >&6; }
|
||||
@ -9420,8 +9579,11 @@ CHR_TARGETS=chr_support."$SO"
|
||||
|
||||
|
||||
|
||||
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lpthread" >&5
|
||||
# use the lib directly in mingw setups
|
||||
if test "$win_abi" = "32"; then
|
||||
CLIB_PTHREADS="$pthreadlib"
|
||||
else
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lpthread" >&5
|
||||
$as_echo_n "checking for pthread_create in -lpthread... " >&6; }
|
||||
if ${ac_cv_lib_pthread_pthread_create+:} false; then :
|
||||
$as_echo_n "(cached) " >&6
|
||||
@ -9463,7 +9625,7 @@ else
|
||||
CLIB_PTHREADS=""
|
||||
fi
|
||||
|
||||
|
||||
fi
|
||||
|
||||
|
||||
ac_fn_c_check_type "$LINENO" "socklen_t" "ac_cv_type_socklen_t" "
|
||||
@ -12176,7 +12338,7 @@ else
|
||||
JAVA_TEST=Test.java
|
||||
CLASS_TEST=Test.class
|
||||
cat << \EOF > $JAVA_TEST
|
||||
/* #line 12179 "configure" */
|
||||
/* #line 12341 "configure" */
|
||||
public class Test {
|
||||
}
|
||||
EOF
|
||||
@ -12352,7 +12514,7 @@ EOF
|
||||
if uudecode$EXEEXT Test.uue; then
|
||||
ac_cv_prog_uudecode_base64=yes
|
||||
else
|
||||
echo "configure: 12355: uudecode had trouble decoding base 64 file 'Test.uue'" >&5
|
||||
echo "configure: 12517: 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
|
||||
@ -12483,7 +12645,7 @@ else
|
||||
JAVA_TEST=Test.java
|
||||
CLASS_TEST=Test.class
|
||||
cat << \EOF > $JAVA_TEST
|
||||
/* #line 12486 "configure" */
|
||||
/* #line 12648 "configure" */
|
||||
public class Test {
|
||||
}
|
||||
EOF
|
||||
@ -12518,7 +12680,7 @@ JAVA_TEST=Test.java
|
||||
CLASS_TEST=Test.class
|
||||
TEST=Test
|
||||
cat << \EOF > $JAVA_TEST
|
||||
/* [#]line 12521 "configure" */
|
||||
/* [#]line 12683 "configure" */
|
||||
public class Test {
|
||||
public static void main (String args[]) {
|
||||
System.exit (0);
|
||||
@ -12903,9 +13065,6 @@ while test $found = no; do
|
||||
fi
|
||||
done
|
||||
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: _JTOPDIR=\"$_JTOPDIR\"" >&5
|
||||
$as_echo "_JTOPDIR=\"$_JTOPDIR\"" >&6; }
|
||||
|
||||
# get the likely subdirectories for system specific java includes
|
||||
case "$host_os" in
|
||||
bsdi*) _JNI_INC_SUBDIRS="bsdos";;
|
||||
|
18
console/LGPL/manifest.xml
Executable file
18
console/LGPL/manifest.xml
Executable file
@ -0,0 +1,18 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
|
||||
|
||||
<assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0">
|
||||
<trustInfo xmlns="urn:schemas-microsoft-com:asm.v2">
|
||||
<security>
|
||||
<requestedPrivileges>
|
||||
<requestedExecutionLevel level="asInvoker" uiAccess="false"/>
|
||||
</requestedPrivileges>
|
||||
</security>
|
||||
</trustInfo>
|
||||
<dependency>
|
||||
<dependentAssembly>
|
||||
<assemblyIdentity type="Win32" name="Microsoft.Windows.Common-Controls" version="6.0.0.0"
|
||||
processorArchitecture="*" publicKeyToken="6595b64144ccf1df" language="*"/>
|
||||
</dependentAssembly>
|
||||
</dependency>
|
||||
</assembly>
|
||||
|
@ -1072,8 +1072,8 @@ X_API int PL_unify_atom_nchars(term_t t, size_t len, const char *s)
|
||||
X_API int PL_unify_float(term_t t, double f)
|
||||
{
|
||||
CACHE_REGS
|
||||
YAP_Term fterm = YAP_MkFloatTerm(f);
|
||||
return YAP_Unify(Yap_GetFromSlot(t PASS_REGS),fterm);
|
||||
Term fterm = MkFloatTerm(f);
|
||||
return Yap_unify(Yap_GetFromSlot(t PASS_REGS),fterm);
|
||||
}
|
||||
|
||||
/* SWI: int PL_unify_integer(term_t ?t, long n)
|
||||
|
20
os/pl-os.c
20
os/pl-os.c
@ -1251,6 +1251,7 @@ expandVars(const char *pattern, char *expanded, int maxlen)
|
||||
|
||||
pattern++;
|
||||
user = takeWord(&pattern, wordbuf, sizeof(wordbuf));
|
||||
|
||||
LOCK();
|
||||
|
||||
if ( user[0] == EOS ) /* ~/bla */
|
||||
@ -1325,9 +1326,22 @@ expandVars(const char *pattern, char *expanded, int maxlen)
|
||||
break;
|
||||
case '$':
|
||||
{ char envbuf[MAXPATHLEN];
|
||||
char *var = takeWord(&pattern, wordbuf, sizeof(wordbuf));
|
||||
char *value;
|
||||
int l;
|
||||
char *var;
|
||||
char *value, ch;
|
||||
int l, i;
|
||||
|
||||
if (pattern[0] == '{') {
|
||||
pattern++;
|
||||
for (i = 0; i < sizeof(envbuf)-1; i++) {
|
||||
if ((ch = *pattern++) == '}')
|
||||
break;
|
||||
envbuf[i] = ch;
|
||||
}
|
||||
envbuf[i] = '\0';
|
||||
var = envbuf;
|
||||
} else {
|
||||
var = takeWord(&pattern, wordbuf, sizeof(wordbuf));
|
||||
}
|
||||
|
||||
if ( var[0] == EOS )
|
||||
goto def;
|
||||
|
Reference in New Issue
Block a user