[En-Nut-Discussion] PATCH: build fixes for MacOSX native
Matthias Ringwald
mringwal at inf.ethz.ch
Thu Mar 24 15:50:13 CET 2005
Hi Bernardo
thank you for your patches.
I've added the pattern rules for Makerules.unix-gcc
and fixed the unistd.h issue using macros to rename
the nut/os unistd functions to NUT_ ...
On 17.03.2005, at 05:32, Bernardo Innocenti wrote:
>
> - in my opinion, all the pattern rules in Makerules.*
> should be written as "%.o : %.c" rather than "%o : %c",
> otherwise they don't replace the builtin pattern rules
> of GNU make;
Hm. On my machine, everything is build (using Nut/OS
headers, so the custom rules are used). Do you have
problems with this on your machine ?
But another question:
What are those other fixes for ?
On my mac os x I run configure ; make without problems.
Matthias
>
> Index: fs/pnutfs.c
> ===================================================================
> RCS file: /cvs/bakeoven/bakeoven/fs/pnutfs.c,v
> retrieving revision 1.1
> retrieving revision 1.2
> diff -u -p -r1.1 -r1.2
> --- fs/pnutfs.c 17 Mar 2005 04:00:26 -0000 1.1
> +++ fs/pnutfs.c 17 Mar 2005 04:05:50 -0000 1.2
> @@ -1253,7 +1253,7 @@ static int PnutInit(NUTDEVICE * dev)
> }
> /* Initialize the root directory. */
> - if ((root = PnutNodeAlloc(NODETYPE_DIR)) == -1) {
> + if ((root = PnutNodeAlloc(NODETYPE_DIR)) == (u_short)-1) {
> rc = ENOSPC;
> } else {
> if ((rc = PnutDirAddEntry(root, ".", root)) == 0) {
> Index: app/tcps/tcps.c
> ===================================================================
> RCS file: /cvs/bakeoven/bakeoven/app/tcps/tcps.c,v
> retrieving revision 1.1.1.1
> diff -u -p -u -p -r1.1.1.1 tcps.c
> --- app/tcps/tcps.c 17 Mar 2005 04:00:26 -0000 1.1.1.1
> +++ app/tcps/tcps.c 16 Mar 2005 18:53:40 -0000
> @@ -191,7 +191,7 @@ void ProcessRequests(FILE * stream)
> fputs("\tSleep\t", stream);
> break;
> }
> - fprintf(stream, "%u\t%u", tdp->td_priority, (u_short)
> tdp->td_sp - (u_short) tdp->td_memory);
> + fprintf(stream, "%u\t%u", tdp->td_priority, (unsigned
> int) tdp->td_sp - (unsigned int) tdp->td_memory);
> if (*((u_long *) tdp->td_memory) != DEADBEEF)
> fputs("\tCorrupted\t", stream);
> else
>
> --
More information about the En-Nut-Discussion
mailing list