rudolf | 4 May 2012 20:49
Picon

tgamma(3) from FreeBSD

Hi,

I'd like to use ISO C99 tgamma(3) so I've prepared a patch for import of 
the function from FreeBSD:
http://software.eq.cz/tgamma.diff.txt

I've made the following steps:
- copy b_exp.c, b_log.c, b_tgamma.c s_tgammaf.c, mathimpl.h from FreeBSD 
(http://svnweb.freebsd.org/base/head/lib/msun/bsdsrc/) to src/lib/libm/src/
- comment out __FBSDID and add __RCSID in the imported files
- adjust path to math_private.h in mathimpl.h
- b_exp.c: use "static const double" instead of "const static double"
- add b_exp.c b_log.c b_tgamma.c s_tgammaf.c to src/lib/libm/Makefile
   and "mlink" lgamma.3 to tgamma.3, tgammaf.3
- add tgamma and tgammaf to src/include/math.h
- add relevant information from the FreeBSD manpage to lgamma.3

Please let me know if there are any issues with the import, I'd like to 
find this function in the upcoming NetBSD 6.0 release.

Thanks,

r.

Christos Zoulas | 4 May 2012 22:03

Re: tgamma(3) from FreeBSD

In article <4FA4249C.7000708 <at> eq.cz>, rudolf  <netbsd <at> eq.cz> wrote:
>Hi,
>
>I'd like to use ISO C99 tgamma(3) so I've prepared a patch for import of 
>the function from FreeBSD:
>http://software.eq.cz/tgamma.diff.txt
>
>I've made the following steps:
>- copy b_exp.c, b_log.c, b_tgamma.c s_tgammaf.c, mathimpl.h from FreeBSD 
>(http://svnweb.freebsd.org/base/head/lib/msun/bsdsrc/) to src/lib/libm/src/
>- comment out __FBSDID and add __RCSID in the imported files
>- adjust path to math_private.h in mathimpl.h
>- b_exp.c: use "static const double" instead of "const static double"
>- add b_exp.c b_log.c b_tgamma.c s_tgammaf.c to src/lib/libm/Makefile
>   and "mlink" lgamma.3 to tgamma.3, tgammaf.3
>- add tgamma and tgammaf to src/include/math.h
>- add relevant information from the FreeBSD manpage to lgamma.3
>
>Please let me know if there are any issues with the import, I'd like to 
>find this function in the upcoming NetBSD 6.0 release.
>

In b_log.c
	s/static double/static const double/ where appropriate.
	kill _ANSI_SOURCE
In b_tgamma.c
	ansify

mathimpl.h could be absorbed in math_private.h

(Continue reading)

rudolf | 5 May 2012 00:15
Picon

Re: tgamma(3) from FreeBSD

Christos Zoulas wrote:
> In article<4FA4249C.7000708 <at> eq.cz>, rudolf<netbsd <at> eq.cz>  wrote:
[...]
>> http://software.eq.cz/tgamma.diff.txt
[...]
>> Please let me know if there are any issues with the import, I'd like to
>> find this function in the upcoming NetBSD 6.0 release.
>
> In b_log.c
> 	s/static double/static const double/ where appropriate.
> 	kill _ANSI_SOURCE
> In b_tgamma.c
> 	ansify
>
> mathimpl.h could be absorbed in math_private.h

Thanks for your reply. Here is new version:
http://software.eq.cz/tgamma_v2.diff.txt

I've also removed the "#if 0"-ed code 
(http://grok.x12.su/source/xref/freebsd/lib/msun/bsdsrc/b_exp.c#88) and 
s/#include <math.h>/#include "math.h"/. Is it right?

Thanks,

r.

Christos Zoulas | 5 May 2012 00:31

Re: tgamma(3) from FreeBSD

In article <4FA454E4.2010605 <at> eq.cz>, rudolf  <netbsd <at> eq.cz> wrote:
>Christos Zoulas wrote:
>> In article<4FA4249C.7000708 <at> eq.cz>, rudolf<netbsd <at> eq.cz>  wrote:
>[...]
>>> http://software.eq.cz/tgamma.diff.txt
>[...]
>>> Please let me know if there are any issues with the import, I'd like to
>>> find this function in the upcoming NetBSD 6.0 release.
>>
>> In b_log.c
>> 	s/static double/static const double/ where appropriate.
>> 	kill _ANSI_SOURCE
>> In b_tgamma.c
>> 	ansify
>>
>> mathimpl.h could be absorbed in math_private.h
>
>Thanks for your reply. Here is new version:
>http://software.eq.cz/tgamma_v2.diff.txt
>
>I've also removed the "#if 0"-ed code 
>(http://grok.x12.su/source/xref/freebsd/lib/msun/bsdsrc/b_exp.c#88) and 
>s/#include <math.h>/#include "math.h"/. Is it right?
>

Thanks, looks good:
1. Add /* $NetBSD$ */ as the first line in the file
2. function name definitions should start at column 1 as:

type
(Continue reading)

rudolf | 5 May 2012 02:19
Picon

Re: tgamma(3) from FreeBSD

Christos Zoulas wrote:
> In article<4FA454E4.2010605 <at> eq.cz>, rudolf<netbsd <at> eq.cz>  wrote:
[...]
>> http://software.eq.cz/tgamma_v2.diff.txt
[...]
> Thanks, looks good:
> 1. Add /* $NetBSD$ */ as the first line in the file
> 2. function name definitions should start at column 1 as:
[...]
>
> Change those and commit it.

Thanks, here is the last version:
http://software.eq.cz/tgamma_v3.diff.txt

I can't commit it, I have no commit rights. Could you please do it?

Thanks,

r.

Christos Zoulas | 5 May 2012 19:54

Re: tgamma(3) from FreeBSD

In article <4FA47217.2030605 <at> eq.cz>, rudolf  <netbsd <at> eq.cz> wrote:
>Christos Zoulas wrote:
>> In article<4FA454E4.2010605 <at> eq.cz>, rudolf<netbsd <at> eq.cz>  wrote:
>[...]
>>> http://software.eq.cz/tgamma_v2.diff.txt
>[...]
>> Thanks, looks good:
>> 1. Add /* $NetBSD$ */ as the first line in the file
>> 2. function name definitions should start at column 1 as:
>[...]
>>
>> Change those and commit it.
>
>Thanks, here is the last version:
>http://software.eq.cz/tgamma_v3.diff.txt
>
>I can't commit it, I have no commit rights. Could you please do it?
>

Sure thing, many thanks!

christos


Gmane