[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Tinycc-devel] Possible bug & patch to make configure Debian friendly
From: |
Pedro A ARANDA |
Subject: |
[Tinycc-devel] Possible bug & patch to make configure Debian friendly |
Date: |
Wed, 09 May 2007 06:45:58 +0000 |
Hi folks,
I think I have found a bug in tcc... It was just one of my typoes
Either I'm lazy writing or I'm very tired lately :-)
Am I wrong in considering this a bug, because some C standard
allows this way of coding? I have lost track and just use C as a
tool, not as a research topic.
Rgds, PA
#!/usr/bin/tcc -run -lm
#include <stdio.h>
//
// check the pthreads problem --- solved in tinycc-20070509
//
#include <stdlib.h>
int main(int argc,char **argv)
{
double x = 1.3;
double right = 1.0 / (1.0 - 0.3 * x);
//
// I consider 1,0 to be a typo. IMHO this code shouldn't compile
//
double typo = 1.0 / (1,0 - 0.3 * x);
printf("right = %.2f typo = %.2f\n",right,typo);
}
----- configure.patch
diff -r 4b36c07af991 configure
--- a/configure Tue May 08 22:16:31 2007 -0400
+++ b/configure Wed May 09 08:30:27 2007 +0200
@@ -219,28 +219,30 @@ else
prefix="/usr"
fi
if test x"$execprefix" = x""; then
- execprefix="${prefix}"
+ execprefix="\$(prefix)"
fi
if test x"$bindir" = x""; then
- bindir="${execprefix}/bin"
+ bindir="\$(prefix)/bin"
fi
if test x"$docdir" = x""; then
- docdir="$prefix/share/doc/tcc"
+ docdir="\$(prefix)/share/doc/tcc"
fi
fi # mingw32
if test x"$libdir" = x""; then
-libdir="${execprefix}/lib"
+libdir="\$(prefix)/lib"
fi
if test x"$tccdir" = x""; then
-tccdir="${execprefix}/lib/tcc"
+tccdir="\$(prefix)/lib/tcc"
fi
if test x"$mandir" = x""; then
-mandir="${prefix}/man"
+mandir="\$(prefix)/man"
fi
if test x"$includedir" = x""; then
-includedir="${prefix}/include"
-fi
+includedir="\$(prefix)/include"
+fi
+
+config_tccdir="${prefix}/lib/tcc"
echo "Binary directory $bindir"
echo "TinyCC directory $tccdir"
@@ -261,14 +263,14 @@ echo "# Automatically generated by confi
echo "# Automatically generated by configure - do not modify" > config.mak
echo "/* Automatically generated by configure - do not modify */" > $TMPH
-echo "prefix=$prefix" >> config.mak
+echo "prefix?=$prefix" >> config.mak
echo "bindir=$bindir" >> config.mak
echo "tccdir=$tccdir" >> config.mak
echo "libdir=$libdir" >> config.mak
echo "includedir=$includedir" >> config.mak
echo "mandir=$mandir" >> config.mak
echo "docdir=$docdir" >> config.mak
-echo "#define CONFIG_TCCDIR \"$tccdir\"" >> $TMPH
+echo "#define CONFIG_TCCDIR \"$config_tccdir\"" >> $TMPH
echo "MAKE=$make" >> config.mak
echo "CC=$cc" >> config.mak
echo "GCC_MAJOR=$gcc_major" >> config.mak
_________________________________________________________________
Don't just search. Find. Check out the new MSN Search!
http://search.msn.com/
- [Tinycc-devel] Possible bug & patch to make configure Debian friendly,
Pedro A ARANDA <=