tinycc-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Tinycc-devel] GNUmake v4.4 port on Windows with tcc


From: Eli Zaretskii
Subject: Re: [Tinycc-devel] GNUmake v4.4 port on Windows with tcc
Date: Thu, 03 Nov 2022 15:50:24 +0200

> From: Paul Smith <psmith@gnu.org>
> Cc: tinycc-devel@nongnu.org, 'Eli Zaretskii' <eliz@gnu.org>
> Date: Wed, 02 Nov 2022 11:50:45 -0400
> 
> On Wed, 2022-11-02 at 16:40 +0100, Christian Jullien wrote:
> > It appears that tcc on Windows lacks strtoll and strtoull (something
> > that
> > needs to be fixed on tcc side of course).
> > Meanwhile, it can easily be patched in build_w32.bat by adding
> > -Dstrtoull=_strtoui64 -Dstrtoll=_strtoi64 at line 330
> > 
> > call %COMPILER% -mthreads -Wall -std=c11 %OPTS% -I%OUTDIR%/src -
> > I./src
> > -I%OUTDIR%/lib -I./lib -I./src/w32/include -D_cdecl= -
> > Dstrtoull=_strtoui64
> > -Dstrtoll=_strtoi64 -D_MSC_VER -DHAVE_CONFIG_H %EXTRAS% -o
> > %OUTDIR%/%1.%O%
> > -c %1.c
> > 
> > Hope it helps.
> 
> Thanks for that note.  We will choose a different way to address this I
> expect but it's good to know there's a problem.

Christian, does the below fix the problem?

--- src/config.h.W32~0  2022-10-23 17:52:32.000000000 +0300
+++ src/config.h.W32    2022-11-03 15:47:14.468500000 +0200
@@ -343,6 +343,10 @@ this program.  If not, see <https://www.
 /* #undef HAVE_STRSIGNAL */
 
 /* Define to 1 if you have the `strtoll' function. */
+#ifdef __TINYC__
+#define strtoll _strtoi64
+#define strtoull _strtoui64
+#endif
 #define HAVE_STRTOLL 1
 
 /* Define to 1 if `d_type' is a member of `struct dirent'. */



reply via email to

[Prev in Thread] Current Thread [Next in Thread]