libvxc: 64-bit and new gcc fixes - vx32 - Local 9vx git repository for patches.
       
 (DIR) Log
 (DIR) Files
 (DIR) Refs
       ---
 (DIR) commit 1d4f2da2e3f7c05184b78e804a2c7ab9365c5282
 (DIR) parent 1626c6776939418faecdbf938463a525e643b131
 (HTM) Author: Russ Cox <rsc@swtch.com>
       Date:   Sun,  7 Dec 2008 20:17:06 -0800
       
       libvxc: 64-bit and new gcc fixes
       
       Diffstat:
         src/libvxc/Makefrag                 |       1 +
         src/libvxc/msun/sincos.c            |      12 ++++++++++++
         src/libvxc/msun/sincosf.c           |      12 ++++++++++++
         src/libvxc/strftime.c               |       2 +-
       
       4 files changed, 26 insertions(+), 1 deletion(-)
       ---
 (DIR) diff --git a/src/libvxc/Makefrag b/src/libvxc/Makefrag
       @@ -285,6 +285,7 @@ CLIB_OBJS = \
                        w_y0.o                w_y0f.o                \
                        w_y1.o                w_y1f.o                \
                        w_yn.o                w_ynf.o                \
       +                sincos.o        sincosf.o \
                )
        
        # Use these optimized transcendental math library functions
 (DIR) diff --git a/src/libvxc/msun/sincos.c b/src/libvxc/msun/sincos.c
       @@ -0,0 +1,12 @@
       +// written by russ cox rsc@swtch.com 2008/12/07.
       +// gcc 4.3.2 collapses calls to sin and cos with same arg
       +// to a single call to sincos when compiling -O2
       +
       +extern double sin(double x);
       +extern double cos(double x);
       +void
       +sincos(double x, double *s, double *c)
       +{
       +        *s = sin(x);
       +        *c = cos(x);
       +}
 (DIR) diff --git a/src/libvxc/msun/sincosf.c b/src/libvxc/msun/sincosf.c
       @@ -0,0 +1,12 @@
       +// written by russ cox rsc@swtch.com 2008/12/07.
       +// gcc 4.3.2 collapses calls to sin and cos with same arg
       +// to a single call to sincos when compiling -O2
       +
       +extern float sinf(float x);
       +extern float cosf(float x);
       +void
       +sincosf(float x, float *s, float *c)
       +{
       +        *s = sinf(x);
       +        *c = cosf(x);
       +}
 (DIR) diff --git a/src/libvxc/strftime.c b/src/libvxc/strftime.c
       @@ -116,7 +116,7 @@ size_t strftime(char  *buf, size_t maxsize, const char *fmt, const struct tm *tm
                                sprintf(tmp, "%02d", tm->tm_sec);
                                break;
                        case 's':
       -                        sprintf(tmp, "%d", mktime(tm));
       +                        sprintf(tmp, "%d", (int)mktime(tm));
                                break;
                        case 'T':
                                strftime(tmp, sizeof tmp, "%H:%M:%S", tm);