bug-gnu-utils
[Top][All Lists]
Advanced

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

Re: [Mingw-users] Re: More patch 2.5.9 hacking


From: Manu
Subject: Re: [Mingw-users] Re: More patch 2.5.9 hacking
Date: Sat, 25 Oct 2003 17:29:00 +0200

Eli Zaretskii wrote:
[...]
> I didn't mean to patch the library, I meant to write a substitute for
> it.  For example, you write a function called fixed_mkdir that does
> the right thing with the second argument, then say
>
>   #define mkdir fixed_mkdir
>
> in some header included by all the sources except the one that
> defines fixed_mkdir's code.

I'm missing something or this doesn't work:

I experimentally added "#define mkdir fixed_mkdir" in config.h.
Then:
util.c: In function `makedirs':
util.c:885: too many arguments to function `fixed_mkdir'
make: *** [util.o] Error 1

If I change it to:
"#define mkdir(name, mode) ((fixed_mkdir) (name, mode))",
Then:
gcc -c  -DHAVE_CONFIG_H -Ded_PROGRAM=\"ed\" -I. -I. -g -O2 addext.c
In file included from C:/DEV/MSYS/1.0/mingw/include/unistd.h:9,
                 from addext.c:49:
C:/DEV/MSYS/1.0/mingw/include/io.h:145:39: macro "mkdir" requires 2 arguments, 
but only 1 given
make: *** [addext.o] Error 1

Same problem if I move it to common.h.

Manu.





reply via email to

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