This is the mail archive of the cygwin@sources.redhat.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]

Possible bug: gamma function missing global variable in libm


I have been attempting to use the gamma functions
in libm. The following program does not compile:

/*** test1.c ****/
#include <stdlib.h>
#include <math.h>

int main(void)
{
    signgam = 0;
    exit(0);
}

gcc test1.c -lm        

$ gcc test1.c -lm
/c/TEMP/ccQLwcGF.o(.text+0xd):test1.c: undefined reference to `signgam'
collect2: ld returned 1 exit status

 Signgam is a global variable required for
the gamma functions. In the cygwin math.h:

$ grep signgam math.h

math.h:/* The gamma functions use a global variable, signgam.  */
math.h:extern int signgam;

It must be  missing from libm.
This program compiles without difficulty with gcc under Solaris.

Thanks,

Charles




--
Want to unsubscribe from this list?
Send a message to cygwin-unsubscribe@sourceware.cygnus.com


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