delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2001/10/15/06:43:10

Mailing-List: contact cygwin-help AT sourceware DOT cygnus DOT com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe AT sources DOT redhat DOT com>
List-Archive: <http://sources.redhat.com/ml/cygwin/>
List-Post: <mailto:cygwin AT sources DOT redhat DOT com>
List-Help: <mailto:cygwin-help AT sources DOT redhat DOT com>, <http://sources.redhat.com/ml/#faqs>
Sender: cygwin-owner AT sources DOT redhat DOT com
Delivered-To: mailing list cygwin AT sources DOT redhat DOT com
Message-ID: <3BCABDA5.35CE872D@syntrex.com>
Date: Mon, 15 Oct 2001 12:42:45 +0200
From: Pavel Tsekov <ptsekov AT syntrex DOT 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 AT oss DOT dk>
CC: cygwin AT cygwin DOT com
Subject: Re: compile, logrotate, isblank, NT4.0, failed
References: <20011015102711 DOT A6124 AT mdve DOT oss DOT dk> <3BCAA07A DOT B89E54B8 AT syntrex DOT com> <20011015111511 DOT A7005 AT mdve DOT oss DOT dk>

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/

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019