From d05d4c920de8a6b37c585c58c19e61e542594dc2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=C3=ADtor=20Santos=20Costa?= Date: Mon, 21 Jun 2010 17:11:48 +0100 Subject: [PATCH] fix conflict between clib and old random libraries (they are much the same): --- Makefile.in | 6 +++--- library/random.yap | 2 +- library/random/Makefile.in | 12 ++++++------ library/random/{random.c => yap_random.c} | 0 library/random/{random.def => yap_random.def} | 0 5 files changed, 10 insertions(+), 10 deletions(-) rename library/random/{random.c => yap_random.c} (100%) rename library/random/{random.def => yap_random.def} (100%) diff --git a/Makefile.in b/Makefile.in index 27359c52d..b31bdfb28 100755 --- a/Makefile.in +++ b/Makefile.in @@ -307,7 +307,7 @@ BEAM_OBJECTS = \ eamamasm.o eam_showcode.o eamindex.o eam_am.o STATIC_OBJECTS = \ - @STATIC_MODE@sys.o random.o regexp.o @NO_BUILTIN_REGEXP@ regcomp.o regerror.o regfree.o regexec.o + @STATIC_MODE@sys.o yap_random.o regexp.o @NO_BUILTIN_REGEXP@ regcomp.o regerror.o regfree.o regexec.o LIB_OBJECTS = $(ENGINE_OBJECTS) $(C_INTERFACE_OBJECTS) $(OR_OBJECTS) $(BEAM_OBJECTS) $(STATIC_OBJECTS) @@ -457,8 +457,8 @@ sys.o: $(srcdir)/library/system/sys.c config.h yap2swi.o: $(srcdir)/library/yap2swi/yap2swi.c config.h $(CC) -c $(CFLAGS) -I$(srcdir)/include $(srcdir)/library/yap2swi/yap2swi.c -o $@ -random.o: $(srcdir)/library/random/random.c config.h - $(CC) -c $(CFLAGS) -I$(srcdir)/include $(srcdir)/library/random/random.c -o $@ +yap_random.o: $(srcdir)/library/random/yap_random.c config.h + $(CC) -c $(CFLAGS) -I$(srcdir)/include $(srcdir)/library/random/yap_random.c -o $@ regexp.o: $(srcdir)/library/regex/regexp.c @NO_BUILTIN_REGEXP@ $(srcdir)/library/regex/regex2.h $(srcdir)/library/regex/engine.c config.h $(CC) -c $(CFLAGS) -I$(srcdir)/include -I$(srcdir)/library/regex $(srcdir)/library/regex/regexp.c -o regexp.o diff --git a/library/random.yap b/library/random.yap index 9914e3feb..15597a95b 100644 --- a/library/random.yap +++ b/library/random.yap @@ -31,7 +31,7 @@ setrand/1 ]). -:- load_foreign_files([random], [], init_random). +:- load_foreign_files([yap_random], [], init_random). % random(R) binds R to a new random number in [0.0,1.0) diff --git a/library/random/Makefile.in b/library/random/Makefile.in index a1a5ba4da..fd2150b16 100644 --- a/library/random/Makefile.in +++ b/library/random/Makefile.in @@ -35,22 +35,22 @@ SO=@SO@ CWD=$(PWD) # -OBJS=random.o -SOBJS=random.@SO@ +OBJS=yap_random.o +SOBJS=yap_random.@SO@ #in some systems we just create a single object, in others we need to # create a libray all: $(SOBJS) -random.o: $(srcdir)/random.c - $(CC) -c $(CFLAGS) $(srcdir)/random.c -o random.o +yap_random.o: $(srcdir)/yap_random.c + $(CC) -c $(CFLAGS) $(srcdir)/yap_random.c -o yap_random.o @DO_SECOND_LD@%.@SO@: %.o @DO_SECOND_LD@ @SHLIB_LD@ -o $@ $< @EXTRA_LIBS_FOR_DLLS@ -@DO_SECOND_LD@random.@SO@: random.o -@DO_SECOND_LD@ @SHLIB_LD@ -o random.@SO@ random.o @EXTRA_LIBS_FOR_DLLS@ +@DO_SECOND_LD@yap_random.@SO@: yap_random.o +@DO_SECOND_LD@ @SHLIB_LD@ -o yap_random.@SO@ yap_random.o @EXTRA_LIBS_FOR_DLLS@ install: all $(INSTALL_PROGRAM) $(SOBJS) $(DESTDIR)$(YAPLIBDIR) diff --git a/library/random/random.c b/library/random/yap_random.c similarity index 100% rename from library/random/random.c rename to library/random/yap_random.c diff --git a/library/random/random.def b/library/random/yap_random.def similarity index 100% rename from library/random/random.def rename to library/random/yap_random.def