Changeset 3830


Ignore:
Timestamp:
Mar 2, 2014, 12:56:17 AM (11 years ago)
Author:
bird
Message:

Redid cabsl, carg and cargl from scratch so watcom can grok and compile them

Location:
trunk/libc
Files:
3 added
1 deleted
5 edited

Legend:

Unmodified
Added
Removed
  • trunk/libc/include/complex.h

    r2150 r3830  
    4141#endif
    4242
    43 #define complex         _Complex
    44 #define I               _Complex_I
     43#if defined(_MSC_VER) || defined(__WATCOMC__) /* While watcom has _Complex, it causes compiler crashes. */
     44typedef struct __float_complex       { float       __m_Real, __m_Imag; } __float_complex;
     45typedef struct __double_complex      { double      __m_Real, __m_Imag; } __double_complex;
     46typedef struct __long_double_complex { long double __m_Real, __m_Imag; } __long_double_complex;
     47#else
     48# define __float_complex        __float_complex
     49# define __double_complex       __double_complex
     50# define __long_double_complex  __long_double_complex
     51
     52# define complex                _Complex
     53# define I                      _Complex_I
     54#endif
     55
    4556
    4657#include <sys/cdefs.h>
     
    4859__BEGIN_DECLS
    4960
    50 double          cabs(double complex);
    51 float           cabsf(float complex);
    52 double          cimag(double complex);
    53 float           cimagf(float complex);
    54 long double     cimagl(long double complex);
    55 double complex  conj(double complex);
    56 float complex   conjf(float complex);
    57 long double complex
    58                 conjl(long double complex);
    59 double          creal(double complex);
    60 float           crealf(float complex);
    61 long double     creall(long double complex);
     61double          cabs(__double_complex);
     62float           cabsf(__float_complex);
     63double          cimag(__double_complex);
     64float           cimagf(__float_complex);
     65long double     cimagl(__long_double_complex);
     66__double_complex        conj(__double_complex);
     67__float_complex conjf(__float_complex);
     68__long_double_complex
     69                conjl(__long_double_complex);
     70double          creal(__double_complex);
     71float           crealf(__float_complex);
     72long double     creall(__long_double_complex);
    6273
    6374/* bird:  */
    64 long double          cabsl(long double complex);
    65 double complex       cacos(double complex);
    66 float complex        cacosf(float complex);
    67 double complex       cacosh(double complex);
    68 float complex        cacoshf(float complex);
    69 long double complex  cacoshl(long double complex);
    70 long double complex  cacosl(long double complex);
    71 double               carg(double complex);
    72 float                cargf(float complex);
    73 long double          cargl(long double complex);
    74 double complex       casin(double complex);
    75 float complex        casinf(float complex);
    76 double complex       casinh(double complex);
    77 float complex        casinhf(float complex);
    78 long double complex  casinhl(long double complex);
    79 long double complex  casinl(long double complex);
    80 double complex       catan(double complex);
    81 float complex        catanf(float complex);
    82 double complex       catanh(double complex);
    83 float complex        catanhf(float complex);
    84 long double complex  catanhl(long double complex);
    85 long double complex  catanl(long double complex);
    86 double complex       ccos(double complex);
    87 float complex        ccosf(float complex);
    88 double complex       ccosh(double complex);
    89 float complex        ccoshf(float complex);
    90 long double complex  ccoshl(long double complex);
    91 long double complex  ccosl(long double complex);
    92 double complex       cexp(double complex);
    93 float complex        cexpf(float complex);
    94 long double complex  cexpl(long double complex);
    95 double complex       clog(double complex);
    96 float complex        clogf(float complex);
    97 long double complex  clogl(long double complex);
    98 double complex       cpow(double complex, double complex);
    99 float complex        cpowf(float complex, float complex);
    100 long double complex  cpowl(long double complex, long double complex);
    101 double complex       cproj(double complex);
    102 float complex        cprojf(float complex);
    103 long double complex  cprojl(long double complex);
    104 double complex       csin(double complex);
    105 float complex        csinf(float complex);
    106 double complex       csinh(double complex);
    107 float complex        csinhf(float complex);
    108 long double complex  csinhl(long double complex);
    109 long double complex  csinl(long double complex);
    110 double complex       csqrt(double complex);
    111 float complex        csqrtf(float complex);
    112 long double complex  csqrtl(long double complex);
    113 double complex       ctan(double complex);
    114 float complex        ctanf(float complex);
    115 double complex       ctanh(double complex);
    116 float complex        ctanhf(float complex);
    117 long double complex  ctanhl(long double complex);
    118 long double complex  ctanl(long double complex);
     75long double          cabsl(__long_double_complex);
     76__double_complex       cacos(__double_complex);
     77__float_complex        cacosf(__float_complex);
     78__double_complex       cacosh(__double_complex);
     79__float_complex        cacoshf(__float_complex);
     80__long_double_complex  cacoshl(__long_double_complex);
     81__long_double_complex  cacosl(__long_double_complex);
     82double               carg(__double_complex);
     83float                cargf(__float_complex);
     84long double          cargl(__long_double_complex);
     85__double_complex       casin(__double_complex);
     86__float_complex        casinf(__float_complex);
     87__double_complex       casinh(__double_complex);
     88__float_complex        casinhf(__float_complex);
     89__long_double_complex  casinhl(__long_double_complex);
     90__long_double_complex  casinl(__long_double_complex);
     91__double_complex       catan(__double_complex);
     92__float_complex        catanf(__float_complex);
     93__double_complex       catanh(__double_complex);
     94__float_complex        catanhf(__float_complex);
     95__long_double_complex  catanhl(__long_double_complex);
     96__long_double_complex  catanl(__long_double_complex);
     97__double_complex       ccos(__double_complex);
     98__float_complex        ccosf(__float_complex);
     99__double_complex       ccosh(__double_complex);
     100__float_complex        ccoshf(__float_complex);
     101__long_double_complex  ccoshl(__long_double_complex);
     102__long_double_complex  ccosl(__long_double_complex);
     103__double_complex       cexp(__double_complex);
     104__float_complex        cexpf(__float_complex);
     105__long_double_complex  cexpl(__long_double_complex);
     106__double_complex       clog(__double_complex);
     107__float_complex        clogf(__float_complex);
     108__long_double_complex  clogl(__long_double_complex);
     109__double_complex       cpow(__double_complex, __double_complex);
     110__float_complex        cpowf(__float_complex, __float_complex);
     111__long_double_complex  cpowl(__long_double_complex, __long_double_complex);
     112__double_complex       cproj(__double_complex);
     113__float_complex        cprojf(__float_complex);
     114__long_double_complex  cprojl(__long_double_complex);
     115__double_complex       csin(__double_complex);
     116__float_complex        csinf(__float_complex);
     117__double_complex       csinh(__double_complex);
     118__float_complex        csinhf(__float_complex);
     119__long_double_complex  csinhl(__long_double_complex);
     120__long_double_complex  csinl(__long_double_complex);
     121__double_complex       csqrt(__double_complex);
     122__float_complex        csqrtf(__float_complex);
     123__long_double_complex  csqrtl(__long_double_complex);
     124__double_complex       ctan(__double_complex);
     125__float_complex        ctanf(__float_complex);
     126__double_complex       ctanh(__double_complex);
     127__float_complex        ctanhf(__float_complex);
     128__long_double_complex  ctanhl(__long_double_complex);
     129__long_double_complex  ctanl(__long_double_complex);
    119130
    120131/* gnu extensions? */
    121 double complex       clog10(double complex);
    122 float complex        clog10f(float complex);
    123 long double complex  clog10l(long double complex);
     132__double_complex       clog10(__double_complex);
     133__float_complex        clog10f(__float_complex);
     134__long_double_complex  clog10l(__long_double_complex);
    124135__END_DECLS
    125136
  • trunk/libc/src/libc/math/Makefile.kmk

    • Property svn:eol-style set to native
    r2813 r3830  
    3535libc_libc_math_SOURCES = \
    3636    $(PATH_LIBC_SRC)/libc/math/cbrtl.c \
     37    $(PATH_LIBC_SRC)/libc/math/cabsl.c \
     38    $(PATH_LIBC_SRC)/libc/math/carg.c \
     39    $(PATH_LIBC_SRC)/libc/math/cargl.c \
    3740    $(PATH_LIBC_SRC)/libc/math/nan.c \
    3841    $(PATH_LIBC_SRC)/libc/math/nanf.c \
  • trunk/libc/src/libc/math/nan.c

    • Property svn:eol-style set to native
  • trunk/libc/src/libc/math/nanf.c

    • Property svn:eol-style set to native
  • trunk/libc/src/libc/math/nanl.c

    • Property svn:eol-style set to native
Note: See TracChangeset for help on using the changeset viewer.