Changeset 3766


Ignore:
Timestamp:
Mar 15, 2012, 12:19:22 PM (13 years ago)
Author:
bird
Message:

Backported r3765: FCW and FSW are 16-bit, not 32-bit, so use 'unsigned short' types instead of 'int'. Fixes #241.

Location:
branches/libc-0.6/src/emx
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • branches/libc-0.6/src/emx/include

  • branches/libc-0.6/src/emx/include/fenv.h

    r2013 r3766  
    3333#include <sys/_types.h>
    3434
    35 /*                   
     35/*
    3636 * To preserve binary compatibility with FreeBSD 5.3, we pack the
    3737 * mxcsr into some reserved fields, rather than changing sizeof(fenv_t).
     
    132132fegetexceptflag(fexcept_t *__flagp, int __excepts)
    133133{
    134         int __mxcsr, __status;
     134        int __mxcsr;
     135        unsigned short __status;
    135136
    136137        __fnstsw(&__status);
     
    149150fetestexcept(int __excepts)
    150151{
    151         int __mxcsr, __status;
     152        int __mxcsr;
     153        unsigned short __status;
    152154
    153155        __fnstsw(&__status);
     
    162164fegetround(void)
    163165{
    164         int __control;
     166        unsigned short __control;
    165167
    166168        /*
     
    177179fesetround(int __round)
    178180{
    179         int __mxcsr, __control;
     181        int __mxcsr;
     182        unsigned short __control;
    180183
    181184        if (__round & ~_ROUND_MASK)
     
    224227fegetexcept(void)
    225228{
    226         int __control;
     229        unsigned short __control;
    227230
    228231        /*
  • branches/libc-0.6/src/emx/src/lib/msun

  • branches/libc-0.6/src/emx/src/lib/msun/i387/fenv.c

    r2016 r3766  
    119119_STD(fegetenv)(fenv_t *envp)
    120120{
    121         int control, mxcsr;
     121        unsigned short control;
     122        int mxcsr;
    122123
    123124        /*
     
    155156_STD(feupdateenv)(const fenv_t *envp)
    156157{
    157         int mxcsr, status;
     158        int mxcsr;
     159        unsigned short status;
    158160
    159161        __fnstsw(&status);
     
    170172__feenableexcept(int mask)
    171173{
    172         int mxcsr, control, omask;
     174        unsigned short control;
     175        int mxcsr, omask;
    173176
    174177        mask &= FE_ALL_EXCEPT;
     
    191194__fedisableexcept(int mask)
    192195{
    193         int mxcsr, control, omask;
     196        unsigned short control;
     197        int mxcsr, omask;
    194198
    195199        mask &= FE_ALL_EXCEPT;
Note: See TracChangeset for help on using the changeset viewer.