delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2001/06/14/13:14:48

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: <3B28F0D4.9F0F2FCB@cygnus.com>
Date: Thu, 14 Jun 2001 13:13:56 -0400
From: "J. Johnston" <jjohnstn AT cygnus DOT com>
Organization: Red Hat Inc.
X-Mailer: Mozilla 4.77 [en] (X11; U; Linux 2.4.2-2smp i686)
X-Accept-Language: en
MIME-Version: 1.0
To: "Larry Hall (RFK Partners, Inc)" <lhall AT rfk DOT com>
CC: Frank Wuebbeling <wuebbel AT math DOT uni-muenster DOT de>, newlib AT sources DOT redhat DOT com,
cygwin AT cygwin DOT com
Subject: Re: 1.3.2: signgam problem still present in plotutils, gnuplotetc.
References: <000201c0f363$01992720$0100a8c0 AT duron>
<20010612143708 DOT A413 AT redhat DOT com>
<002301c0f376$e165a780$0100a8c0 AT duron>
<20010612195312 DOT B2062 AT redhat DOT com>
<3B27D692 DOT AFA9BE8E AT cygnus DOT com>
<001101c0f4a2$9dc0a020$0100a8c0 AT duron> <4 DOT 3 DOT 1 DOT 2 DOT 20010614122043 DOT 020e94a0 AT pop DOT ma DOT ultranet DOT com>

"Larry Hall (RFK Partners, Inc)" wrote:
> 
> At 12:12 PM 6/14/2001, J. Johnston wrote:
> >Frank Wuebbeling wrote:
> > >
> > > Hi,
> > >
> > > > Newlib changed math.h in January to have an errno-like solution for
> > > signgam whereby a function gets
> > > > called.  Is math.h up to date in the user's Cygwin and is it being
> > > included by the source code in
> > > > question?
> > >
> > > Ok. The change to math.h produces my problem, I think. I have a fairly
> > > recent system, that has been updated using cygwin's setup last week. I'll
> > > try to illustrate my problem. Here's the shortest code I can come up with:
> > >
> > > #include "math.h"
> > > main()
> > > {
> > >  double a=signgam;
> > > }
> > >
> > > Use "cc x.c -lm" to compile it. Works without problems on LINUX, for
> > > example. CYGWIN, in the version I have, gives:
> > >
> > > wuebbel% cc x.c -lm
> > > /c/FENSTER/TEMP/ccKdCoNl.o(.text+0xc):x.c: undefined reference to
> > > `__signgam'
> > > collect2: ld returned 1 exit status
> > >
> >
> >Ok, Frank, I know the problem.  Add -lc to your compile.  The signgam function was placed in the
> >libc library, not libm.
> >
> >-- Jeff J.
> 
> For Cygwin, that's not the problem.  libm == libc == libcygwin.  Since
> libcygwin is linked by default, there is no need to specify any of these
> really.  So the problem and solution is as Frank subsequently describes
> it.
>

My mistake.  It appears that Cygwin has not exported __signgam yet.  This ultimately needs to be
fixed.

-- Jeff J.

> > > That's because *my* math.h contains the lines:
> > >
> > > #ifndef _REENT_ONLY
> > > #define signgam (*__signgam())
> > > extern int *__signgam _PARAMS((void));
> > > #endif /* ! defined (_REENT_ONLY) */
> > >
> > > ...but __signgam is never defined anywhere in the math library. The posting
> > > I referred to recommended replacing the lines in question in math.h by
> > >
> > > extern __IMPORT struct _reent reent_data;
> > > #define signgam reent_data._new._reent._gamma_signgam
> > >
> > > which solved my problem. If my math.h is old, then for some reason it's not
> > > updated by the cygwin setup.
> > >
> 
> <snip>
> 
> Larry Hall                              lhall AT rfk DOT com
> RFK Partners, Inc.                      http://www.rfk.com
> 118 Washington Street                   (508) 893-9779 - RFK Office
> Holliston, MA 01746                     (508) 893-9889 - FAX

--
Want to unsubscribe from this list?
Check out: http://cygwin.com/ml/#unsubscribe-simple

- Raw text -


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