|
From: | Christian JULLIEN |
Subject: | Re: [Tinycc-devel] Tidying TCC's external API |
Date: | Mon, 26 Sep 2016 09:48:57 +0200 (CEST) |
----- message d'origine -----
De : "Jean-Claude Beaudoin" <address@hidden>
date lun. 26/09/2016 09:22 (GMT +02:00)
À : "Christian JULLIEN" <address@hidden>, "address@hidden" <address@hidden>
Objet : Re: [Tinycc-devel] Tidying TCC's external APIOn Mon, Sep 26, 2016 at 2:59 AM, Christian JULLIEN <address@hidden> wrote:> I gather that this is for the case where ONE_SOURCE is "not" set, and under a "configure --disable-static" such that tcc is linked againsta libtcc.dll. Am I right?
Right!Well that seems to be only part of the problem. Trying to compile on Windows XPwith MinGW I just came to the conclusion that the Makefile content I also largely to blame.What compiler are you using to compile tcc?
I've no precise idea why tcc.c requires pstrcpy:
$ grep strcpy tcc.c
pstrcpy(child_path, sizeof child_path - 40, argv[0]);
strcpy(child_name, target);
pstrcpy(buf, sizeof(buf), target);
pstrcpy(ext, sizeof(buf) - (ext-buf), ".d");
pstrcpy(buf, sizeof(buf), name);
strcpy(ext, ".dll");
strcpy(ext, ".exe");
strcpy(ext, ".o");
strcpy(buf, "a.out");
I see it uses both pstrcpy and strcpy.At first sight it looks pretty arbitrary! There may be some reason but it suredoes not jump out to a casual reader.Anyway, tcc.c contains some ONE_SOURCE conditionals that should makethis whole question disappear if ONE_SOURCE was propagated properly in theMakefile which is not the case right now.Working on it...
[Prev in Thread] | Current Thread | [Next in Thread] |