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: <001101c0f4a2$9dc0a020$0100a8c0@duron>
From: "Frank Wuebbeling" <wuebbel@math.uni-muenster.de>
To: "J. Johnston" <jjohnstn@cygnus.com>, <newlib@sources.redhat.com>
Cc: <cygwin@cygwin.com>
References: <000201c0f363$01992720$0100a8c0@duron> <20010612143708.A413@redhat.com> <002301c0f376$e165a780$0100a8c0@duron> <20010612195312.B2062@redhat.com> <3B27D692.AFA9BE8E@cygnus.com>
Subject: Re: 1.3.2: signgam problem still present in plotutils, gnuplot etc.
Date: Thu, 14 Jun 2001 09:21:18 +0200
MIME-Version: 1.0
Content-Type: text/plain;
	charset="iso-8859-1"
Content-Transfer-Encoding: 7bit
X-Priority: 3
X-MSMail-Priority: Normal
X-Mailer: Microsoft Outlook Express 5.50.4522.1200
X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4522.1200

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

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.

By the way: The page for the patch you applied in January has a reference to
changes in math.h, that I can read. Of course, changes in the lib should go
along with this, but that page is unreachable. Maybe that's why signgam.c
was left out of the compilation?

frank


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

