Permalink
Browse files

Fixes for Windows

  • Loading branch information...
1 parent d003583 commit c7d4a4f7a3cf7b1405b95430187f728581e2c933 pazsan committed Oct 8, 2012
Showing with 48 additions and 29 deletions.
  1. +1 −1 Makefile.in
  2. +15 −13 configure.in
  3. +3 −0 environ.fs
  4. +1 −1 fixpath.fs
  5. +1 −2 gforthmi.sh.in
  6. +23 −10 iss.sh
  7. +0 −1 libffi.fs
  8. +4 −1 unix/pthread.fs
View
@@ -1097,7 +1097,7 @@ engine/config.h: stamp-h
stamp-h: engine/config.h.in config.status stamp-h.in
./config.status
-Makefile Makedist engine/Makefile gforthmi vmgen preforth machpc.fs doc/version.texi envos.fs build-ec: Makefile.in Makedist.in engine/Makefile.in gforthmi.in vmgen.in preforth.in libforth.in machpc.fs.in doc/version.texi.in config.status configure.in envos.fs.in build-ec.in engine/libcc.h.in
+Makefile Makedist engine/Makefile gforthmi vmgen preforth machpc.fs doc/version.texi envos.fs build-ec gforthmi.sh: Makefile.in Makedist.in engine/Makefile.in gforthmi.in vmgen.in preforth.in libforth.in machpc.fs.in doc/version.texi.in config.status configure.in envos.fs.in build-ec.in engine/libcc.h.in gforthmi.sh.in
./config.status
config.status: configure
View
@@ -20,12 +20,12 @@ dnl Process this file with autoconf to produce a configure script.
dnl We use some automake macros here,
dnl but don't use automake for creating Makefile.in
-AC_INIT([gforth],[0.7.9-20120730],[https://savannah.gnu.org/bugs/?func=addbug&group=gforth])
+AC_INIT([gforth],[0.7.9-20121007],[https://savannah.gnu.org/bugs/?func=addbug&group=gforth])
AC_PREREQ(2.54)
#snapshots have numbers major.minor.release-YYYYMMDD
#note that lexicographic ordering must be heeded.
#I.e., 0.4.1-YYYYMMDD must not exist before 0.4.1!
-UPDATED="July 30, 2012"
+UPDATED="October 7, 2012"
AC_SUBST(UPDATED)
AC_CONFIG_HEADERS(engine/config.h)
@@ -762,18 +762,8 @@ AC_SUBST(disasm_fs)
AC_PATH_PROG(INSTALL_INFO,install-info,[echo '>>>>Please make info dir entry:'],$PATH:/sbin:/usr/sbin:/usr/local/sbin)
case "$host_os" in
- *win32*)
- # !!!FIXME!!! problems with cygwin and ';' as path separator
- DIRSEP="\\\\"
- PATHSEP=";"
- #we want the builtins of command.com/cmd.exe and its
- # handling of .com files.
- #$COMSPEC contains the name of the Windows shell;
- # the ./ is there, because the bash does not recognize
- # absolute DOS filenames
- DEFAULTSYSTEMPREFIX="./$COMSPEC /c "
- ;;
*darwin*)
+ #dar*win* must be first, not to confuse with cygwin, win32 or similar
#Darwin uses some funny preprocessor by default; eliminate it:
AC_MSG_NOTICE([using -no-cpp-precomp on Darwin])
CFLAGS="$CFLAGS -no-cpp-precomp"
@@ -784,6 +774,17 @@ case "$host_os" in
#http://mail.python.org/pipermail/pythonmac-sig/2005-October/015190.html
AC_DEFINE_UNQUOTED(MACOSX_DEPLOYMENT_TARGET,"10.3",[an environment variable value needed by libtool on some MacOS X versions])
;;
+ *win*)
+ # !!!FIXME!!! problems with cygwin and ';' as path separator
+ DIRSEP="/" # normal dirsep
+ PATHSEP=":" # colon as pathsep
+ #we don't want the builtins of command.com/cmd.exe and its
+ # handling of .com files.
+ #$COMSPEC contains the name of the Windows shell;
+ # the ./ is there, because the bash does not recognize
+ # absolute DOS filenames
+ DEFAULTSYSTEMPREFIX="" #"./${COMSPEC//\\/\\\\\\\\} /c "
+ ;;
*linux*)
DIRSEP="/"
PATHSEP=":"
@@ -1062,6 +1063,7 @@ AC_CONFIG_FILES([
Makefile
Makedist
gforthmi
+gforthmi.sh
vmgen
machpc.fs
envos.fs
View
@@ -17,6 +17,9 @@
\ You should have received a copy of the GNU General Public License
\ along with this program. If not, see http://www.gnu.org/licenses/.
+[IFUNDEF] cell/ : cell/ 1 cells / ; [THEN]
+[IFUNDEF] float/ : float/ 1 floats / ; [THEN]
+
\ wordlist constant environment-wordlist
vocabulary environment ( -- ) \ gforth
View
@@ -17,7 +17,7 @@
\ You should have received a copy of the GNU General Public License
\ along with this program. If not, see http://www.gnu.org/licenses/.
-." Fixing " 1 arg type ." with " pad $1000 get-dir type cr
+." Fixing " 1 arg type ." with " pad $1000 get-dir type cr 200 ms
: "search s" .:/usr/local" ;
View
@@ -1,2 +1 @@
-#!/bin/bash
-GFORTHD="./gforth-ditc -p .:." GFORTH="./gforth-ditc --die-on-signal -p .:. -i kernl32l.fi exboot.fs startup.fs arch/386/asm.fs arch/386/disasm.fs" includedir=`pwd`/include bindir=`pwd` libccdir=`pwd`/lib/gforth/@PACKAGE_VERSION@/libcc-named/ ./sh.exe ./gforthmi gforth.fi --die-on-signal -p ".:~+:." -i kernl32l.fi exboot.fs startup.fs arch/386/asm.fs arch/386/disasm.fs
+GFORTHD="./gforth-ditc -p .@PATHSEP@." GFORTH="./gforth-ditc --die-on-signal -p .@PATHSEP@. -i kernl32l.fi exboot.fs startup.fs arch/386/asm.fs arch/386/disasm.fs" includedir="`pwd`"/include bindir="`pwd`" libccdir="`pwd`"/lib/gforth/@PACKAGE_VERSION@/libcc-named/ ./sh.exe ./gforthmi gforth.fi --die-on-signal -p ".@PATHSEP@~+@PATHSEP@." -i @kernel_fi@ exboot.fs startup.fs @asm_fs@ @disasm_fs@
View
33 iss.sh
@@ -27,8 +27,6 @@
VERSION=$(cat version)
-sed "s/@PACKAGE_VERSION@/$VERSION/g" <gforthmi.sh.in >gforthmi.sh
-
for i in lib/gforth/$VERSION/libcc-named/*.la
do
sed "s/dependency_libs='.*'/dependency_libs=''/g" <$i >$i+
@@ -114,28 +112,26 @@ Name: "{group}\Gforth"; Filename: "{app}\gforth.exe"; WorkingDir: "{app}"
Name: "{group}\Gforth-fast"; Filename: "{app}\gforth-fast.exe"; WorkingDir: "{app}"
Name: "{group}\Gforth-dict"; Filename: "{app}\gforth-dict.exe"; WorkingDir: "{app}"
Name: "{group}\Gforth-itc"; Filename: "{app}\gforth-itc.exe"; WorkingDir: "{app}"
-Name: "{group}\Gforth-prof"; Filename: "{app}\gforth-prof.exe"; WorkingDir: "{app}"
Name: "{group}\Gforth Manual"; Filename: "{app}\doc\gforth\index.html"; WorkingDir: "{app}"; Components: help
Name: "{group}\Gforth Manual (PDF)"; Filename: "{app}\doc\gforth.pdf"; WorkingDir: "{app}"; Components: help
Name: "{group}\VMgen Manual"; Filename: "{app}\doc\vmgen\index.html"; WorkingDir: "{app}"; Components: help
Name: "{group}\Bash"; Filename: "{app}\sh.exe"; WorkingDir: "{app}"
Name: "{group}\Uninstall Gforth"; Filename: "{uninstallexe}"
[Run]
-Filename: "{app}\gforth.exe"; WorkingDir: "{app}"; Parameters: "fixpath.fs gforth-fast.exe"
-Filename: "{app}\gforth.exe"; WorkingDir: "{app}"; Parameters: "fixpath.fs gforth-ditc.exe"
-Filename: "{app}\gforth.exe"; WorkingDir: "{app}"; Parameters: "fixpath.fs gforth-itc.exe"
-Filename: "{app}\gforth.exe"; WorkingDir: "{app}"; Parameters: "fixpath.fs gforth-prof.exe"
-Filename: "{app}\gforth-fast.exe"; WorkingDir: "{app}"; Parameters: "fixpath.fs gforth.exe"
-Filename: "{app}\sh.exe"; WorkingDir: "{app}"; Parameters: "./gforthmi.sh"
+Filename: "{app}\sh.exe"; WorkingDir: "{app}"; Parameters: "-c ""./gforthmi.sh || read"""
+Filename: "{app}\sh.exe"; WorkingDir: "{app}"; Parameters: "-c ""./gforth fixpath.fs gforth-fast.exe || read"""
+Filename: "{app}\sh.exe"; WorkingDir: "{app}"; Parameters: "-c ""./gforth fixpath.fs gforth-ditc.exe || read"""
+Filename: "{app}\sh.exe"; WorkingDir: "{app}"; Parameters: "-c ""./gforth fixpath.fs gforth-itc.exe || read"""
+Filename: "{app}\sh.exe"; WorkingDir: "{app}"; Parameters: "-c ""./gforth-fast fixpath.fs gforth.exe || read"""
[UninstallDelete]
Type: files; Name: "{app}\gforth.fi"
Type: files; Name: "{app}\temp-image.fi1"
Type: files; Name: "{app}\temp-image.fi2"
[Registry]
-Root: HKLM; Subkey: "SYSTEM\CurrentControlSet\Control\Session Manager\Environment"; ValueType: expandsz; ValueName: "Path"; ValueData: "{olddata};{app}"
+Root: HKLM; Subkey: "SYSTEM\CurrentControlSet\Control\Session Manager\Environment"; ValueType: expandsz; ValueName: "Path"; ValueData: "{olddata};{app}"; Check: NeedsAddPath(ExpandConstant('{app}'))
;[Registry]
;registry commented out
@@ -153,6 +149,23 @@ Root: HKLM; Subkey: "SYSTEM\CurrentControlSet\Control\Session Manager\Environmen
;HKCR, "forthblock"; STRING, "Forth Block",
;HKCR, "forthblock", "EditFlags", DWORD, "00000000",
;HKCR, "forthblock\DefaultIcon"; STRING, "{sys}\System32\shell32.dll,61"
+
+[Code]
+function NeedsAddPath(Param: string): boolean;
+var
+ OrigPath: string;
+begin
+ if not RegQueryStringValue(HKEY_LOCAL_MACHINE,'SYSTEM\CurrentControlSet\Control\Session Manager\Environment', 'Path', OrigPath)
+ then begin
+ Result := True;
+ exit;
+ end;
+ // look for the path with leading and trailing semicolon
+ // Pos() returns 0 if not found
+ Result := Pos(';' + UpperCase(Param) + ';', ';' + UpperCase(OrigPath) + ';') = 0;
+ if Result = True then
+ Result := Pos(';' + UpperCase(Param) + '\;', ';' + UpperCase(OrigPath) + ';') = 0;
+end;
EOT
sed -e 's/$/\r/' <README >README.txt
View
@@ -34,7 +34,6 @@ include-ffi.h-string save-c-prefix-line \ #include <ffi.h>
\c static void *(*saved_gforth_pointers)(Cell);
\c #endif
\c typedef void *Label;
-\c typedef Label *Xt;
\c static void gforth_callback_ffi(ffi_cif * cif, void * resp, void ** args, void * ip)
\c {
\c #ifndef HAS_BACKLINK
View
@@ -25,6 +25,9 @@ c-library pthread
\c #include <setjmp.h>
\c #include <stdio.h>
\c #include <signal.h>
+ \c #ifndef FIONREAD
+ \c #include <sys/socket.h>
+ \c #endif
\c #define wholepage(n) (((n)+pagesize-1)&~(pagesize-1))
\c
\c #ifndef HAS_BACKLINK
@@ -48,7 +51,7 @@ c-library pthread
\c gforth_FP=(Float*)(t->fp0);
\c gforth_LP=(void*)(t->lp0);
\c
- \c pthread_cleanup_push(&gforth_free_stacks, (void*)t);
+ \c pthread_cleanup_push(gforth_free_stacks, (void*)t);
\c
\c throw_jmp_handler = &throw_jmp_buf;
\c ((Cell*)(t->sp0))[-1]=(Cell)t;

0 comments on commit c7d4a4f

Please sign in to comment.