From: Michael Gernoth Date: Sun, 13 Jan 2008 02:20:04 +0000 (+0100) Subject: let bundled tcl compile with recent tools X-Git-Url: https://git.zerfleddert.de/cgi-bin/gitweb.cgi/micropolis/commitdiff_plain/f764718ed65609003b1faea0885bf4f6ec7c34da let bundled tcl compile with recent tools --- diff --git a/src/tcl/tclunix.h b/src/tcl/tclunix.h index a4c5cab..daa298c 100644 --- a/src/tcl/tclunix.h +++ b/src/tcl/tclunix.h @@ -101,7 +101,7 @@ */ extern int errno; -extern int sys_nerr; +//extern int sys_nerr; //#ifndef IS_LINUX //extern char *sys_errlist[]; //#endif diff --git a/src/tclx/ossupp/makefile b/src/tclx/ossupp/makefile index a01156f..5c2ebba 100644 --- a/src/tclx/ossupp/makefile +++ b/src/tclx/ossupp/makefile @@ -30,7 +30,7 @@ CFLAGS=$(OPTIMIZE_FLAG) $(XCFLAGS) -I../$(TCL_UCB_DIR) $(MEM_DEBUG_FLAGS) \ all: made.tmp made.tmp: $(SUPPORT_OBJS) - $(AR) cr ../libtcl.a $(SUPPORT_OBJS) + #$(AR) cr ../libtcl.a $(SUPPORT_OBJS) touch made.tmp #------------------------------------------------------------------------------ diff --git a/src/tclx/src/tclxgdat.y b/src/tclx/src/tclxgdat.y index 6957537..e29d7ea 100644 --- a/src/tclx/src/tclxgdat.y +++ b/src/tclx/src/tclxgdat.y @@ -64,78 +64,78 @@ timedate: /* empty */ | timedate item; -item: tspec = +item: tspec {timeflag++;} - | zone = + | zone {zoneflag++;} - | dtspec = + | dtspec {dateflag++;} - | dyspec = + | dyspec {dayflag++;} - | rspec = + | rspec {relflag++;} | nspec; -nspec: NUMBER = +nspec: NUMBER {if (timeflag && dateflag && !relflag) year = $1; else {timeflag++;hh = $1/100;mm = $1%100;ss = 0;merid = 24;}}; -tspec: NUMBER MERIDIAN = +tspec: NUMBER MERIDIAN {hh = $1; mm = 0; ss = 0; merid = $2;} - | NUMBER ':' NUMBER = + | NUMBER ':' NUMBER {hh = $1; mm = $3; merid = 24;} - | NUMBER ':' NUMBER MERIDIAN = + | NUMBER ':' NUMBER MERIDIAN {hh = $1; mm = $3; merid = $4;} - | NUMBER ':' NUMBER NUMBER = + | NUMBER ':' NUMBER NUMBER {hh = $1; mm = $3; merid = 24; dayLight = STANDARD; ourzone = -($4%100 + 60*$4/100);} - | NUMBER ':' NUMBER ':' NUMBER = + | NUMBER ':' NUMBER ':' NUMBER {hh = $1; mm = $3; ss = $5; merid = 24;} - | NUMBER ':' NUMBER ':' NUMBER MERIDIAN = + | NUMBER ':' NUMBER ':' NUMBER MERIDIAN {hh = $1; mm = $3; ss = $5; merid = $6;} - | NUMBER ':' NUMBER ':' NUMBER NUMBER = + | NUMBER ':' NUMBER ':' NUMBER NUMBER {hh = $1; mm = $3; ss = $5; merid = 24; dayLight = STANDARD; ourzone = -($6%100 + 60*$6/100);}; -zone: ZONE = +zone: ZONE {ourzone = $1; dayLight = STANDARD;} - | DAYZONE = + | DAYZONE {ourzone = $1; dayLight = DAYLIGHT;}; -dyspec: DAY = +dyspec: DAY {dayord = 1; dayreq = $1;} - | DAY ',' = + | DAY ',' {dayord = 1; dayreq = $1;} - | NUMBER DAY = + | NUMBER DAY {dayord = $1; dayreq = $2;}; -dtspec: NUMBER '/' NUMBER = +dtspec: NUMBER '/' NUMBER {month = $1; day = $3;} - | NUMBER '/' NUMBER '/' NUMBER = + | NUMBER '/' NUMBER '/' NUMBER {month = $1; day = $3; year = $5;} - | MONTH NUMBER = + | MONTH NUMBER {month = $1; day = $2;} - | MONTH NUMBER ',' NUMBER = + | MONTH NUMBER ',' NUMBER {month = $1; day = $2; year = $4;} - | NUMBER MONTH = + | NUMBER MONTH {month = $2; day = $1;} - | NUMBER MONTH NUMBER = + | NUMBER MONTH NUMBER {month = $2; day = $1; year = $3;}; -rspec: NUMBER UNIT = +rspec: NUMBER UNIT {relsec += 60L * $1 * $2;} - | NUMBER MUNIT = + | NUMBER MUNIT {relmonth += $1 * $2;} - | NUMBER SUNIT = + | NUMBER SUNIT {relsec += $1;} - | UNIT = + | UNIT {relsec += 60L * $1;} - | MUNIT = + | MUNIT {relmonth += $1;} - | SUNIT = + | SUNIT {relsec++;} - | rspec AGO = + | rspec AGO {relsec = -relsec; relmonth = -relmonth;}; %% @@ -228,7 +228,7 @@ time_t daylcorr(future, now) time_t future, now; static char *lptr; -static +//static yylex() { #ifndef YYSTYPE diff --git a/src/tclx/src/tclxint.h b/src/tclx/src/tclxint.h index 6a1dfee..5cacb48 100644 --- a/src/tclx/src/tclxint.h +++ b/src/tclx/src/tclxint.h @@ -67,7 +67,10 @@ # include #endif -#include +//#include "values.h" +#include +#include +#define MAXDOUBLE DBL_MAX #include /* * On some systems this is not included by tclUnix.h.