fix Makefiles to use @DLL_LIBS@ for DLLs

use _stat instead of stat in WIN32
regex.h may exist, even when regex function is not avalailable (should
check for libs?)


git-svn-id: https://yap.svn.sf.net/svnroot/yap/trunk@623 b08c6af1-5177-4d33-ba66-4b1c6b8b522a
This commit is contained in:
vsc 2002-10-07 14:50:00 +00:00
parent b0bee478ec
commit 6dde85e627
6 changed files with 7 additions and 7 deletions

View File

@ -67,7 +67,7 @@ random.o: $(srcdir)/random.c
# #
DLLTOOL=dlltool DLLTOOL=dlltool
DLLNAME=random.dll DLLNAME=random.dll
DLL_LIBS=-L /usr/lib/mingw -lmoldname -lcrtdll -lkernel32 -L../.. -lWYap DLL_LIBS=@DLL_LIBS@ -L../.. -lWYap
BASE_FILE=random.base BASE_FILE=random.base
EXP_FILE=random.exp EXP_FILE=random.exp
DEF_FILE=$(srcdir)/random.def DEF_FILE=$(srcdir)/random.def

View File

@ -91,7 +91,7 @@ regexec.o: $(srcdir)/regexec.c
# #
DLLTOOL=dlltool DLLTOOL=dlltool
DLLNAME=regexp.dll DLLNAME=regexp.dll
DLL_LIBS=-L /usr/lib/mingw -lcrtdll -L../.. -lWYap DLL_LIBS=@DLL_LIBS@ -L../.. -lWYap
BASE_FILE=regexp.base BASE_FILE=regexp.base
EXP_FILE=regexp.exp EXP_FILE=regexp.exp
DEF_FILE=$(srcdir)/regexp.def DEF_FILE=$(srcdir)/regexp.def

View File

@ -20,7 +20,7 @@
#include <sys/types.h> #include <sys/types.h>
#endif #endif
#include "YapInterface.h" #include "YapInterface.h"
#if HAVE_REGEX_H #if HAVE_REGEXEC
#include "regex.h" #include "regex.h"
#define yap_regcomp(A,B,C) regcomp(A,B,C) #define yap_regcomp(A,B,C) regcomp(A,B,C)
#define yap_regexec(A,B,C,D,E) regexec(A,B,C,D,E) #define yap_regexec(A,B,C,D,E) regexec(A,B,C,D,E)

View File

@ -67,7 +67,7 @@ sys.o: $(srcdir)/sys.c
# #
DLLTOOL=dlltool DLLTOOL=dlltool
DLLNAME=sys.dll DLLNAME=sys.dll
DLL_LIBS=-L /usr/lib/mingw -lmoldname -lcrtdll -lkernel32 -L../.. -lWYap DLL_LIBS=@DLL_LIBS@ -L../.. -lWYap
BASE_FILE=sys.base BASE_FILE=sys.base
EXP_FILE=sys.exp EXP_FILE=sys.exp
DEF_FILE=$(srcdir)/sys.def DEF_FILE=$(srcdir)/sys.def

View File

@ -300,10 +300,10 @@ file_property(void)
} }
#elif defined(__MINGW32__) || _MSC_VER #elif defined(__MINGW32__) || _MSC_VER
/* for some weird reason _stat did not work with mingw32 */ /* for some weird reason _stat did not work with mingw32 */
struct stat buf; struct _stat buf;
fd = YAP_AtomName(YAP_AtomOfTerm(YAP_ARG1)); fd = YAP_AtomName(YAP_AtomOfTerm(YAP_ARG1));
if (stat(fd, &buf) != 0) { if (_stat(fd, &buf) != 0) {
/* return an error number */ /* return an error number */
return(YAP_Unify(YAP_ARG7, YAP_MkIntTerm(errno))); return(YAP_Unify(YAP_ARG7, YAP_MkIntTerm(errno)));
} }

View File

@ -67,7 +67,7 @@ yap2swi.o: $(srcdir)/yap2swi.c
# #
DLLTOOL=dlltool DLLTOOL=dlltool
DLLNAME=yap2swi.dll DLLNAME=yap2swi.dll
DLL_LIBS=-L /usr/lib/mingw -lmoldname -lcrtdll -lkernel32 -L../.. -lWYap DLL_LIBS=@DLL_LIBS@ -L../.. -lWYap
BASE_FILE=yap2swi.base BASE_FILE=yap2swi.base
EXP_FILE=yap2swi.exp EXP_FILE=yap2swi.exp
DEF_FILE=$(srcdir)/yap2swi.def DEF_FILE=$(srcdir)/yap2swi.def