diff -c -r +new-file ChangeLog ChangeLog *** ChangeLog Mon Feb 13 16:51:03 1995 --- ChangeLog Fri Feb 17 11:38:05 1995 *************** *** 1,6 **** --- 1,17 ---- SWI-Prolog ChangeLog ==================== + Version 2.0.3 + ============= + + * Fixed: loading qlf files now push the source context while running + a directive, so source_location/2 should work while executing a + directive from a .qlf file. + * Fixed: recognise MAP_ANONYMOUS for configuring mmap() based stacks. + * Added feature(dynamic_stacks, Bool) for detection of virtual memory + based stack management. + * Fixed feature(open_shared_object, Bool) (Michael Kauschke) + Version 2.0.2 ============= diff -c -r +new-file STAMP STAMP *** STAMP Mon Feb 13 17:46:58 1995 --- STAMP Fri Feb 17 12:12:01 1995 *************** *** 1 **** ! Mon Feb 13 17:46:28 MET 1995 --- 1 ---- ! Fri Feb 17 12:11:27 MET 1995 diff -c -r +new-file VERSION VERSION *** VERSION Mon Feb 13 15:56:02 1995 --- VERSION Fri Feb 17 12:10:24 1995 *************** *** 1 **** ! 2.0.2 --- 1 ---- ! 2.0.3 diff -c -r +new-file man/intro.doc man/intro.doc *** man/intro.doc Tue Feb 7 13:11:56 1995 --- man/intro.doc Fri Feb 17 11:38:12 1995 *************** *** 776,781 **** --- 776,787 ---- access to shared libraries (.so files). This requires the C-library functions dlopen() and friends as well as the configuration option {\tt --with-dlopen}. + \option{dynamic_stacks}{bool} + If true, the system provides virtual memory based stack expansion. This + makes stack-expansion safe when called from C and while running + C-defined functions without these functions taking any precautions. + Pure Prolog programs are not affected by this feature as the system + will use stack-shifting to expand the stacks at runtime. \option{c_libs}{atom} Libraries passed to the C-linker when SWI-Prolog was linked. May be used to determine the libraries needed to create statically linked extensions diff -c -r +new-file src/Makefile src/Makefile *** src/Makefile Mon Feb 13 16:51:09 1995 --- src/Makefile Fri Feb 17 12:11:00 1995 *************** *** 1,7 **** # Generated automatically from Makefile.in by configure. ################################################################ # Makefile for SWI-Prolog 1.9 ! # Makefile,v 1.43 1995/02/13 15:51:09 jan Exp # # Author: Jan Wielemaker # jan@swi.psy.uva.nl --- 1,7 ---- # Generated automatically from Makefile.in by configure. ################################################################ # Makefile for SWI-Prolog 1.9 ! # Makefile,v 1.45 1995/02/17 11:11:00 jan Exp # # Author: Jan Wielemaker # jan@swi.psy.uva.nl *************** *** 15,24 **** # ################################################################ ! PLVERSION=2.0.2 PL=pl ! prefix=~ exec_prefix=${prefix} bindir=$(exec_prefix)/bin PLBASE=$(prefix)/lib/$(PL)-$(PLVERSION) --- 15,24 ---- # ################################################################ ! PLVERSION=2.0.3 PL=pl ! prefix=/staff/jan exec_prefix=${prefix} bindir=$(exec_prefix)/bin PLBASE=$(prefix)/lib/$(PL)-$(PLVERSION) diff -c -r +new-file src/Makefile.in src/Makefile.in *** src/Makefile.in Mon Feb 13 15:56:17 1995 --- src/Makefile.in Fri Feb 17 11:38:19 1995 *************** *** 1,6 **** ################################################################ # Makefile for SWI-Prolog 1.9 ! # Makefile.in,v 1.12 1995/02/13 14:56:17 jan Exp # # Author: Jan Wielemaker # jan@swi.psy.uva.nl --- 1,6 ---- ################################################################ # Makefile for SWI-Prolog 1.9 ! # Makefile.in,v 1.13 1995/02/17 10:38:19 jan Exp # # Author: Jan Wielemaker # jan@swi.psy.uva.nl *************** *** 14,20 **** # ################################################################ ! PLVERSION=2.0.2 PL=pl prefix=@prefix@ --- 14,20 ---- # ################################################################ ! PLVERSION=2.0.3 PL=pl prefix=@prefix@ diff -c -r +new-file src/pl-setup.c src/pl-setup.c *** src/pl-setup.c Mon Feb 13 15:56:34 1995 --- src/pl-setup.c Fri Feb 17 11:38:20 1995 *************** *** 135,148 **** CSetFeature("save_program", "true"); #endif #ifdef O_STORE_PROGRAM ! CSetFeature("save_program", "true"); #endif #if defined(O_FOREIGN) || defined(O_MACH_FOREIGN) || defined(O_AIX_FOREIGN) CSetFeature("load_foreign", "true"); #endif ! #ifdef HAVE_LDOPEN CSetFeature("open_shared_object", "true"); #endif #if defined(HAVE_LIBREADLINE) CSetFeature("readline", "true"); #endif --- 135,151 ---- CSetFeature("save_program", "true"); #endif #ifdef O_STORE_PROGRAM ! CSetFeature("save_program", "true"); #endif #if defined(O_FOREIGN) || defined(O_MACH_FOREIGN) || defined(O_AIX_FOREIGN) CSetFeature("load_foreign", "true"); #endif ! #ifdef HAVE_DLOPEN CSetFeature("open_shared_object", "true"); #endif + #if O_DYNAMIC_STACKS + CSetFeature("dynamic_stacks", "true"); + #endif #if defined(HAVE_LIBREADLINE) CSetFeature("readline", "true"); #endif *************** *** 301,309 **** - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */ #ifdef HAVE_MAP_ANON #define get_map_fd() (-1) #define STACK_MAP_TYPE MAP_ANON|MAP_PRIVATE|MAP_FIXED ! #else #define STACK_MAP_TYPE MAP_PRIVATE|MAP_FIXED static int --- 304,318 ---- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */ #ifdef HAVE_MAP_ANON + #if !defined(MAP_ANON) && defined(MAP_ANONYMOUS) + #define MAP_ANON MAP_ANONYMOUS + #endif + #define get_map_fd() (-1) #define STACK_MAP_TYPE MAP_ANON|MAP_PRIVATE|MAP_FIXED ! ! #else /*HAVE_MAP_ANON*/ ! #define STACK_MAP_TYPE MAP_PRIVATE|MAP_FIXED static int *************** *** 340,346 **** return fd; } ! #endif /*MAP_ANON*/ /* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Expand stack `s' by one page. This might not be enough, but in this --- 349,355 ---- return fd; } ! #endif /*HAVE_MAP_ANON*/ /* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Expand stack `s' by one page. This might not be enough, but in this diff -c -r +new-file src/pl-wic.c src/pl-wic.c *** src/pl-wic.c Mon Feb 13 15:56:37 1995 --- src/pl-wic.c Fri Feb 17 11:38:21 1995 *************** *** 1,4 **** ! /* pl-wic.c,v 1.23 1995/02/13 14:56:37 jan Exp Copyright (c) 1990 Jan Wielemaker. All rights reserved. See ../LICENCE to find out about your rights. --- 1,4 ---- ! /* pl-wic.c,v 1.24 1995/02/17 10:38:21 jan Exp Copyright (c) 1990 Jan Wielemaker. All rights reserved. See ../LICENCE to find out about your rights. *************** *** 97,103 **** ::= 'W' % include wic file | 'P' {} % predicate ! | 'D' % directive | 'E' % export predicate | 'I' % import predicate | 'Q' % include module --- 97,105 ---- ::= 'W' % include wic file | 'P' {} % predicate ! | 'D' ! % source line number ! % directive | 'E' % export predicate | 'I' % import predicate | 'Q' % include module *************** *** 136,142 **** bits) as well as machines with different byte order. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */ ! #define VERSION 16 /* save version number */ #define XR_REF 0 /* reference to previous */ #define XR_ATOM 1 /* atom */ --- 138,144 ---- bits) as well as machines with different byte order. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */ ! #define VERSION 17 /* save version number */ #define XR_REF 0 /* reference to previous */ #define XR_ATOM 1 /* atom */ *************** *** 516,521 **** --- 518,524 ---- { FILE *fd; bool rval = TRUE; bool tablealloced = FALSE; + char *owf = wicFile; if ((fd = Fopen(file, STREAM_OPEN_BIN_READ)) == (FILE *) NULL) { fatalError("Can't open %s: %s", file, OsError()); *************** *** 523,528 **** --- 526,532 ---- goto out; } + wicFile = file; notifyLoad(file); if ( toplevel && !load_options ) *************** *** 548,553 **** --- 552,558 ---- { popXrIdTable(); } + wicFile = owf; notifyLoaded(); return rval; *************** *** 640,655 **** case 'D': { mark m; word goal; Mark(m); goal = loadQlfTerm(fd); if ( !callGoal(MODULE_user, goal, FALSE) ) ! { printf("[WARNING: directive failed: "); pl_write(&goal); printf("]\n"); } Undo(m); succeed; } --- 645,669 ---- case 'D': { mark m; word goal; + Atom osf = source_file_name; + int oln = source_line_no; + + source_file_name = currentSource->name; + source_line_no = getNum(fd); Mark(m); goal = loadQlfTerm(fd); if ( !callGoal(MODULE_user, goal, FALSE) ) ! { printf("[WARNING: %s:%d: (loading %s) directive failed: ", ! stringAtom(source_file_name), source_line_no, wicFile); pl_write(&goal); printf("]\n"); } Undo(m); + source_file_name = osf; + source_line_no = oln; + succeed; } *************** *** 1224,1229 **** --- 1238,1244 ---- addDirectiveWic(word term, FILE *fd) { closeProcedureWic(fd); Putc('D', fd); + putNum(source_line_no, fd); saveQlfTerm(&term, fd); succeed; diff -c -r +new-file src/test/mmap.c src/test/mmap.c *** src/test/mmap.c Mon Feb 13 15:56:47 1995 --- src/test/mmap.c Fri Feb 17 11:38:28 1995 *************** *** 1,4 **** ! /* mmap.c,v 1.2 1995/02/13 14:56:47 jan Exp Designed and implemented by Jan Wielemaker E-mail: jan@swi.psy.uva.nl --- 1,4 ---- ! /* mmap.c,v 1.3 1995/02/17 10:38:28 jan Exp Designed and implemented by Jan Wielemaker E-mail: jan@swi.psy.uva.nl *************** *** 15,21 **** #include #endif ! /*#undef MAP_ANON*/ #ifndef SIGRETTYPE #define SIGRETTYPE void --- 15,23 ---- #include #endif ! #if !defined(MAP_ANON) && defined(MAP_ANONYMOUS) ! #define MAP_ANON MAP_ANONYMOUS ! #endif #ifndef SIGRETTYPE #define SIGRETTYPE void