This is the mail archive of the cygwin@cygwin.com mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: compile, logrotate, isblank, NT4.0, failed


Ok here is what I've found :) Or actually did not
found :) I looked in the CVS both winsup and 
newlib projects but did not find the header file 
which actually contains the prototype of the 
fchdir function, although I've found prototype
for chdir. I state that because this explains the
problem you're experiencing - chdir's prototype
is expanded by a macro which in case of cygwin
system will prepend the __cdecl before the prototype -
this will prepend an underscore in the output object
file so the call to chdir will properly be translated
to _chdir in the object file. Now you problem is that
there is nothing like this for the fchdir function and
in the output you get just fchdir instead of _fchdir.
So you can add in config.c something like this to
fix the problem

extern "C" int fchdir(int desc);
or change all calls to fchdir (3 of them) to _fchdir :)

to cygwin maintainers:

maybe this should be added to newlib/libc/include/sys/unistd.h
int _EXFUN(fchdir, (int desc ));

Erik Bak-Mikkelsen wrote:

[ snip ]
> 
> OK, that I can handle. Please, also note the missing fchdir below.
> The archives states a lot about fchdir. Please, what could I do regarding fchdir?
> >
> > Erik Bak-Mikkelsen wrote:
> > >
> > > /cygdrive/d/logrotate-3.3/config.c:179: undefined reference to `fchdir'
> > > /cygdrive/d/logrotate-3.3/config.c:199: undefined reference to `fchdir'
> > > /cygdrive/d/logrotate-3.3/config.c:209: undefined reference to `fchdir'
> > > config.o: In function `readConfigFile':
> > > /cygdrive/d/logrotate-3.3/config.c:299: undefined reference to `isblank'
> > > /cygdrive/d/logrotate-3.3/config.c:313: undefined reference to `isblank'
> 
> --
> Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
> Bug reporting:         http://cygwin.com/bugs.html
> Documentation:         http://cygwin.com/docs.html
> FAQ:                   http://cygwin.com/faq/

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Bug reporting:         http://cygwin.com/bugs.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]