/version output: not applicable (build failure); version of source is 5.0b8.
uname -a output: Linux ac-eightysix 2.6.18-5-686 #1 SMP Fri Jun 1 00:47:00 UTC 2007 i686 GNU/Linux
Build output:
$ ./configure --prefix=/usr --disable-float
configure: Configuring TinyFugue version 5.0 beta 8
configure:
configure: Core dumps disabled.
checking for gcc... gcc
checking for C compiler default output file name... a.out
checking whether the C compiler works... yes
checking whether we are cross compiling... no
checking for suffix of executables...
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ANSI C... none needed
checking how to run the C preprocessor... gcc -E
checking for egrep... grep -E
checking whether gcc needs -traditional... no
checking whether make sets $(MAKE)... yes
checking for ranlib... ranlib
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking for short... yes
checking size of short... 2
checking for int... yes
checking size of int... 4
checking for long... yes
checking size of long... 4
checking for inline... yes
checking for library containing select... none required
checking for library containing gethostbyname... none required
checking for main in -linet... no
checking for main in -lnet... no
checking for library containing connect... none required
checking for library containing setlocale... none required
checking for libcrypto and libssl... yes
checking for ssl kerberos dependency... no
checking openssl/ssl.h usability... yes
checking openssl/ssl.h presence... yes
checking for openssl/ssl.h... yes
checking for library containing tgetent... -ltermcap
checking for inflate in -lz... yes
checking for pcre_compile in -lpcre... no
configure: Note: will use old copy of pcre distributed with tf
checking for ANSI C header files... (cached) yes
checking for unistd.h... (cached) yes
checking for memory.h... (cached) yes
checking sys/select.h usability... yes
checking sys/select.h presence... yes
checking for sys/select.h... yes
checking for sys/wait.h that is POSIX.1 compatible... yes
checking locale.h usability... yes
checking locale.h presence... yes
checking for locale.h... yes
checking pwd.h usability... yes
checking pwd.h presence... yes
checking for pwd.h... yes
checking zlib.h usability... yes
checking zlib.h presence... yes
checking for zlib.h... yes
checking netinet/in.h usability... yes
checking netinet/in.h presence... yes
checking for netinet/in.h... yes
checking arpa/inet.h usability... yes
checking arpa/inet.h presence... yes
checking for arpa/inet.h... yes
checking netdb.h usability... yes
checking netdb.h presence... yes
checking for netdb.h... yes
checking whether struct sockaddr has sa_len... no
checking termios.h usability... yes
checking termios.h presence... yes
checking for termios.h... yes
checking return type of signal handlers... void
checking for pid_t... yes
checking for size_t... yes
checking for time_t... yes
checking for socklen_t... yes
checking for strftime... yes
checking for h_errno... no
checking for strstr... yes
checking for strtol... yes
checking for bcopy... yes
checking for bzero... yes
checking for connect... yes
checking for fileno... yes
checking for getcwd... yes
checking for gethostname... yes
checking for gethostbyname... yes
checking for getipnodebyname... no
checking for getpwnam... yes
checking for gettimeofday... yes
checking for getwd... yes
checking for hstrerror... yes
checking for index... yes
checking for inet_aton... yes
checking for getaddrinfo... yes
checking for gai_strerror... yes
checking for kill... yes
checking for memcpy... yes
checking for memset... yes
checking for raise... yes
checking for setlocale... yes
checking for setrlimit... yes
checking for sigaction... yes
checking for srand... yes
checking for srandom... yes
checking for strcasecmp... yes
checking for strchr... yes
checking for strcmpi... no
checking for strcspn... yes
checking for strerror... yes
checking for stricmp... no
checking for strtod... yes
checking for tzset... yes
checking for waitpid... yes
checking for IPv6 address structure... in6_addr
checking location of mail directory... /var/spool/mail
configure: creating ./config.status
config.status: creating Makefile
config.status: creating unix/vars.mak
config.status: creating src/tfdefs.h
config.status: creating src/tfconfig.h
config.status: executing default commands
configure:
#####################################################
## prefix: /usr
## exec_prefix: ${prefix}
## bindir: ${exec_prefix}/bin
## datadir: ${prefix}/share
## executable: ${bindir}/tf
## library: ${datadir}/tf-lib
##
## TinyFugue configuration successful.
## Use "make" to build.
$ make
make[1]: Entering directory `/usr/local/src/tf-50b8/src'
gcc -g -O2 -DDATADIR=/usr/share -c -o attr.o attr.c
gcc -g -O2 -DDATADIR=/usr/share -c -o command.o command.c
gcc -g -O2 -DDATADIR=/usr/share -c -o dstring.o dstring.c
gcc -g -O2 -DDATADIR=/usr/share -c -o expand.o expand.c
gcc -g -O2 -DDATADIR=/usr/share -c -o expr.o expr.c
gcc -g -O2 -DDATADIR=/usr/share -c -o help.o help.c
gcc -g -O2 -DDATADIR=/usr/share -c -o history.o history.c
gcc -g -O2 -DDATADIR=/usr/share -c -o keyboard.o keyboard.c
gcc -g -O2 -DDATADIR=/usr/share -c -o macro.o macro.c
gcc -g -O2 -DDATADIR=/usr/share -c -o main.o main.c
gcc -g -O2 -DDATADIR=/usr/share -c -o malloc.o malloc.c
gcc -g -O2 -DDATADIR=/usr/share -c -o output.o output.c
gcc -g -O2 -DDATADIR=/usr/share -c -o pattern.o pattern.c
gcc -g -O2 -DDATADIR=/usr/share -c -o process.o process.c
gcc -g -O2 -DDATADIR=/usr/share -c -o search.o search.c
gcc -g -O2 -DDATADIR=/usr/share -c -o signals.o signals.c
gcc -g -O2 -DDATADIR=/usr/share -c -o socket.o socket.c
socket.c: In function ‘handle_socket_lines’:
socket.c:2603: warning: assignment from incompatible pointer type
gcc -g -O2 -DDATADIR=/usr/share -c -o tfio.o tfio.c
gcc -g -O2 -DDATADIR=/usr/share -c -o tty.o tty.c
gcc -g -O2 -DDATADIR=/usr/share -c -o util.o util.c
gcc -g -O2 -DDATADIR=/usr/share -c -o variable.o variable.c
gcc -g -O2 -DDATADIR=/usr/share -c -o world.o world.c
cd pcre-2.08 && \
make CC='gcc' CFLAGS='-O' O=o libpcre.a && \
ranlib libpcre.a
make[2]: Entering directory `/usr/local/src/tf-50b8/src/pcre-2.08'
gcc -c -O maketables.c
gcc -c -O get.c
gcc -c -O study.c
gcc -o dftables -O dftables.c
./dftables >chartables.c
gcc -c -O pcre.c
rm -f libpcre.a
ar cq libpcre.a maketables.o get.o study.o pcre.o
make[2]: Leaving directory `/usr/local/src/tf-50b8/src/pcre-2.08'
gcc -Lpcre-2.08 -o tf attr.o command.o dstring.o expand.o expr.o help.o history.o keyboard.o macro.o main.o malloc.o output.o pattern.o process.o search.o signals.o socket.o tfio.o tty.o util.o variable.o world.o -lz -ltermcap -lssl -lcrypto -lpcre
expr.o: In function `reduce_arithmetic':
/usr/local/src/tf-50b8/src/expr.c:796: undefined reference to `valfloat'
/usr/local/src/tf-50b8/src/expr.c:778: undefined reference to `valfloat'
/usr/local/src/tf-50b8/src/expr.c:778: undefined reference to `valfloat'
/usr/local/src/tf-50b8/src/expr.c:802: undefined reference to `valfloat'
/usr/local/src/tf-50b8/src/expr.c:805: undefined reference to `valfloat'
expr.o:/usr/local/src/tf-50b8/src/expr.c:807: more undefined references to `valfloat' follow
expr.o: In function `function_switch':
/usr/local/src/tf-50b8/src/expr.c:1190: undefined reference to `newfloat_fl'
expr.o: In function `reduce':
/usr/local/src/tf-50b8/src/expr.c:572: undefined reference to `newfloat_fl'
expr.o: In function `valval_fl':
/usr/local/src/tf-50b8/src/expr.c:238: undefined reference to `valfloat'
/usr/local/src/tf-50b8/src/expr.c:238: undefined reference to `newfloat_fl'
collect2: ld returned 1 exit status
make[1]: *** [tf] Error 1
make[1]: Leaving directory `/usr/local/src/tf-50b8/src'
make: *** [files] Error 2
Logged In: NO
Have a wobbly diff; this makes it compile, but it might or might not work completely. Check for bogosities before applying, should you choose to apply it.
--- src/expr.c.orig 2008-08-05 07:26:36.000000000 -0500
+++ src/expr.c 2008-08-05 07:41:58.000000000 -0500
@@ -235,7 +235,11 @@
result = NULL;
break;
case TYPE_FLOAT:
+#ifdef NO_FLOAT
+ internal_error(__FILE__, __LINE__, "impossible float");
+#else
result = newfloat_fl(valfloat(result), file, line); break;
+#endif
default:
result = newSstr_fl(valstr(result), file, line); break;
}
@@ -566,12 +570,16 @@
break;
switch (res.type) {
case TYPE_FLOAT:
+#ifdef NO_FLOAT
+ internal_error(__FILE__, __LINE__, "impossible float");
+#else
if (res.u.fval == HUGE_VAL || res.u.fval == -HUGE_VAL) {
eprintf("%s operator: arithmetic overflow", oplabel(op));
} else {
val = newfloat(res.u.fval);
}
break;
+#endif
case TYPE_DECIMAL:
case TYPE_ATIME:
case TYPE_DTIME:
@@ -753,8 +761,12 @@
case '+': /* fall thru to '-' */
case '-': return resint(sum);
case '*': i = valint(val[0]) * valint(val[1]);
+#ifdef NO_FLOAT
+ return resint(i);
+#else
f = valfloat(val[0]) * valfloat(val[1]);
return (i == f) ? resint(i) : resfloat(f);
+#endif
case '/': if ((i = valint(val[1])) != 0)
return resint(valint(val[0]) / i);
eprintf("division by zero");
@@ -774,8 +786,13 @@
switch (op & ~OPF_SIDE) {
case '+': tvadd(&t, &t, &t1);
return restime(t.tv_sec, t.tv_usec, promoted_type);
+#ifdef NO_FLOAT
+ case '*': return 0;
+ case '/': return 0;
+#else
case '*': return resfloat(valfloat(val[0]) * valfloat(val[1]));
case '/': return resfloat(valfloat(val[0]) / valfloat(val[1]));
+#endif
default: break;
}
@@ -793,6 +810,9 @@
}
case TYPE_FLOAT:
+#ifdef NO_FLOAT
+ return 0;
+#else
f = valfloat(val[0]);
switch (op & ~OPF_SIDE) {
case '>': return resint(f > valfloat(val[1]));
@@ -807,6 +827,7 @@
case '/': return resfloat(f / valfloat(val[1]));
default: return 0;
}
+#endif
default:
internal_error(__FILE__, __LINE__,
@@ -1187,8 +1208,13 @@
{
clock_t t;
t = clock();
+#ifdef NO_FLOAT
+ /* Approximate. */
+ return newint((t + CLOCKS_PER_SEC/2) / CLOCKS_PER_SEC);
+#else
return t == -1 ? newint(-1) :
newfloat(t / (double)CLOCKS_PER_SEC);
+#endif
}
case FN_idle: