fix CYGWIN compilation

This commit is contained in:
U-WIN-U2045GN0RNQ\Vítor Santos Costa 2010-08-03 01:11:13 +01:00
parent fd64559643
commit 8340ee4cb1
3 changed files with 1961 additions and 1957 deletions

2
C/load_dl.c Normal file → Executable file
View File

@ -46,8 +46,10 @@ Yap_LoadForeignFile(char *file, int flags)
dlflag = RTLD_LAZY; dlflag = RTLD_LAZY;
if (flags & GLOBAL_LOADING) if (flags & GLOBAL_LOADING)
dlflag |= RTLD_GLOBAL; dlflag |= RTLD_GLOBAL;
#ifndef __CYGWIN__
else else
dlflag |= RTLD_LOCAL; dlflag |= RTLD_LOCAL;
#endif
out = (void *)dlopen(file,dlflag); out = (void *)dlopen(file,dlflag);
if (!out) { if (!out) {

1
configure vendored
View File

@ -5100,6 +5100,7 @@ _ACEOF
fi fi
EXTRA_LIBS_FOR_DLLS="\$(abs_top_builddir)/yap.dll"
else else
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -lwsock32" >&5 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -lwsock32" >&5
$as_echo_n "checking for main in -lwsock32... " >&6; } $as_echo_n "checking for main in -lwsock32... " >&6; }

View File

@ -553,6 +553,7 @@ then
CC="${CC} -mno-cygwin" CC="${CC} -mno-cygwin"
CXX="${CXX} -mno-cygwin" CXX="${CXX} -mno-cygwin"
AC_CHECK_LIB(wsock32,main) AC_CHECK_LIB(wsock32,main)
EXTRA_LIBS_FOR_DLLS="\$(abs_top_builddir)/yap.dll"
else else
AC_CHECK_LIB(wsock32,main) AC_CHECK_LIB(wsock32,main)
EXTRA_LIBS_FOR_DLLS="\$(abs_top_builddir)/yap.dll" EXTRA_LIBS_FOR_DLLS="\$(abs_top_builddir)/yap.dll"