Re: [cc65] preprocessor hazzle...

Date view Thread view Subject view

From: Greg King (gngking_at_erols.com)
Date: 2002-07-31 00:22:14


-----Original Message-----
From: Ullrich von Bassewitz <uz_at_musoftware.de>
Date: Monday, July 29, 2002 02:28 AM
>
> On Fri, Jul 26, 2002 at 11:56:51PM +0200, groepaz wrote:
>
> > BTW!  I tried compiling with an oldish mingw32 install, as well (cygwin-
> > compiled binaries are kinda sloooooooow ;=P), and noticed that
> > somewhere the code relies on fork() and friends, and maybe some other
> > things used to spawn a sub-process in *nix.  Is there a way to
> > compile the source for a target that has simple "spawn..." functions
> > but no fork() already?
>
> The Windows version uses spawn() from it's own library.  The unix version has
> an additional module that implements spawn().

Cl65 uses fork()...exec() or spawn() to run the other tools.  A preprocessor #if
directive in "cc65/src/cl65/main.c" chooses between <process.h> [for the
system's spawn()] and "spawn.h" [for CC65's spawn()].  But, a choice is not done
in the make-file -- it always links "spawn-unix.o"!  Try removing that line from
the make-file.

By the way, Uz, that "main.c" file needs three patches:

1) Add "defined(_DJGPP_)" to that #if.

2) Merge "spawn.h" into the "spawn-*.c" files, then #include those C files,
   instead of linking an object file.

3) Add an #ifdef directive that will choose which "spawn-*.c" file to #include.

----------------------------------------------------------------------
To unsubscribe from the list send mail to majordomo_at_musoftware.de with
the string "unsubscribe cc65" in the body(!) of the mail.


Date view Thread view Subject view

This archive was generated by hypermail 2.1.3 : 2002-07-31 00:23:21 CEST