diff --git a/Makefile b/Makefile index 4303c731e7..b6114fb2f9 100644 --- a/Makefile +++ b/Makefile @@ -98,6 +98,12 @@ linux-ppc: LIBS="-ldl $(DEFAULT_LIBS)" $(STRIP) $(BINARY) +solaris solaris-x86: + $(MAKE) $(BINARY) \ + CFLAGS="$(DEFAULT_CFLAGS) -D_STDC_C99 -Drestrict=\"\" " \ + LIBS="-ldl -lsocket -lnsl $(DEFAULT_LIBS) -R/opt/PM/lib -R/opt/csw/lib -R/usr/local/lib -R/usr/sfw/lib -R/usr/X11R6/lib -R/opt/sfw/lib" + $(STRIP) $(BINARY) + windows: $(MAKE) $(BINARY) \ CFLAGS="$(DEFAULT_CFLAGS) -DFFI -DWIN32" \ diff --git a/README.txt b/README.txt index 36da3f79e9..c6fc2ba3ef 100644 --- a/README.txt +++ b/README.txt @@ -10,8 +10,9 @@ Factor is fully supported on the following platforms: Linux/x86 Linux/AMD64 - Microsoft Windows 2000 or later Mac OS X/PowerPC + Solaris/x86 + Microsoft Windows 2000 or later The following platforms should work, but are not tested on a regular basis: @@ -19,6 +20,7 @@ regular basis: FreeBSD/x86 FreeBSD/AMD64 Linux/PowerPC + Solaris/AMD64 Other platforms are not supported. @@ -38,6 +40,7 @@ parameters to build the Factor runtime: linux-ppc macosx macosx-sdl + solaris windows Note: If you wish to use the Factor UI on Mac OS X, you must build with diff --git a/examples/factorbot.factor b/examples/factorbot.factor index 9119112c86..e5f3684370 100644 --- a/examples/factorbot.factor +++ b/examples/factorbot.factor @@ -2,8 +2,8 @@ ! Load the HTTP server first (contrib/httpd/load.factor). -USING: errors generic hashtables html http io kernel math -namespaces parser prettyprint sequences strings words ; +USING: errors generic hashtables html http io kernel math memory +namespaces parser prettyprint sequences strings threads words ; IN: factorbot SYMBOL: irc-stream @@ -63,20 +63,16 @@ M: ping handle-irc ( line -- ) receiver get nickname get = speaker receiver ? get say ; : irc-loop ( -- ) - [ - irc-stream get stream-readln - [ dup print flush parse-irc irc-loop ] when* - ] [ - irc-stream get stream-close - ] cleanup ; + irc-stream get stream-readln + [ dup print flush parse-irc irc-loop ] when* ; : factorbot "irc.freenode.net" connect "factorbot" login "#concatenative" join - irc-loop ; + [ irc-loop ] [ irc-stream get stream-close ] cleanup ; -: factorbot-loop [ factorbot ] try factorbot-loop ; +: factorbot-loop [ factorbot ] try 30000 sleep factorbot-loop ; : multiline-respond ( string -- ) lines [ respond ] each ;