From owner-svn-soc-all@freebsd.org Sun Aug 2 23:17:03 2015 Return-Path: Delivered-To: svn-soc-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 8B7E89B1ED7 for ; Sun, 2 Aug 2015 23:17:03 +0000 (UTC) (envelope-from clord@FreeBSD.org) Received: from socsvn.freebsd.org (socsvn.freebsd.org [IPv6:2001:1900:2254:206a::50:2]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 7BFF9BF3 for ; Sun, 2 Aug 2015 23:17:03 +0000 (UTC) (envelope-from clord@FreeBSD.org) Received: from socsvn.freebsd.org ([127.0.1.124]) by socsvn.freebsd.org (8.15.2/8.15.2) with ESMTP id t72NH3w7024057 for ; Sun, 2 Aug 2015 23:17:03 GMT (envelope-from clord@FreeBSD.org) Received: (from www@localhost) by socsvn.freebsd.org (8.15.2/8.15.2/Submit) id t72NH21L024052 for svn-soc-all@FreeBSD.org; Sun, 2 Aug 2015 23:17:02 GMT (envelope-from clord@FreeBSD.org) Date: Sun, 2 Aug 2015 23:17:02 GMT Message-Id: <201508022317.t72NH21L024052@socsvn.freebsd.org> X-Authentication-Warning: socsvn.freebsd.org: www set sender to clord@FreeBSD.org using -f From: clord@FreeBSD.org To: svn-soc-all@FreeBSD.org Subject: socsvn commit: r289128 - in soc2015/clord/head/sys: boot/ficl contrib/ficl MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-soc-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the entire Summer of Code repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 02 Aug 2015 23:17:03 -0000 Author: clord Date: Sun Aug 2 23:17:01 2015 New Revision: 289128 URL: http://svnweb.FreeBSD.org/socsvn/?view=rev&rev=289128 Log: Only include extras.c in build if target is testmain. Previously the functions in extras.c were provided in testmain.c, but in Ficl 4 that is no longer the case, and they should not be needed for anything except testmain. Modified: soc2015/clord/head/sys/boot/ficl/Makefile soc2015/clord/head/sys/contrib/ficl/compatibility.c soc2015/clord/head/sys/contrib/ficl/extras.c Modified: soc2015/clord/head/sys/boot/ficl/Makefile ============================================================================== --- soc2015/clord/head/sys/boot/ficl/Makefile Sun Aug 2 22:51:58 2015 (r289127) +++ soc2015/clord/head/sys/boot/ficl/Makefile Sun Aug 2 23:17:01 2015 (r289128) @@ -11,9 +11,9 @@ .PATH: ${FICLDIR}/${MACHINE_CPUARCH} .endif .PATH: ${FICLDIR}/ficlplatform -BASE_SRCS= bit.c callback.c compatibility.c dictionary.c double.c extras.c \ - fileaccess.c float.c hash.c loader.c lzuncompress.c prefix.c \ - primitives.c search.c stack.c system.c tools.c unix.c utility.c vm.c word.c +BASE_SRCS= bit.c callback.c compatibility.c dictionary.c double.c fileaccess.c \ + float.c hash.c loader.c lzuncompress.c prefix.c primitives.c search.c \ + stack.c system.c tools.c unix.c utility.c vm.c word.c SRCS= ${BASE_SRCS} sysdep.c softcore.c CLEANFILES= softcore.c main main.o @@ -43,7 +43,7 @@ .endif .ifmake testmain CFLAGS+= -DTESTMAIN -D_TESTMAIN -SRCS+= main.c +SRCS+= main.c extras.c PROG= testmain .include .else Modified: soc2015/clord/head/sys/contrib/ficl/compatibility.c ============================================================================== --- soc2015/clord/head/sys/contrib/ficl/compatibility.c Sun Aug 2 22:51:58 2015 (r289127) +++ soc2015/clord/head/sys/contrib/ficl/compatibility.c Sun Aug 2 23:17:01 2015 (r289128) @@ -278,6 +278,8 @@ FICL_PLATFORM_EXTERN int isAFiclWord(ficlDictionary *dictionary, ficlWord *word) { return ficlDictionaryIsAWord(dictionary, word); } +#ifdef TESTMAIN FICL_PLATFORM_EXTERN void buildTestInterface(ficlSystem *system) { ficlSystemCompileExtras(system); } +#endif Modified: soc2015/clord/head/sys/contrib/ficl/extras.c ============================================================================== --- soc2015/clord/head/sys/contrib/ficl/extras.c Sun Aug 2 22:51:58 2015 (r289127) +++ soc2015/clord/head/sys/contrib/ficl/extras.c Sun Aug 2 23:17:01 2015 (r289128) @@ -1,10 +1,14 @@ /* $FreeBSD$ */ +#ifdef TESTMAIN #include #include +#include +#else +#include +#endif #include #include -#include #include "ficl.h" @@ -12,7 +16,7 @@ #ifndef FICL_ANSI /* -** Ficl interface to _getcwd (Win32) +** Ficl interface to getcwd ** Prints the current working directory using the VM's ** textOut method... */ @@ -30,9 +34,9 @@ /* -** Ficl interface to _chdir (Win32) +** Ficl interface to chdir ** Gets a newline (or NULL) delimited string from the input -** and feeds it to the Win32 chdir function... +** and feeds it to chdir() ** Example: ** cd c:\tmp */ @@ -73,7 +77,7 @@ ** Gets a newline (or NULL) delimited string from the input ** and feeds it to the ANSI system function... ** Example: -** system del *.* +** system rm -rf / ** \ ouch! */ static void ficlPrimitiveSystem(ficlVm *vm)