diff options
author | gerald <gerald@FreeBSD.org> | 2009-04-26 05:16:14 +0800 |
---|---|---|
committer | gerald <gerald@FreeBSD.org> | 2009-04-26 05:16:14 +0800 |
commit | 3596fdfbd58dfda5a9cdde21dd88ba1fef5ef436 (patch) | |
tree | a11befad83266188f83c1b28ff691cdcdae47b16 /lang | |
parent | bad1bda778a7b47a876036198ac18f72b13b1b72 (diff) | |
download | freebsd-ports-gnome-3596fdfbd58dfda5a9cdde21dd88ba1fef5ef436.tar.gz freebsd-ports-gnome-3596fdfbd58dfda5a9cdde21dd88ba1fef5ef436.tar.zst freebsd-ports-gnome-3596fdfbd58dfda5a9cdde21dd88ba1fef5ef436.zip |
Break dependency on lang/gcc295.
PR: 132652
Submitted by: carl shapiro <carl.shapiro@gmail.com>
Approved by: maintainer (Erik Greenwald <erik.greenwald@gmail.com>)
Diffstat (limited to 'lang')
-rw-r--r-- | lang/schemetoc/Makefile | 1 | ||||
-rw-r--r-- | lang/schemetoc/files/patch-scrt-apply.c | 78 | ||||
-rw-r--r-- | lang/schemetoc/files/patch-scrt-apply.h | 13 | ||||
-rw-r--r-- | lang/schemetoc/files/patch-scrt-objects.c | 55 | ||||
-rw-r--r-- | lang/schemetoc/files/patch-scrt-objects.h | 19 | ||||
-rw-r--r-- | lang/schemetoc/files/patch-test-test23.sc | 40 |
6 files changed, 205 insertions, 1 deletions
diff --git a/lang/schemetoc/Makefile b/lang/schemetoc/Makefile index 7ad3dee93cf9..9dad62f50acd 100644 --- a/lang/schemetoc/Makefile +++ b/lang/schemetoc/Makefile @@ -16,7 +16,6 @@ EXTRACT_SUFX= .tar.Z MAINTAINER= erik@smluc.org COMMENT= Scheme-to-C, a compiler and interpreter for compiling scheme into C -USE_GCC= 2.95 USE_XORG= x11 xi USE_LDCONFIG= yes NO_WRKSUBDIR= yes diff --git a/lang/schemetoc/files/patch-scrt-apply.c b/lang/schemetoc/files/patch-scrt-apply.c new file mode 100644 index 000000000000..3dee57b94e7e --- /dev/null +++ b/lang/schemetoc/files/patch-scrt-apply.c @@ -0,0 +1,78 @@ +*** scrt/apply.c.orig Mon Feb 22 11:10:06 1993 +--- scrt/apply.c Sat Mar 14 21:49:29 2009 +*************** +*** 50,56 **** + #include "scinit.h" + #include "heap.h" + #include "apply.h" +! #include <varargs.h> + + /* Data structures used by UNKNOWNCALL. These values must be pushed on the + stack and then restored by interrupt handlers or when calling finalization +--- 50,56 ---- + #include "scinit.h" + #include "heap.h" + #include "apply.h" +! #include <stdarg.h> + + /* Data structures used by UNKNOWNCALL. These values must be pushed on the + stack and then restored by interrupt handlers or when calling finalization +*************** +*** 283,290 **** + in the call, or the procedure takes a variable number of arguments. + */ + +! TSCP sc_unknowncall( va_alist ) +! va_dcl + { + va_list argl; /* List of arguments on stack */ + int req; /* # of required arguments */ +--- 283,289 ---- + in the call, or the procedure takes a variable number of arguments. + */ + +! TSCP sc_unknowncall( TSCP arg0, ... ) + { + va_list argl; /* List of arguments on stack */ + int req; /* # of required arguments */ +*************** +*** 293,299 **** + TSCP tail; /* Tail of optional argument list */ + SCP utproc; /* Untagged version of proc */ + +! va_start( argl ); + utproc = T_U( sc_unknownproc[ 1 ] ); + if ((TSCPTAG( sc_unknownproc[ 1 ] ) != EXTENDEDTAG) || + (utproc->procedure.tag != PROCEDURETAG)) +--- 292,298 ---- + TSCP tail; /* Tail of optional argument list */ + SCP utproc; /* Untagged version of proc */ + +! va_start( argl, arg0 ); + utproc = T_U( sc_unknownproc[ 1 ] ); + if ((TSCPTAG( sc_unknownproc[ 1 ] ) != EXTENDEDTAG) || + (utproc->procedure.tag != PROCEDURETAG)) +*************** +*** 304,313 **** + ((utproc->procedure.optional == 0) && (sc_unknownargc != req))) + sc_error( "APPLY", "PROCEDURE requires ~s arguments, ~s supplied", + LIST2( C_FIXED( req ), C_FIXED( sc_unknownargc ) ) ); +! for (i = 0; i < req; i++) sc_arg[ i ] = va_arg( argl, TSCP ); + optl = EMPTYLIST; +! if (i++ < sc_unknownargc) { +! tail = (optl = sc_cons( va_arg( argl, TSCP ), EMPTYLIST )); + while (i++ < sc_unknownargc) + tail = (TP_U( tail )->pair.cdr = sc_cons( va_arg( argl, TSCP ), + EMPTYLIST )); +--- 303,313 ---- + ((utproc->procedure.optional == 0) && (sc_unknownargc != req))) + sc_error( "APPLY", "PROCEDURE requires ~s arguments, ~s supplied", + LIST2( C_FIXED( req ), C_FIXED( sc_unknownargc ) ) ); +! for (i = 0; i < req; i++) sc_arg[ i ] = !i ? arg0 : va_arg( argl, TSCP ); + optl = EMPTYLIST; +! if (i < sc_unknownargc) { +! tail = (optl = sc_cons( !i ? arg0 : va_arg( argl, TSCP ), EMPTYLIST )); +! ++i; + while (i++ < sc_unknownargc) + tail = (TP_U( tail )->pair.cdr = sc_cons( va_arg( argl, TSCP ), + EMPTYLIST )); diff --git a/lang/schemetoc/files/patch-scrt-apply.h b/lang/schemetoc/files/patch-scrt-apply.h new file mode 100644 index 000000000000..33bab9d1f39c --- /dev/null +++ b/lang/schemetoc/files/patch-scrt-apply.h @@ -0,0 +1,13 @@ +*** scrt/apply.h.orig Mon Feb 22 11:13:08 1993 +--- scrt/apply.h Sat Mar 14 20:18:50 2009 +*************** +*** 60,63 **** + + extern TSCP sc_apply_2dtwo(); + +! extern TSCP sc_unknowncall(); +--- 60,63 ---- + + extern TSCP sc_apply_2dtwo(); + +! extern TSCP sc_unknowncall( TSCP arg0, ... ); diff --git a/lang/schemetoc/files/patch-scrt-objects.c b/lang/schemetoc/files/patch-scrt-objects.c new file mode 100644 index 000000000000..8d9c2febacbd --- /dev/null +++ b/lang/schemetoc/files/patch-scrt-objects.c @@ -0,0 +1,55 @@ +*** scrt/objects.c.orig Mon Feb 22 11:12:04 1993 +--- scrt/objects.c Sat Mar 14 20:28:00 2009 +*************** +*** 48,54 **** + #include "heap.h" + #include "apply.h" + #include "cio.h" +! #include <varargs.h> + + #ifndef NULL + #define NULL 0 +--- 48,54 ---- + #include "heap.h" + #include "apply.h" + #include "cio.h" +! #include <stdarg.h> + + #ifndef NULL + #define NULL 0 +*************** +*** 293,310 **** + allocate variables and is visible within the compiler as MAKECLOSURE. + */ + +! TSCP sc_makeclosure( va_alist ) +! va_dcl + { + va_list argl; +- TSCP prevclosure; + int count; + SCP cp; + PATSCP vars; + + MUTEXON; +! va_start( argl ); +! prevclosure = va_arg( argl, TSCP ); + count = va_arg( argl, int ); + cp = sc_allocateheap( CLOSURESIZE( count ), CLOSURETAG, count ); + cp->closure.closure = prevclosure; +--- 293,307 ---- + allocate variables and is visible within the compiler as MAKECLOSURE. + */ + +! TSCP sc_makeclosure( TSCP prevclosure, ... ) + { + va_list argl; + int count; + SCP cp; + PATSCP vars; + + MUTEXON; +! va_start( argl, prevclosure ); + count = va_arg( argl, int ); + cp = sc_allocateheap( CLOSURESIZE( count ), CLOSURETAG, count ); + cp->closure.closure = prevclosure; diff --git a/lang/schemetoc/files/patch-scrt-objects.h b/lang/schemetoc/files/patch-scrt-objects.h new file mode 100644 index 000000000000..2e03344a3158 --- /dev/null +++ b/lang/schemetoc/files/patch-scrt-objects.h @@ -0,0 +1,19 @@ +*** scrt/objects.h.orig Tue Feb 23 18:29:09 1993 +--- scrt/objects.h Sat Mar 14 20:21:00 2009 +*************** +*** 798,804 **** + extern TSCP sc_makeclosure(...); + extern TSCP sc_makeprocedure(...); + #else +! extern TSCP sc_makeclosure(); + extern TSCP sc_makeprocedure(); + #endif + +--- 798,804 ---- + extern TSCP sc_makeclosure(...); + extern TSCP sc_makeprocedure(...); + #else +! extern TSCP sc_makeclosure( TSCP prevclosure, ... ); + extern TSCP sc_makeprocedure(); + #endif + diff --git a/lang/schemetoc/files/patch-test-test23.sc b/lang/schemetoc/files/patch-test-test23.sc new file mode 100644 index 000000000000..b0ff20d1ef95 --- /dev/null +++ b/lang/schemetoc/files/patch-test-test23.sc @@ -0,0 +1,40 @@ +*** test/test23.sc.orig Mon Feb 22 11:27:23 1993 +--- test/test23.sc Sat Mar 14 22:05:08 2009 +*************** +*** 330,338 **** + + ;;; Access to an external array. + +! (define-c-external _\i\o\b* ARRAY "_iob") +! (eval-when (load) (define _iob _\i\o\b*)) +! (eval-when (eval) (define _iob 0)) + + ;;; Access to an external procedure pointer. + +--- 330,338 ---- + + ;;; Access to an external array. + +! ;(define-c-external _\i\o\b* ARRAY "_iob") +! ;(eval-when (load) (define _iob _\i\o\b*)) +! ;(eval-when (eval) (define _iob 0)) + + ;;; Access to an external procedure pointer. + +*************** +*** 409,415 **** + + (chk 130 (string-ref "" 0) (integer->char #o21)) + +! (chk 140 (number? _iob) #t) + (chk 141 (number? hypot) #t) + + (chk 150 (letrec ((x 1)) (define x 2) x) 2) +--- 409,415 ---- + + (chk 130 (string-ref "" 0) (integer->char #o21)) + +! ;(chk 140 (number? _iob) #t) + (chk 141 (number? hypot) #t) + + (chk 150 (letrec ((x 1)) (define x 2) x) 2) |