Mailing-List: contact cygwin-help@sourceware.cygnus.com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe@sources.redhat.com>
List-Archive: <http://sources.redhat.com/ml/cygwin/>
List-Post: <mailto:cygwin@sources.redhat.com>
List-Help: <mailto:cygwin-help@sources.redhat.com>, <http://sources.redhat.com/ml/#faqs>
Sender: cygwin-owner@sources.redhat.com
Delivered-To: mailing list cygwin@sources.redhat.com
Message-ID: <3BCABDA5.35CE872D@syntrex.com>
Date: Mon, 15 Oct 2001 12:42:45 +0200
From: Pavel Tsekov <ptsekov@syntrex.com>
Organization: Syntrex Inc.
X-Mailer: Mozilla 4.76 [en] (X11; U; Linux 2.4.2-2 i686)
X-Accept-Language: en
MIME-Version: 1.0
To: Erik Bak-Mikkelsen <ebm@oss.dk>
CC: cygwin@cygwin.com
Subject: Re: compile, logrotate, isblank, NT4.0, failed
References: <20011015102711.A6124@mdve.oss.dk> <3BCAA07A.B89E54B8@syntrex.com> <20011015111511.A7005@mdve.oss.dk>
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit

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/

