socsvn commit: r289128 - in soc2015/clord/head/sys: boot/ficl contrib/ficl
clord at FreeBSD.org
clord at FreeBSD.org
Sun Aug 2 23:17:03 UTC 2015
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 <bsd.prog.mk>
.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 <stdio.h>
#include <stdlib.h>
+#include <unistd.h>
+#else
+#include <stand.h>
+#endif
#include <string.h>
#include <time.h>
-#include <unistd.h>
#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)
More information about the svn-soc-all
mailing list