summaryrefslogtreecommitdiff
path: root/config
diff options
context:
space:
mode:
Diffstat (limited to 'config')
-rw-r--r--config/Makefile1
-rw-r--r--config/aix/rswitch.s52
-rw-r--r--config/bsd/alpha.s46
-rw-r--r--config/bsd/define.h4
-rw-r--r--config/bsd/i386.c23
-rw-r--r--config/bsd/m68k.c25
-rw-r--r--config/bsd/powerpc.s78
-rw-r--r--config/bsd/sparc.c33
-rw-r--r--config/bsd/status8
-rw-r--r--config/bsd/vax.c38
-rw-r--r--config/cygwin/Makedefs5
-rw-r--r--config/cygwin/define.h6
-rw-r--r--config/cygwin/status26
-rw-r--r--config/hpux/define.h1
-rw-r--r--config/hurd/define.h3
-rw-r--r--config/hurd/rswitch.c27
-rw-r--r--config/irix/define.h5
-rw-r--r--config/irix/rswitch.s76
-rw-r--r--config/irix/status2
-rw-r--r--config/linux/Makedefs2
-rw-r--r--config/linux/alpha.s46
-rw-r--r--config/linux/define.h3
-rw-r--r--config/linux/i686.s44
-rw-r--r--config/linux/parisc.s68
-rw-r--r--config/linux/sparc.c36
-rw-r--r--config/linux/status22
-rw-r--r--config/mac386/Makedefs21
-rw-r--r--config/mac386/define.h9
-rw-r--r--config/mac386/status34
-rw-r--r--config/macintosh/Makedefs6
-rw-r--r--config/macintosh/define.h3
-rw-r--r--config/macintosh/powerpc.s52
-rw-r--r--config/macintosh/status19
-rw-r--r--config/posix/Makedefs6
-rw-r--r--config/posix/define.h2
-rw-r--r--config/posix/status7
-rw-r--r--config/pthreads.c143
-rwxr-xr-xconfig/setup.sh52
-rw-r--r--config/solaris/Makedefs4
-rw-r--r--config/solaris/define.h4
-rw-r--r--config/solaris/i386.c71
-rw-r--r--config/solaris/sparc.c39
-rw-r--r--config/solaris/status10
-rw-r--r--config/solaris_sunc/Makedefs4
-rw-r--r--config/solaris_sunc/define.h3
-rw-r--r--config/solaris_sunc/sparc.c37
-rw-r--r--config/solaris_sunc/status9
-rw-r--r--config/tru64/define.h3
-rw-r--r--config/tru64/rswitch.s46
-rw-r--r--config/tru64/status2
-rw-r--r--config/xcygwin/Makedefs23
-rw-r--r--config/xcygwin/define.h16
-rw-r--r--config/xcygwin/status32
53 files changed, 194 insertions, 1143 deletions
diff --git a/config/Makefile b/config/Makefile
index 2b17cbd..4f95e8d 100644
--- a/config/Makefile
+++ b/config/Makefile
@@ -9,4 +9,3 @@ Clean:
Pure:
rm -f $(TOP)/Makedefs
rm -f $(SRC)/h/define.h
- rm -f $(SRC)/common/rswitch.[csS]
diff --git a/config/aix/rswitch.s b/config/aix/rswitch.s
deleted file mode 100644
index 45a1341..0000000
--- a/config/aix/rswitch.s
+++ /dev/null
@@ -1,52 +0,0 @@
-# coswitch(old, new, first)
-# GPR3 GPR4 GPR5
-
- .file "rswitch.s"
- .extern .new_context{PR}
- .extern .syserr{PR}
- .globl .coswitch[PR]
- .csect .coswitch[PR]
-
- .set r0, 0
- .set SP, 1
- .set TOC, 2
- .set OLD, 3
- .set NEW, 4
- .set FIRST, 5
- .set RSIZE, 80 # room for regs 13-31, rounded up mod16
-
-.coswitch:
- stu SP, -RSIZE(SP) # allocate stack frame
-
- # Save Old Context:
- st SP, 0(OLD) # SP
- st TOC, 4(OLD) # TOC
- mflr r0
- st r0, 8(OLD) # LR (return address)
- mfcr r0
- st r0, 12(OLD) # CR
- stm 13, -RSIZE(SP) # GPRs 13-31 (save on stack)
-
- cmpi 0, FIRST, 0
- beq first # if first time
-
- # Restore new context:
- l SP, 0(NEW) # SP
- l TOC, 4(NEW) # TOC
- l r0, 8(NEW) # LR
- mtlr r0
- l r0, 12(NEW) # CR
- mtcr r0
- lm 13, -RSIZE(SP) # GPRs 13-31 (from stack)
-
- ai SP, SP, RSIZE # deallocate stack frame
- brl # return into new context
-
-first: # First-time call:
- l SP, 0(NEW) # SP as figured by Icon
- ai SP, SP, -64(SP) # save area for callee
- cal OLD, 0(r0) # arg1
- cal NEW, 0(r0) # arg2
- bl .new_context{PR} # new_context(0,0)
- cal OLD, 0(r0)
- bl .syserr{PR}
diff --git a/config/bsd/alpha.s b/config/bsd/alpha.s
deleted file mode 100644
index 6c9ba72..0000000
--- a/config/bsd/alpha.s
+++ /dev/null
@@ -1,46 +0,0 @@
-/*
- * coswitch(old_cs, new_cs, first) for DEC Alpha architecture
- * $16 $17 $18
- */
- .data
-errmsg: .ascii "new_context() returned in coswitch\X00"
-
- .text
- .globl coswitch
- .ent coswitch
-coswitch:
- lda $sp, -72($sp) /* make room on stack */
- stq $sp, 0($16) /* save stack pointer */
- stq $9, 0($sp) /* save registers on stack */
- stq $10, 8($sp)
- stq $11, 16($sp)
- stq $12, 24($sp)
- stq $13, 32($sp)
- stq $14, 40($sp)
- stq $15, 48($sp)
- stq $27, 56($sp)
- stq $26, 64($sp) /* return address */
- beq $18, first /* if first time */
-
- ldq $sp, 0($17) /* load new stack pointer */
- ldq $9, 0($sp) /* load registers from stack */
- ldq $10, 8($sp)
- ldq $11, 16($sp)
- ldq $12, 24($sp)
- ldq $13, 32($sp)
- ldq $14, 40($sp)
- ldq $15, 48($sp)
- ldq $27, 56($sp)
- ldq $26, 64($sp) /* return address */
- lda $sp, 72($sp) /* reset sp */
- jsr_coroutine $31, ($26), 0 /* jump into new_context */
-
-first:
- ldq $sp, 0($17) /* load stack pointer only */
- bis $31, $31, $16 /* r16 = 0 */
- bis $31, $31, $17 /* r17 = 0 */
- jsr $26, new_context /* new_context(0,0) */
- lda $16, errmsg
- jsr $26, syserr /* shouldn't get here */
-
- .end coswitch
diff --git a/config/bsd/define.h b/config/bsd/define.h
index 1859df0..e1adb04 100644
--- a/config/bsd/define.h
+++ b/config/bsd/define.h
@@ -4,7 +4,3 @@
#define UNIX 1
#define LoadFunc
-
-#define CComp "gcc"
-#define COpts "-O -I/usr/X11R6/include"
-#define ICONC_XLIB "-Wl,-R/usr/X11R6/lib -L/usr/X11R6/lib -lX11"
diff --git a/config/bsd/i386.c b/config/bsd/i386.c
deleted file mode 100644
index 1eecd7c..0000000
--- a/config/bsd/i386.c
+++ /dev/null
@@ -1,23 +0,0 @@
-/*
- * coswitch for the i386 architecture
- */
-
-int
-coswitch (int *old_cs, int *new_cs, int first)
-{
- asm ("movl 8(%ebp),%eax");
- asm ("movl %esp,0(%eax)");
- asm ("movl %ebp,4(%eax)");
- asm ("movl 12(%ebp),%eax");
-
- if (first == 0) { /* this is the first activation */
- asm ("movl 0(%eax),%esp");
- asm ("movl $0,%ebp");
- new_context (0, 0);
- syserr ("new_context() returned in coswitch");
- }
- else {
- asm ("movl 0(%eax),%esp");
- asm ("movl 4(%eax),%ebp");
- }
-}
diff --git a/config/bsd/m68k.c b/config/bsd/m68k.c
deleted file mode 100644
index 077922b..0000000
--- a/config/bsd/m68k.c
+++ /dev/null
@@ -1,25 +0,0 @@
-/*
- * coswitch for the m68k architecture
- */
-
-int
-coswitch (int *old_cs, int *new_cs, int first)
-{
- asm ("movl %a6@(8),%a0"); /* a0 = old */
- asm ("movl %a6@(12),%a1"); /* a1 = new */
- asm ("movl %a7,%a0@"); /* save sp in cstate[0] */
- asm ("movl %a6,%a0@(4)"); /* save a6 (fp) in cstate[0] */
- asm ("moveml #0x3cfc,%a0@(8)"); /* store d2-d7, a2-a6 in old->cstate */
-
- if (first == 0) { /* this is first activation */
- asm ("movl %a1@,%a7");
- asm ("movl #0,%a6");
- new_context (0, 0);
- syserr ("new_context() returned in coswitch");
- }
- else {
- asm ("movl %a1@,%a7"); /* restore sp */
- asm ("movl %a1@(4),%a6"); /* restore fp */
- asm ("moveml %a1@(8),#0x3cfc"); /* restore d2-d7, a2-a6 */
- }
-}
diff --git a/config/bsd/powerpc.s b/config/bsd/powerpc.s
deleted file mode 100644
index 8044959..0000000
--- a/config/bsd/powerpc.s
+++ /dev/null
@@ -1,78 +0,0 @@
-#
-# coswitch for the PowerPC architecture
-#
-
- .file "rswitch.s"
-
- .data
-errmsg: .string "new_context() returned in coswitch\n"
-
- .text
- .align 2
- .globl coswitch
- .type coswitch,@function
-
-coswitch:
- stwu 1, -80(1) # allocate stack frame
-
- # Save Old Context:
- stw 1, 0(3) # SP
- mflr 0
- stw 0, 4(3) # LR (return address)
- stw 14, 0(1) # GPRs 14-31 (save on stack)
- stw 15, 4(1)
- stw 16, 8(1)
- stw 17, 12(1)
- stw 18, 16(1)
- stw 19, 20(1)
- stw 20, 24(1)
- stw 21, 28(1)
- stw 22, 32(1)
- stw 23, 36(1)
- stw 24, 40(1)
- stw 25, 44(1)
- stw 26, 48(1)
- stw 27, 52(1)
- stw 28, 56(1)
- stw 29, 60(1)
- stw 30, 64(1)
- stw 31, 68(1)
-
- cmpi 0, 5, 0
- beq first # if first time
-
- # Restore new context:
- lwz 1, 0(4) # SP
- lwz 0, 4(4) # LR
- mtlr 0
- lwz 14, 0(1) # GPRs 14-31 (from stack)
- lwz 15, 4(1)
- lwz 16, 8(1)
- lwz 17, 12(1)
- lwz 18, 16(1)
- lwz 19, 20(1)
- lwz 20, 24(1)
- lwz 21, 28(1)
- lwz 22, 32(1)
- lwz 23, 36(1)
- lwz 24, 40(1)
- lwz 25, 44(1)
- lwz 26, 48(1)
- lwz 27, 52(1)
- lwz 28, 56(1)
- lwz 29, 60(1)
- lwz 30, 64(1)
- lwz 31, 68(1)
-
- addic 1, 1, 80 # deallocate stack frame
- blr # return into new context
-
-first: # First-time call:
- lwz 1, 0(4) # SP as figured by Icon
- addic 1, 1, -64 # save area for callee
- addi 3, 0, 0 # arg1
- addi 4, 0, 0 # arg2
- bl new_context # new_context(0,0)
- lis 3, errmsg@ha
- la 3, errmsg@l(3)
- bl syserr
diff --git a/config/bsd/sparc.c b/config/bsd/sparc.c
deleted file mode 100644
index 4f2215c..0000000
--- a/config/bsd/sparc.c
+++ /dev/null
@@ -1,33 +0,0 @@
-/*
- * coswitch for the SPARC architecture
- */
-
-int
-coswitch (int *old_cs, int *new_cs, int first)
-{
- asm("ta 0x03"); /* ST_FLUSH_WINDOWS in trap.h */
- asm("ld [%fp+0x44], %o0"); /* load old_cs into %o0 */
- asm("st %sp,[%o0]"); /* Save user stack pointer */
- asm("st %fp,[%o0+0x4]"); /* Save frame pointer */
- asm("st %i7,[%o0+0x8]"); /* Save return address */
-
- if (first == 0) { /* this is the first activation */
- asm("ld [%fp+0x48], %o0"); /* load new_cs into %o0 */
- asm("ld [%o0], %o1"); /* load %o1 from cstate[0] */
-
- /* Decrement new stack pointer value before loading it into sp. */
- /* The top 64 bytes of the stack are reserved for the kernel, to */
- /* save the 8 local and 8 in registers into, on context switches, */
- /* interrupts, traps, etc. */
-
- asm("save %o1,-96, %sp"); /* load %sp from %o1 */
- new_context(0,0);
- syserr("new_context() returned in coswitch");
-
- } else {
- asm("ld [%fp+0x48], %o0"); /* load new_cs into %o0 */
- asm("ld [%o0+0x4],%fp"); /* Load frame pointer */
- asm("ld [%o0+0x8],%i7"); /* Load return address */
- asm("ld [%o0],%sp"); /* Load user stack pointer */
- }
-}
diff --git a/config/bsd/status b/config/bsd/status
index e0fba53..4179d1f 100644
--- a/config/bsd/status
+++ b/config/bsd/status
@@ -4,7 +4,7 @@ System configuration:
Latest Icon version:
- Version 9.4.3
+ Version 9.5.0
Installer:
@@ -25,10 +25,8 @@ Comments:
This configuration is for FreeBSD, NetBSD, and OpenBSD.
For Darwin (Apple Macintosh), use the "macintosh" configuration.
- This configuration can use pthreads for context switching.
-
- Tested on FreeBSD 6.0-beta5 (i386 and amd64).
+ Tested on OpenBSD 4.6.
Date:
- November 10, 2005
+ March 26, 2010
diff --git a/config/bsd/vax.c b/config/bsd/vax.c
deleted file mode 100644
index 52d30f9..0000000
--- a/config/bsd/vax.c
+++ /dev/null
@@ -1,38 +0,0 @@
-/*
- * coswitch for the VAX architecture
- */
-
-int
-coswitch (int *old_cs, int *new_cs, int first)
-{
- asm ("movl 4(%ap),%r0");
- asm ("movl 8(%ap),%r1");
- asm ("movl %sp,0(%r0)");
- asm ("movl %fp,4(%r0)");
- asm ("movl %ap,8(%r0)");
- asm ("movl %r11,16(%r0)");
- asm ("movl %r10,20(%r0)");
- asm ("movl %r9,24(%r0)");
- asm ("movl %r8,28(%r0)");
- asm ("movl %r7,32(%r0)");
- asm ("movl %r6,36(%r0)");
-
- if (first == 0) { /* this is the first activation */
- asm ("movl 0(%r1),%sp");
- asm ("clrl %fp");
- asm ("clrl %ap");
- new_context (0,0);
- syserr ("new_context() returned in coswitch");
- }
- else {
- asm ("movl 0(%r1),%sp");
- asm ("movl 4(%r1),%fp");
- asm ("movl 8(%r1),%ap");
- asm ("movl 16(%r1),%r11");
- asm ("movl 20(%r1),%r10");
- asm ("movl 24(%r1),%r9");
- asm ("movl 28(%r1),%r8");
- asm ("movl 32(%r1),%r7");
- asm ("movl 36(%r1),%r6");
- }
-}
diff --git a/config/cygwin/Makedefs b/config/cygwin/Makedefs
index 2ddf6fb..ce7103b 100644
--- a/config/cygwin/Makedefs
+++ b/config/cygwin/Makedefs
@@ -10,8 +10,9 @@
CC = gcc
CFLAGS = -O
-CFDYN = -fpic
-RLINK = -Wl,-E
+CFDYN =
+# make win32 import library for callbacks
+RLINK = -Wl,--export-all-symbols -Wl,--out-implib=iconx.a
RLIBS = -lm
TLIBS =
XLIBS = -luser32 -lgdi32 -lcomdlg32 -lwinmm
diff --git a/config/cygwin/define.h b/config/cygwin/define.h
index d2925a0..b9d823d 100644
--- a/config/cygwin/define.h
+++ b/config/cygwin/define.h
@@ -1,5 +1,5 @@
/*
- * Icon configuration file for Cygwin environment on Microsoft Windows
+ * Icon configuration file for Cygwin using Windows API for graphics
*/
#define MSWIN 1 /* this configuration is for Microsoft Windows */
#define CYGWIN 1 /* this configuration uses Cygwin API */
@@ -7,10 +7,10 @@
#define FAttrib /* enable fattrib() extension */
#define WinExtns /* enable native Windows functions */
-#define CComp "gcc"
+#define LoadFunc 1 /* enable dynamic loading */
#define ExecSuffix ".exe"
#define IcodeSuffix ".exe"
#define BinaryHeader
-#define MaxHdr 16384
+#define MaxHdr 16384
diff --git a/config/cygwin/status b/config/cygwin/status
index ad06c71..be9ca79 100644
--- a/config/cygwin/status
+++ b/config/cygwin/status
@@ -1,39 +1,33 @@
System configuration:
- The Cygwin Unix environment running on Microsoft Windows NT
+ Cygwin on Windows XP using the Windows graphics API
Latest Icon version:
- Version 9.4.3
+ Version 9.5.0
Installer:
- Gregg Townsend
- Icon Project
- The University of Arizona
- (with thanks to Frank J. Lhota)
+ Carl Sturtivant
+ University of Minnesota
Missing features:
- Dynamic loading (loadfunc)
+ None
Known bugs:
- Some tests (typically io, tpp, and opts) fail due to Unix
- dependencies.
+ The "options" test fails due to Unix dependencies.
- There are many rough edges in the graphics area, which has
- not been well tested.
+ There are still some rough edges in the graphics area.
Comments:
See the special Cygwin page in the documentation directory.
- This configuration now uses POSIX threads for context switching;
- the former "rswitch.c" code failed in the latest test environment.
-
- Tested with GCC 3.4.4 on Cygwin 1.5.18.
+ This version includes MS Windows extensions retained for
+ backward compatibility.
Date:
- November 4, 2005
+ June 4, 2008
diff --git a/config/hpux/define.h b/config/hpux/define.h
index d6fa049..d99c258 100644
--- a/config/hpux/define.h
+++ b/config/hpux/define.h
@@ -3,5 +3,4 @@
*/
#define UNIX 1
-#define CStateSize 20
#define StackSize 10000
diff --git a/config/hurd/define.h b/config/hurd/define.h
index 5bbb3e0..1a81c6c 100644
--- a/config/hurd/define.h
+++ b/config/hurd/define.h
@@ -4,6 +4,3 @@
#define UNIX 1
#define LoadFunc
-
-#define CComp "gcc"
-#define COpts "-O -fomit-frame-pointer"
diff --git a/config/hurd/rswitch.c b/config/hurd/rswitch.c
deleted file mode 100644
index 4a9def0..0000000
--- a/config/hurd/rswitch.c
+++ /dev/null
@@ -1,27 +0,0 @@
-/*
- * This is the co-expression context switch for the GNU system.
- */
-
-/*
- * coswitch
- */
-
-coswitch(old_cs, new_cs, first)
-int *old_cs, *new_cs;
-int first;
- {
- asm(" movl 8(%ebp),%eax");
- asm(" movl %esp,0(%eax)");
- asm(" movl %ebp,4(%eax)");
- asm(" movl 12(%ebp),%eax");
- if (first == 0) { /* this is the first activation */
- asm(" movl 0(%eax),%esp");
- asm(" movl $0,%ebp");
- new_context(0, 0);
- syserr("interp() returned in coswitch");
- }
- else {
- asm(" movl 0(%eax),%esp");
- asm(" movl 4(%eax),%ebp");
- }
- }
diff --git a/config/irix/define.h b/config/irix/define.h
index 9704a1f..68ad567 100644
--- a/config/irix/define.h
+++ b/config/irix/define.h
@@ -5,9 +5,4 @@
#define UNIX 1
#define LoadFunc
-#define CStateSize 32 /* anything >= 26 should actually do */
-
-#define CComp "c89"
-#define COpts "-Wf,-XNd10000"
-
#define GammaCorrection 1.0 /* for old X11R5 systems */
diff --git a/config/irix/rswitch.s b/config/irix/rswitch.s
deleted file mode 100644
index e820e3d..0000000
--- a/config/irix/rswitch.s
+++ /dev/null
@@ -1,76 +0,0 @@
- .data
- .align 0
-$$8:
- .ascii "new_context() returned in coswitch\X00"
- .text
- .align 2
- .globl coswitch
- # coswitch(old_cs,new_cs,first)
- # int *old_cs,*new_cs;
- # int first;
- # {
- .ent coswitch
-coswitch:
- # standard entry code, including decrement of sp
- subu $sp, 32
- sw $31, 20($sp)
- .mask 0x80000000, -4
- .frame $sp, 32, $31
- # save (decremented) sp and other registers in old_cs
- sw $sp, 0($4)
- sw $31, 4($4)
- sd $16, 8($4)
- sd $18, 16($4)
- sd $20, 24($4)
- sd $22, 32($4)
- s.d $f20,40($4)
- s.d $f22,48($4)
- s.d $f24,56($4)
- s.d $f26,64($4)
- s.d $f28,72($4)
- s.d $f30,80($4)
- sw $gp,88($4)
- sw $fp,96($4)
- # if first = 0, this is first activation
- bne $6, 0, $33
- # load sp from new_cs[0] (ignore other registers)
- lw $sp, 0($5)
- # Decrement sp by the size of the stackframe.
- # Store decremented sp in new_cs. Then call new_context().
- subu $sp, 32
- sw $sp, 0($5)
- # new_context(0,0);
- move $4, $0
- move $5, $0
- jal new_context
- # syserr("new_context() returned in coswitch");
- la $4, $$8
- jal syserr
- # if we're in control now, something is really wrong, so go into
- # a tight loop until someone notices...
-$32:
- b $32
-$33:
- # here for not first activation
- # load sp and other registers from new_cs
- lw $sp, 0($5)
- lw $31, 4($5)
- # (could compare $31 with 20($sp) as a consistency check now)
- ld $16, 8($5)
- ld $18, 16($5)
- ld $20, 24($5)
- ld $22, 32($5)
- l.d $f20,40($5)
- l.d $f22,48($5)
- l.d $f24,56($5)
- l.d $f26,64($5)
- l.d $f28,72($5)
- l.d $f30,80($5)
- lw $gp,88($5)
- lw $fp,96($5)
- # increment sp as for normal return
- addu $sp, 32
- # return
- j $31
- # }
- .end coswitch
diff --git a/config/irix/status b/config/irix/status
index 58fc639..70b0948 100644
--- a/config/irix/status
+++ b/config/irix/status
@@ -24,8 +24,6 @@ Comments:
Tested on Silicon Graphics Indigo2 IMPACT running IRIX 6.5.7f.
- This configuration can use pthreads for context switching.
-
Date:
March 26, 2003
diff --git a/config/linux/Makedefs b/config/linux/Makedefs
index da053aa..613b74d 100644
--- a/config/linux/Makedefs
+++ b/config/linux/Makedefs
@@ -14,6 +14,6 @@ CFDYN = -fPIC
RLINK = -Wl,-E
RLIBS = -lm -ldl
TLIBS = -lpthread
-XLIBS = -L/usr/X11R6/lib64 -L/usr/X11R6/lib -lX11
+XLIBS = -lX11
XPMDEFS = -DZPIPE
GDIR = xpm
diff --git a/config/linux/alpha.s b/config/linux/alpha.s
deleted file mode 100644
index a4589d4..0000000
--- a/config/linux/alpha.s
+++ /dev/null
@@ -1,46 +0,0 @@
-/*
- * coswitch(old_cs, new_cs, first) for Dec Alpha architecture
- * $16 $17 $18
- */
- .data
-errmsg: .ascii "new_context() returned in coswitch\X00"
-
- .text
- .globl coswitch
- .ent coswitch
-coswitch:
- lda $sp, -72($sp) /* make room on stack */
- stq $sp, 0($16) /* save stack pointer */
- stq $9, 0($sp) /* save registers on stack */
- stq $10, 8($sp)
- stq $11, 16($sp)
- stq $12, 24($sp)
- stq $13, 32($sp)
- stq $14, 40($sp)
- stq $15, 48($sp)
- stq $27, 56($sp)
- stq $26, 64($sp) /* return address */
- beq $18, first /* if first time */
-
- ldq $sp, 0($17) /* load new stack pointer */
- ldq $9, 0($sp) /* load registers from stack */
- ldq $10, 8($sp)
- ldq $11, 16($sp)
- ldq $12, 24($sp)
- ldq $13, 32($sp)
- ldq $14, 40($sp)
- ldq $15, 48($sp)
- ldq $27, 56($sp)
- ldq $26, 64($sp) /* return address */
- lda $sp, 72($sp) /* reset sp */
- jsr_coroutine $31, ($26), 0 /* jump into new_context */
-
-first:
- ldq $sp, 0($17) /* load stack pointer only */
- bis $31, $31, $16 /* r16 = 0 */
- bis $31, $31, $17 /* r17 = 0 */
- jsr $26, new_context /* new_context(0,0) */
- lda $16, errmsg
- jsr $26, syserr /* shouldn't get here */
-
- .end coswitch
diff --git a/config/linux/define.h b/config/linux/define.h
index 834bb2b..982d3c5 100644
--- a/config/linux/define.h
+++ b/config/linux/define.h
@@ -4,6 +4,3 @@
#define UNIX 1
#define LoadFunc
-
-#define CComp "gcc"
-#define COpts "-O -fomit-frame-pointer"
diff --git a/config/linux/i686.s b/config/linux/i686.s
deleted file mode 100644
index 2e7117e..0000000
--- a/config/linux/i686.s
+++ /dev/null
@@ -1,44 +0,0 @@
-#
-# Assembler source for context switch using gas 1.38.1 + gcc 1.40 on
-# Xenix/386, revamped slightly for use with Linux by me (Richard Goer-
-# witz) on 7/25/94.
-#
-
-.file "rswitch.s"
-.data 1
-.LC0:
- .byte 0x6e,0x65,0x77,0x5f,0x63,0x6f,0x6e,0x74,0x65,0x78
- .byte 0x74,0x28,0x29,0x20,0x72,0x65,0x74,0x75,0x72,0x6e
- .byte 0x65,0x64,0x20,0x69,0x6e,0x20,0x63,0x6f,0x73,0x77
- .byte 0x69,0x74,0x63,0x68,0x0
-.text
- .align 4
-.globl coswitch
-
-
-coswitch:
- pushl %ebp
- movl %esp,%ebp
- movl 8(%ebp),%eax
- movl %esp,0(%eax)
- movl %ebp,4(%eax)
- movl 12(%ebp),%eax
- cmpl $0,16(%ebp)
- movl 0(%eax),%esp
- je .L2
-
- movl 4(%eax),%ebp
- jmp .L1
-
-.L2:
- movl $0,%ebp
- pushl $0
- pushl $0
- call new_context
- pushl $.LC0
- call syserr
- addl $12,%esp
-
-.L1:
- leave
- ret
diff --git a/config/linux/parisc.s b/config/linux/parisc.s
deleted file mode 100644
index 88d9366..0000000
--- a/config/linux/parisc.s
+++ /dev/null
@@ -1,68 +0,0 @@
-; coexpression code for HP PA-RISC architecture for Icon 8.10
-;
-; n.b. two of the three coexpression tests work, but coexpression
-; *transmission*, a rarely used feature, does not
-
- .CODE
- .IMPORT syserr
- .EXPORT coswitch
-coswitch
- .PROC
- .CALLINFO
- .ENTRY
- ; store old registers
- STW %sp,0(%arg0)
- ; not used: 4(%arg0)
- STW %rp,8(%arg0)
- STW %r3,12(%arg0)
- STW %r4,16(%arg0)
- STW %r5,20(%arg0)
- STW %r6,24(%arg0)
- STW %r7,28(%arg0)
- STW %r8,32(%arg0)
- STW %r9,36(%arg0)
- STW %r10,40(%arg0)
- STW %r11,44(%arg0)
- STW %r12,48(%arg0)
- STW %r13,52(%arg0)
- STW %r14,56(%arg0)
- STW %r15,60(%arg0)
- STW %r16,64(%arg0)
- STW %r17,68(%arg0)
- STW %r18,72(%arg0)
-
- COMIB,=,N 0,%arg2,L$isfirst
-
- ; this is not a first-time call; reload old context
- LDW 0(%arg1),%sp
- LDW 8(%arg1),%rp
- LDW 12(%arg1),%r3
- LDW 16(%arg1),%r4
- LDW 20(%arg1),%r5
- LDW 24(%arg1),%r6
- LDW 28(%arg1),%r7
- LDW 32(%arg1),%r8
- LDW 36(%arg1),%r9
- LDW 40(%arg1),%r10
- LDW 44(%arg1),%r11
- LDW 48(%arg1),%r12
- LDW 52(%arg1),%r13
- LDW 56(%arg1),%r14
- LDW 60(%arg1),%r15
- LDW 64(%arg1),%r16
- LDW 68(%arg1),%r17
- LDW 72(%arg1),%r18
- BV,N (%rp) ; return
-
-L$isfirst
- LDW 0(%arg1),%sp
- LDI 0,%arg0
- LDI 0,%arg1
- .CALL ARGW0=GR,ARGW1=GR
- BL,N new_context,%rp ; call new_context(0,0)
- SUBI 1,%r0,%rp
- BV,N (%rp) ; abort w/ illegal jump
- .EXIT
- .PROCEND
- .IMPORT new_context,CODE
- .END
diff --git a/config/linux/sparc.c b/config/linux/sparc.c
deleted file mode 100644
index 743bb02..0000000
--- a/config/linux/sparc.c
+++ /dev/null
@@ -1,36 +0,0 @@
-/*
- * coswitch for Sun-4 Sparc.
- *
- * Compile this with 'gcc -c rswitch.c'. Do not use gcc -O.
- */
-
-int coswitch(old_cs, new_cs, first)
-int *old_cs, *new_cs;
-int first;
-{
- asm("ta 0x03"); /* ST_FLUSH_WINDOWS in trap.h */
- asm("ld [%fp+0x44], %o0"); /* load old_cs into %o0 */
- asm("st %sp,[%o0]"); /* Save user stack pointer */
- asm("st %fp,[%o0+0x4]"); /* Save frame pointer */
- asm("st %i7,[%o0+0x8]"); /* Save return address */
-
- if (first == 0) { /* this is the first activation */
- asm("ld [%fp+0x48], %o0"); /* load new_cs into %o0 */
- asm("ld [%o0], %o1"); /* load %o1 from cstate[0] */
-
- /* Decrement new stack pointer value before loading it into sp. */
- /* The top 64 bytes of the stack are reserved for the kernel, to */
- /* save the 8 local and 8 in registers into, on context switches, */
- /* interrupts, traps, etc. */
-
- asm("save %o1,-96, %sp"); /* load %sp from %o1 */
- new_context(0,0);
- syserr("new_context() returned in coswitch");
-
- } else {
- asm("ld [%fp+0x48], %o0"); /* load new_cs into %o0 */
- asm("ld [%o0+0x4],%fp"); /* Load frame pointer */
- asm("ld [%o0+0x8],%i7"); /* Load return address */
- asm("ld [%o0],%sp"); /* Load user stack pointer */
- }
-}
diff --git a/config/linux/status b/config/linux/status
index 499c0fa..497be73 100644
--- a/config/linux/status
+++ b/config/linux/status
@@ -4,7 +4,7 @@ System configuration:
Latest Icon version:
- Version 9.4.3
+ Version 9.5.0
Installer:
@@ -12,30 +12,22 @@ Installer:
Icon Project
The University of Arizona
- with special thanks to Christian Hudon for additional testing
-
Missing features:
None
Known bugs:
- None on x86, amd64, Alpha, SPARC, ARM, s390, or m68k.
-
- On PowerPC: Large integers don't work; the cause is unknown.
-
- On HP PA-RISC architecture: Icon is not functional. For
- reasons that are not understood, real (floating-point)
- values do not work.
+ None
Comments:
- Tested on x86 and amd64 architectures under Red Hat 9,
- Fedora 3, and Fedora 4.
+ Tested on various x86 and x64 systems running Fedora 9,
+ Ubuntu 9.04 and 9.10, and Debian Squeeze.
- This configuration can use pthreads for context switching.
- On some architectures that is the only option.
+ Ubuntu may require package installation in order to build:
+ $ sudo apt-get install build-essential libx11-dev libxt-dev libxaw7-dev
Date:
- November 8, 2005
+ April 5, 2010
diff --git a/config/mac386/Makedefs b/config/mac386/Makedefs
new file mode 100644
index 0000000..35f3984
--- /dev/null
+++ b/config/mac386/Makedefs
@@ -0,0 +1,21 @@
+# CC C compiler
+# CFLAGS flags for building C files
+# CFDYN additional flags for dynamic functions
+# RLINK flags for linking run-time system
+# RLIBS libraries to link with run-time system
+# TLIBS libraries to link for POSIX threads
+# XLIBS libraries to link for graphics
+# XPMDEFS definitions for building XPM library
+# GDIR directory of graphics helper library
+# SFLAGS flags for stripping iconx
+
+CC = cc -arch i386
+CFLAGS =
+CFDYN =
+RLINK = -dynamic
+RLIBS = -lm
+TLIBS =
+XLIBS = -L/usr/X11/lib -lX11
+XPMDEFS = -DZPIPE
+GDIR = xpm
+SFLAGS = -Sx
diff --git a/config/mac386/define.h b/config/mac386/define.h
new file mode 100644
index 0000000..bf2a07e
--- /dev/null
+++ b/config/mac386/define.h
@@ -0,0 +1,9 @@
+/*
+ * Icon configuration file for Macintosh
+ */
+
+#define UNIX 1
+#define MACINTOSH 1
+#define LoadFunc
+
+#define NamedSemaphores /* unnamed sempahores not implemented by OS 10.6 */
diff --git a/config/mac386/status b/config/mac386/status
new file mode 100644
index 0000000..3d1cfef
--- /dev/null
+++ b/config/mac386/status
@@ -0,0 +1,34 @@
+System configuration:
+
+ 32-bit variant configuration for Intel-based Apple Macintosh.
+
+Latest Icon version:
+
+ Version 9.5.0
+
+Installer:
+
+ Gregg Townsend
+ Icon Project
+ The University of Arizona
+
+Missing features:
+
+ None
+
+Known bugs:
+
+ None
+
+Comments:
+
+ This configuration forces a 32-bit build of Icon on a 64-bit
+ Intel-based Macintosh computer. This is normally not needed and
+ the standard "macintosh" configuration should be used instead.
+
+ Tested with MacOS 10.6.2 (Snow Leopard),
+ using Xcode 3.2.1 and GCC 4.2.1.
+
+Date:
+
+ March 26, 2010
diff --git a/config/macintosh/Makedefs b/config/macintosh/Makedefs
index 381b077..c8af32b 100644
--- a/config/macintosh/Makedefs
+++ b/config/macintosh/Makedefs
@@ -10,12 +10,12 @@
# SFLAGS flags for stripping iconx
CC = cc
-CFLAGS = -I/usr/X11R6/include
+CFLAGS =
CFDYN =
RLINK = -dynamic
RLIBS = -lm
TLIBS =
-XLIBS = -L/usr/X11R6/lib -lX11
-XPMDEFS = -DZPIPE -I/usr/X11R6/include
+XLIBS = -L/usr/X11/lib -lX11
+XPMDEFS = -DZPIPE
GDIR = xpm
SFLAGS = -Sx
diff --git a/config/macintosh/define.h b/config/macintosh/define.h
index e1857dd..bf2a07e 100644
--- a/config/macintosh/define.h
+++ b/config/macintosh/define.h
@@ -3,6 +3,7 @@
*/
#define UNIX 1
+#define MACINTOSH 1
#define LoadFunc
-#define NamedSemaphores /* unnamed sempahores not implemented by OS 10.4 */
+#define NamedSemaphores /* unnamed sempahores not implemented by OS 10.6 */
diff --git a/config/macintosh/powerpc.s b/config/macintosh/powerpc.s
deleted file mode 100644
index 71724a6..0000000
--- a/config/macintosh/powerpc.s
+++ /dev/null
@@ -1,52 +0,0 @@
-# coswitch(old, new, first)
-# GPR3 GPR4 GPR5
-
-# This code is modeled after the ppc_aix context switch
-# it was compared to the Darwin context switch routine to
-# get the syntax correct for the Apple gcc compiler.
-.macro ENTRY
- .text
- .align 2
- .globl $0
-$0:
-.endmacro
-
- .file "rswitch.s"
- .set RSIZE, 80 ; room for regs 13-31, rounded up mod16
-
- ENTRY _coswitch
-
- stwu r1, -RSIZE(r1) ; allocate stack frame
-
- ; Save Old Context:
- stw r1, 0(r3) ; SP
- stw r2, 4(r3) ; TOC
- mflr r0
- stw r0, 8(r3) ; LR (return address)
- mfcr r0
- stw r0, 12(r3) ; CR
- stmw r13, -RSIZE(r1) ; GPRs 13-31 (save on stack)
-
- cmpi 0, r5, 0
- beq first ; if first time
-
- ; Restore new context:
- lwz r1, 0(r4) ; SP
- lwz r2, 4(r4) ; TOC
- lwz r0, 8(r4) ; LR
- mtlr r0
- lwz r0, 12(r4) ; CR
- mtcr r0
- lmw r13, -RSIZE(r1) ; GPRs 13-31 (from stack)
-
- addic r1, r1, RSIZE ; deallocate stack frame
- blr ; return into new context
-
-first: ; First-time call:
- lwz r1, 0(r4) ; SP as figured by Icon
- addic r1, r1, -64 ; save area for callee
- addi r3, 0, 0 ; arg1
- addi r4, 0, 0 ; arg2
- bl _new_context ; new_context(0,0)
- addi r3, 0, 0
- bl _syserr
diff --git a/config/macintosh/status b/config/macintosh/status
index 43dffac..a49aecc 100644
--- a/config/macintosh/status
+++ b/config/macintosh/status
@@ -1,10 +1,10 @@
System configuration:
- Apple Macintosh running OS X (10.1 or newer)
+ Apple Macintosh running MacOS X
Latest Icon version:
- Version 9.4.3
+ Version 9.5.0
Installer:
@@ -26,18 +26,11 @@ Comments:
Icon runs on Darwin, which is (loosely speaking) the
command-line-based Unix substructure of MacOS X. The
- Xcode Developer Tools must be installed. (These come
- with MacOS on a CD that is not always installed.)
+ Xcode Developer Tools must be installed to build Icon.
- An Icon installation with graphics requires the X11 window
- system, available from Apple but not always installed.
- To install Icon without graphics, use "make Configure"
- instead of "make X-Configure" when building.
-
- This configuration can use pthreads for context switching.
-
- Tested with MacOS 10.4.3 (Tiger).
+ Tested with MacOS 10.6.3 (Snow Leopard),
+ using Xcode 3.2.1 and GCC 4.2.1.
Date:
- November 10, 2005
+ March 29, 2010
diff --git a/config/posix/Makedefs b/config/posix/Makedefs
index 9959341..391a154 100644
--- a/config/posix/Makedefs
+++ b/config/posix/Makedefs
@@ -9,11 +9,11 @@
# GDIR directory of graphics helper library
CC = cc
-CFLAGS = -O -I/usr/X11R6/include
+CFLAGS = -O
CFDYN =
RLINK =
RLIBS = -lm
TLIBS = -lpthread
-XLIBS = -L/usr/X11R6/lib -lX11
-XPMDEFS = -DZPIPE -I/usr/X11R6/include
+XLIBS = -L/usr/X11/lib -lX11
+XPMDEFS = -DZPIPE
GDIR = xpm
diff --git a/config/posix/define.h b/config/posix/define.h
index e2d54c5..7f22c1d 100644
--- a/config/posix/define.h
+++ b/config/posix/define.h
@@ -3,5 +3,5 @@
*/
#define UNIX 1
-/* LoadFunc not implemented */
+#define LoadFunc
diff --git a/config/posix/status b/config/posix/status
index 66ee6b3..756fb94 100644
--- a/config/posix/status
+++ b/config/posix/status
@@ -4,7 +4,7 @@ System configuration:
Latest Icon version:
- Version 9.4.3
+ Version 9.5.0
Installer:
@@ -14,11 +14,12 @@ Installer:
Missing features:
- Dynamic loading (loadfunc)
+ None
Known bugs:
May need some tweaking of Makedefs for any particular system.
+ The file ipl/cfuncs/mklib.sh will probably also need editing.
Comments:
@@ -26,4 +27,4 @@ Comments:
Date:
- November 8, 2005
+ October 28, 2009
diff --git a/config/pthreads.c b/config/pthreads.c
deleted file mode 100644
index 1ebf7c7..0000000
--- a/config/pthreads.c
+++ /dev/null
@@ -1,143 +0,0 @@
-/*
- * pthreads.c -- Icon context switch code using POSIX threads and semaphores
- *
- * This code implements co-expression context switching on any system that
- * provides POSIX threads and semaphores. It requires Icon 9.4.1 or later
- * built with "#define CoClean" in order to free threads and semaphores when
- * co-expressions are collected. It is typically much slower when called
- * than platform-specific custom code, but of course it is much more portable,
- * and it is typically used infrequently.
- *
- * Unnamed semaphores are used unless NamedSemaphores is defined.
- * (This is for Mac OS 10.3 which does not have unnamed semaphores.)
- */
-
-#include <fcntl.h>
-#include <pthread.h>
-#include <semaphore.h>
-#include <stdio.h>
-#include <stdlib.h>
-#include <unistd.h>
-#include <sys/stat.h>
-
-#include "../h/define.h"
-
-extern void new_context(int, void *);
-extern void syserr(char *msg);
-extern void *alloc(unsigned int n);
-
-static int inited = 0; /* has first-time initialization been done? */
-
-/*
- * Define a "context" struct to hold the thread information we need.
- */
-typedef struct {
- pthread_t thread; /* thread ID (thread handle) */
- sem_t sema; /* synchronization semaphore (if unnamed) */
- sem_t *semp; /* pointer to semaphore */
- int alive; /* set zero when thread is to die */
- } context;
-
-static void makesem(context *ctx);
-static void *nctramp(void *arg);
-
-/*
- * Treat an Icon "cstate" array as an array of context pointers.
- * cstate[0] is used by Icon code that thinks it's setting a stack pointer.
- * We use cstate[1] to point to the actual context struct.
- * (Both of these are initialized to NULL by Icon 9.4.1 or later.)
- */
-typedef context **cstate;
-
-/*
- * coswitch(old, new, first) -- switch contexts.
- */
-int coswitch(void *o, void *n, int first) {
-
- cstate ocs = o; /* old cstate pointer */
- cstate ncs = n; /* new cstate pointer */
- context *old, *new; /* old and new context pointers */
-
- if (inited) /* if not first call */
- old = ocs[1]; /* load current context pointer */
- else {
- /*
- * This is the first coswitch() call.
- * Allocate and initialize the context struct for &main.
- */
- old = ocs[1] = alloc(sizeof(context));
- makesem(old);
- old->thread = pthread_self();
- old->alive = 1;
- inited = 1;
- }
-
- if (first != 0) /* if not first call for this cstate */
- new = ncs[1]; /* load new context pointer */
- else {
- /*
- * This is a newly allocated cstate array.
- * Allocate and initialize a context struct.
- */
- new = ncs[1] = alloc(sizeof(context));
- makesem(new);
- if (pthread_create(&new->thread, NULL, nctramp, new) != 0)
- syserr("cannot create thread");
- new->alive = 1;
- }
-
- sem_post(new->semp); /* unblock the new thread */
- sem_wait(old->semp); /* block this thread */
-
- if (!old->alive)
- pthread_exit(NULL); /* if unblocked because unwanted */
- return 0; /* else return to continue running */
- }
-
-/*
- * coclean(old) -- clean up co-expression state before freeing.
- */
-void coclean(void *o) {
- cstate ocs = o; /* old cstate pointer */
- context *old = ocs[1]; /* old context pointer */
- if (old == NULL) /* if never initialized, do nothing */
- return;
- old->alive = 0; /* signal thread to exit */
- sem_post(old->semp); /* unblock it */
- pthread_join(old->thread, NULL); /* wait for thread to exit */
- #ifdef NamedSemaphores
- sem_close(old->semp); /* close associated semaphore */
- #else
- sem_destroy(old->semp); /* destroy associated semaphore */
- #endif
- free(old); /* free context block */
- }
-
-/*
- * makesem(ctx) -- initialize semaphore in context struct.
- */
-static void makesem(context *ctx) {
- #ifdef NamedSemaphores /* if cannot use unnamed semaphores */
- char name[50];
- sprintf(name, "i%ld.sem", (long)getpid());
- ctx->semp = sem_open(name, O_CREAT, S_IRUSR | S_IWUSR, 0);
- if (ctx->semp == (sem_t *)SEM_FAILED)
- syserr("cannot create semaphore");
- sem_unlink(name);
- #else /* NamedSemaphores */
- if (sem_init(&ctx->sema, 0, 0) == -1)
- syserr("cannot init semaphore");
- ctx->semp = &ctx->sema;
- #endif /* NamedSemaphores */
- }
-
-/*
- * nctramp() -- trampoline for calling new_context(0,0).
- */
-static void *nctramp(void *arg) {
- context *new = arg; /* new context pointer */
- sem_wait(new->semp); /* wait for signal */
- new_context(0, 0); /* call new_context; will not return */
- syserr("new_context returned to nctramp");
- return NULL;
- }
diff --git a/config/setup.sh b/config/setup.sh
index 90c735d..e015b87 100755
--- a/config/setup.sh
+++ b/config/setup.sh
@@ -2,11 +2,10 @@
#
# setup.sh -- invoked by top-level Makefile
-USAGE="usage: setup.sh configname [No]Graphics [pthreads]"
+USAGE="usage: setup.sh configname [No]Graphics"
NAME=$1
GPX=$2
-CSW=$3
TOP=..
SRC=$TOP/src
@@ -16,11 +15,6 @@ case "$GPX" in
NoGraphics) XL= ;;
*) echo "$USAGE" 1>&2; exit 1;;
esac
-case "$CSW" in
- custom | "") ;;
- pthreads) ;;
- *) echo "$USAGE" 1>&2; exit 1;;
-esac
# check that configuration exists
if [ ! -d "$NAME" ]; then
@@ -28,47 +22,9 @@ if [ ! -d "$NAME" ]; then
exit 1
fi
-# find and copy the context switch code.
-# use pthreads version if specified, or as a last resort.
-# first try `uname -p`.[cs] or `uname -m`.[cs] and then rswitch.[cs].
-ARCH=`uname -p 2>/dev/null || echo unknown`
-if [ "$ARCH" = "unknown" ]; then
- ARCH=`uname -m`
-fi
-if [ "$CSW" = "pthreads" ]; then
- RSW=pthreads.c
- COCLEAN="#define CoClean"
-elif [ -f "$NAME/$ARCH.c" ]; then
- RSW="$NAME/$ARCH.c"
- COCLEAN=
-elif [ -f "$NAME/$ARCH.s" ]; then
- RSW="$NAME/$ARCH.s"
- COCLEAN=
-elif [ -f $NAME/rswitch.[cs] ]; then
- RSW=`echo $NAME/rswitch.[cs]`
- COCLEAN=
-else
- RSW=pthreads.c
- COCLEAN="#define CoClean"
-fi
-case $RSW in
- *.c) DRSW=rswitch.c;;
- *.s) DRSW=rswitch.s;;
-esac
-cp $RSW $SRC/common/$DRSW
-
-if [ "$RSW" = "pthreads.c" ]; then
- TL='$(TLIBS)'
-else
- TL=
-fi
-
-RSN=`echo $RSW | sed 's=.*/=='`
-
# build the "define.h" file
-echo "#define Config \"$NAME, $RSN\"" > $SRC/h/define.h
+echo "#define Config \"$NAME\"" > $SRC/h/define.h
echo "#define $GPX 1" >> $SRC/h/define.h
-echo "$COCLEAN" >> $SRC/h/define.h
echo "" >> $SRC/h/define.h
cat $NAME/define.h >> $SRC/h/define.h
@@ -77,16 +33,12 @@ echo "# from config/$NAME" > $TOP/Makedefs
echo "" >> $TOP/Makedefs
cat $NAME/Makedefs >> $TOP/Makedefs
echo "" >> $TOP/Makedefs
-echo "RSW = $DRSW" >> $TOP/Makedefs
-echo "TL = $TL" >> $TOP/Makedefs
-echo "" >> $TOP/Makedefs
echo "# $GPX" >> $TOP/Makedefs
echo "XL = $XL" >> $TOP/Makedefs
# report actions
echo " configured $NAME"
echo " with $GPX"
-echo " using $RSW"
# run customization script, if one exists
if [ -f $NAME/custom.sh ]; then
diff --git a/config/solaris/Makedefs b/config/solaris/Makedefs
index 3f6bd24..7fa50b7 100644
--- a/config/solaris/Makedefs
+++ b/config/solaris/Makedefs
@@ -9,11 +9,11 @@
# GDIR directory of graphics helper library
CC = gcc
-CFLAGS = -I/usr/openwin/include
+CFLAGS =
CFDYN = -fPIC
RLINK =
RLIBS = -lm -ldl
TLIBS = -lposix4 -lpthread
-XLIBS = -L /usr/openwin/lib -Xlinker -R/usr/openwin/lib -lX11
+XLIBS = -Xlinker -lX11
XPMDEFS = -DZPIPE -DSYSV
GDIR = xpm
diff --git a/config/solaris/define.h b/config/solaris/define.h
index 12b5119..9a19b3d 100644
--- a/config/solaris/define.h
+++ b/config/solaris/define.h
@@ -4,7 +4,3 @@
#define UNIX 1
#define LoadFunc
-
-/* use gcc to compile generated code */
-#define CComp "gcc"
-#define COpts "-I/usr/openwin/include -ldl"
diff --git a/config/solaris/i386.c b/config/solaris/i386.c
deleted file mode 100644
index fa88c93..0000000
--- a/config/solaris/i386.c
+++ /dev/null
@@ -1,71 +0,0 @@
-/*
- * Coswitch for Windows using Visual C++.
- *
- * Written by Frank J. Lhota, based on an assembly version
- * authored by Robert Goldberg and modified for OS/2 2.0 by Mark
- * Emmer.
- */
-
-#include <sys/asm_linkage.h>
-#include <sys/trap.h>
-
-/*
- * The Windows co-expression context consists of 5 words. The
- * following constants define the byte offsets for each of the
- * registers stored in the context.
- */
-
-#define SP_OFF "0"
-#define BP_OFF "4"
-#define SI_OFF "8"
-#define DI_OFF "12"
-#define BX_OFF "16"
-
-int coswitch(old, new, first)
-int *old;
-int *new;
-int first;
-{
-
- /* Save current context to *old */
- __asm__ __volatile__ (
- "movl %%esp," SP_OFF "(%0)\n\t"
- "movl %%ebp," BP_OFF "(%0)\n\t"
- "movl %%esi," SI_OFF "(%0)\n\t"
- "movl %%edi," DI_OFF "(%0)\n\t"
- "movl %%ebx," BX_OFF "(%0)"
- : : "a"( old )
- );
-
- if ( first )
- {
- /* first != 0 => restore context in *new. */
- __asm__ __volatile__ (
- "movl " SP_OFF "(%0),%%esp\n\t"
- "movl " BP_OFF "(%0),%%ebp\n\t"
- "movl " SI_OFF "(%0),%%esi\n\t"
- "movl " DI_OFF "(%0),%%edi\n\t"
- "movl " BX_OFF "(%0),%%ebx"
- : : "a"( new )
- );
- }
- else
- {
- /*
- * first == 0 => Set things up for first activation of this
- * coexpression. Load stack pointer from first
- * word of *new and call new_context, which
- * should never return.
- */
- __asm__ __volatile__ (
- "movl " SP_OFF "(%0),%%esp\n\t"
- "movl %%esp,%%ebp"
- : : "a"( new )
- );
- new_context( 0, NULL );
- syserr( "interp() returned in coswitch" );
- }
-
- return 0;
-}
-
diff --git a/config/solaris/sparc.c b/config/solaris/sparc.c
deleted file mode 100644
index 6c57a94..0000000
--- a/config/solaris/sparc.c
+++ /dev/null
@@ -1,39 +0,0 @@
-/*
- * coswitch for Sun-4 Sparc.
- *
- * Compile this with 'gcc -c rswitch.c'. Do not use gcc -O.
- */
-
-#include <sys/asm_linkage.h>
-#include <sys/trap.h>
-
-int coswitch(old_cs, new_cs, first)
-int *old_cs, *new_cs;
-int first;
-{
- asm("ta 0x03"); /* ST_FLUSH_WINDOWS in trap.h */
- asm("ld [%fp+0x44], %o0"); /* load old_cs into %o0 */
- asm("st %sp,[%o0]"); /* Save user stack pointer */
- asm("st %fp,[%o0+0x4]"); /* Save frame pointer */
- asm("st %i7,[%o0+0x8]"); /* Save return address */
-
- if (first == 0) { /* this is the first activation */
- asm("ld [%fp+0x48], %o0"); /* load new_cs into %o0 */
- asm("ld [%o0], %o1"); /* load %o1 from cstate[0] */
-
- /* Decrement new stack pointer value before loading it into sp. */
- /* The top 64 bytes of the stack are reserved for the kernel, to */
- /* save the 8 local and 8 in registers into, on context switches, */
- /* interrupts, traps, etc. */
-
- asm("save %o1,-96, %sp"); /* load %sp from %o1 */
- new_context(0,0);
- syserr("new_context() returned in coswitch");
-
- } else {
- asm("ld [%fp+0x48], %o0"); /* load new_cs into %o0 */
- asm("ld [%o0+0x4],%fp"); /* Load frame pointer */
- asm("ld [%o0+0x8],%i7"); /* Load return address */
- asm("ld [%o0],%sp"); /* Load user stack pointer */
- }
-}
diff --git a/config/solaris/status b/config/solaris/status
index a2a7a35..b7d0c2a 100644
--- a/config/solaris/status
+++ b/config/solaris/status
@@ -4,14 +4,13 @@ System configuration:
Latest Icon version:
- Version 9.4.3
+ Version 9.5.0
Installer:
Gregg Townsend
Icon Project
The University of Arizona
- (with thanks to Andreas Almroth)
Missing features:
@@ -23,10 +22,9 @@ Known bugs:
Comments:
- Tested on SPARC Solaris 2.6 (SunOS 5.6) with gcc version 2.95.3.
- Tested on SPARC Solaris 9 (SunOS 5.9) with gcc version 3.4.1.
- Tested on x86 Schillix 0.2.1 with gcc version 3.4.3.
+ Tested on SPARC Solaris 10 (SunOS 5.10) with gcc version 4.2.2,
+ and on x86 OpenSolaris 2009.6 (5.11) with gcc version 3.4.3.
Date:
- November 10, 2005
+ March 26, 2010
diff --git a/config/solaris_sunc/Makedefs b/config/solaris_sunc/Makedefs
index e5bb495..592b2d6 100644
--- a/config/solaris_sunc/Makedefs
+++ b/config/solaris_sunc/Makedefs
@@ -9,11 +9,11 @@
# GDIR directory of graphics helper library
CC = cc
-CFLAGS = -O -w -I/usr/openwin/include
+CFLAGS = -O -w
CFDYN = -KPIC
RLINK =
RLIBS = -lm -ldl
TLIBS = -lposix4 -lpthread
-XLIBS = -L /usr/openwin/lib -R/usr/openwin/lib -lX11
+XLIBS = -lX11
XPMDEFS = -DZPIPE -DSYSV
GDIR = xpm
diff --git a/config/solaris_sunc/define.h b/config/solaris_sunc/define.h
index d4789bb..3b89670 100644
--- a/config/solaris_sunc/define.h
+++ b/config/solaris_sunc/define.h
@@ -4,6 +4,3 @@
#define UNIX 1
#define LoadFunc
-
-#define CComp "cc"
-#define COpts "-I/usr/openwin/include -ldl"
diff --git a/config/solaris_sunc/sparc.c b/config/solaris_sunc/sparc.c
deleted file mode 100644
index b712211..0000000
--- a/config/solaris_sunc/sparc.c
+++ /dev/null
@@ -1,37 +0,0 @@
-/*
- * coswitch for Sun-4 Sparc.
- */
-
-#include <sys/asm_linkage.h>
-#include <sys/trap.h>
-
-int coswitch(old_cs, new_cs, first)
-int *old_cs, *new_cs;
-int first;
-{
- asm("ta 0x03"); /* ST_FLUSH_WINDOWS in trap.h */
- asm("ld [%fp+0x44], %o0"); /* load old_cs into %o0 */
- asm("st %sp,[%o0]"); /* Save user stack pointer */
- asm("st %fp,[%o0+0x4]"); /* Save frame pointer */
- asm("st %i7,[%o0+0x8]"); /* Save return address */
-
- if (first == 0) { /* this is the first activation */
- asm("ld [%fp+0x48], %o0"); /* load new_cs into %o0 */
- asm("ld [%o0], %o1"); /* load %o1 from cstate[0] */
-
- /* Decrement new stack pointer value before loading it into sp. */
- /* The top 64 bytes of the stack are reserved for the kernel, to */
- /* save the 8 local and 8 in registers into, on context switches, */
- /* interrupts, traps, etc. */
-
- asm("save %o1,-96, %sp"); /* load %sp from %o1 */
- new_context(0,0);
- syserr("new_context() returned in coswitch");
-
- } else {
- asm("ld [%fp+0x48], %o0"); /* load new_cs into %o0 */
- asm("ld [%o0+0x4],%fp"); /* Load frame pointer */
- asm("ld [%o0+0x8],%i7"); /* Load return address */
- asm("ld [%o0],%sp"); /* Load user stack pointer */
- }
-}
diff --git a/config/solaris_sunc/status b/config/solaris_sunc/status
index 54d26dc..ce854c2 100644
--- a/config/solaris_sunc/status
+++ b/config/solaris_sunc/status
@@ -4,7 +4,7 @@ System configuration:
Latest Icon version:
- Version 9.4.3
+ Version 9.5.0
Installer:
@@ -22,11 +22,8 @@ Known bugs:
Comments:
- Tested on Sun SPARC systems running Solaris 2.6 (WorkShop C 4.2)
- and Solaris 9 (WorkShop C 5.0).
-
- This configuration can use pthreads for context switching.
+ Tested on SPARC Solaris 10 (SunOS 5.10) with Sun C 5.9.
Date:
- November 8, 2005
+ March 26, 2010
diff --git a/config/tru64/define.h b/config/tru64/define.h
index 78cee03..e06d824 100644
--- a/config/tru64/define.h
+++ b/config/tru64/define.h
@@ -5,6 +5,3 @@
/* standard Unix and C */
#define UNIX 1
#define LoadFunc
-
-/* c89 is ANSI C compiler */
-#define CComp "c89"
diff --git a/config/tru64/rswitch.s b/config/tru64/rswitch.s
deleted file mode 100644
index a4589d4..0000000
--- a/config/tru64/rswitch.s
+++ /dev/null
@@ -1,46 +0,0 @@
-/*
- * coswitch(old_cs, new_cs, first) for Dec Alpha architecture
- * $16 $17 $18
- */
- .data
-errmsg: .ascii "new_context() returned in coswitch\X00"
-
- .text
- .globl coswitch
- .ent coswitch
-coswitch:
- lda $sp, -72($sp) /* make room on stack */
- stq $sp, 0($16) /* save stack pointer */
- stq $9, 0($sp) /* save registers on stack */
- stq $10, 8($sp)
- stq $11, 16($sp)
- stq $12, 24($sp)
- stq $13, 32($sp)
- stq $14, 40($sp)
- stq $15, 48($sp)
- stq $27, 56($sp)
- stq $26, 64($sp) /* return address */
- beq $18, first /* if first time */
-
- ldq $sp, 0($17) /* load new stack pointer */
- ldq $9, 0($sp) /* load registers from stack */
- ldq $10, 8($sp)
- ldq $11, 16($sp)
- ldq $12, 24($sp)
- ldq $13, 32($sp)
- ldq $14, 40($sp)
- ldq $15, 48($sp)
- ldq $27, 56($sp)
- ldq $26, 64($sp) /* return address */
- lda $sp, 72($sp) /* reset sp */
- jsr_coroutine $31, ($26), 0 /* jump into new_context */
-
-first:
- ldq $sp, 0($17) /* load stack pointer only */
- bis $31, $31, $16 /* r16 = 0 */
- bis $31, $31, $17 /* r17 = 0 */
- jsr $26, new_context /* new_context(0,0) */
- lda $16, errmsg
- jsr $26, syserr /* shouldn't get here */
-
- .end coswitch
diff --git a/config/tru64/status b/config/tru64/status
index 15851f0..b1e9ac1 100644
--- a/config/tru64/status
+++ b/config/tru64/status
@@ -21,8 +21,6 @@ Comments:
Tested on: NekoTech "Jaguar" running Digital Unix 4.0B rev 564
and Compaq AlphaStation 600 running Digital Unix 4.0F rev 1229.
- This configuration can use pthreads for context switching.
-
Date:
October 5, 2005
diff --git a/config/xcygwin/Makedefs b/config/xcygwin/Makedefs
new file mode 100644
index 0000000..f3df739
--- /dev/null
+++ b/config/xcygwin/Makedefs
@@ -0,0 +1,23 @@
+# CC C compiler
+# CFLAGS flags for building C files
+# CFDYN additional flags for dynamic functions
+# RLINK flags for linking run-time system
+# RLIBS libraries to link with run-time system
+# TLIBS libraries to link for POSIX threads
+# XLIBS libraries to link for graphics
+# XPMDEFS definitions for building XPM library
+# GDIR directory of graphics helper library
+
+CC = gcc
+CFLAGS = -O
+CFDYN =
+# make win32 import library for callbacks
+RLINK = -Wl,--export-all-symbols -Wl,--out-implib=iconx.a
+RLIBS = -lm
+TLIBS =
+XLIBS = -L/usr/X11R6/lib -lX11
+XPMDEFS = -DZPIPE
+GDIR = xpm
+
+# EXE extension for executable files
+EXE = .exe
diff --git a/config/xcygwin/define.h b/config/xcygwin/define.h
new file mode 100644
index 0000000..f939ed2
--- /dev/null
+++ b/config/xcygwin/define.h
@@ -0,0 +1,16 @@
+/*
+ * Icon configuration file for Cygwin using X Window System graphics
+ */
+#define MSWIN 1 /* this configuration is for Microsoft Windows */
+#define CYGWIN 1 /* this configuration uses Cygwin API */
+#define XWindows 1 /* this configuration uses X Windows for graphics */
+
+#define FAttrib /* enable fattrib() extension */
+
+#define LoadFunc 1 /* enable dynamic loading */
+
+#define ExecSuffix ".exe"
+#define IcodeSuffix ".exe"
+
+#define BinaryHeader
+#define MaxHdr 16384
diff --git a/config/xcygwin/status b/config/xcygwin/status
new file mode 100644
index 0000000..55535c2
--- /dev/null
+++ b/config/xcygwin/status
@@ -0,0 +1,32 @@
+System configuration:
+
+ Cygwin on Windows XP using the X Window System for graphics
+
+Latest Icon version:
+
+ Version 9.5.0
+
+Installer:
+
+ Carl Sturtivant
+ University of Minnesota
+
+Missing features:
+
+ None
+
+Known bugs:
+
+ The "options" test fails due to Unix dependencies.
+
+ Graphics programs can only run within a Cygwin xterm.
+
+Comments:
+
+ Tested using Cygwin 1.5.25 with GCC 3.4.4 on Windows XP.
+
+ See the special Cygwin page in the documentation directory.
+
+Date:
+
+ April 3, 2010