Ignore:
Timestamp:
2008-04-03T20:46:47Z (17 years ago)
Author:
Jakub Jermar <jakub@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
12ab886
Parents:
5d494b3
Message:

Replace all endian.h in uspace with a copy of the kernel's respective byteorder.h.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/lib/softfloat/include/sftypes.h

    r5d494b3 r776f2e6  
    3636#define __SFTYPES_H__
    3737
    38 #include <endian.h>
     38#include <byteorder.h>
    3939#include <stdint.h>
    4040
     
    4444
    4545        struct  {
    46                 #if __BYTE_ORDER == __BIG_ENDIAN
     46#if defined(ARCH_IS_BIG_ENDIAN)
    4747                uint32_t sign:1;
    4848                uint32_t exp:8;
    4949                uint32_t fraction:23;
    50                 #elif __BYTE_ORDER == __LITTLE_ENDIAN
     50#elif defined(ARCH_IS_LITTLE_ENDIAN)
    5151                uint32_t fraction:23;
    5252                uint32_t exp:8;
    5353                uint32_t sign:1;
    54                 #else
    55                         #error "Unknown endians."
    56                 #endif
     54#else
     55#error "Unknown endians."
     56#endif
    5757                } parts __attribute__ ((packed));
    5858        } float32;
     
    6363       
    6464        struct  {
    65                 #if __BYTE_ORDER == __BIG_ENDIAN
     65#if defined(ARCH_IS_BIG_ENDIAN)
    6666                uint64_t sign:1;
    6767                uint64_t exp:11;
    6868                uint64_t fraction:52;
    69                 #elif __BYTE_ORDER == __LITTLE_ENDIAN
     69#elif defined(ARCH_IS_LITTLE_ENDIAN)
    7070                uint64_t fraction:52;
    7171                uint64_t exp:11;
    7272                uint64_t sign:1;
    73                 #else
    74                         #error "Unknown endians."
    75                 #endif
     73#else
     74#error "Unknown endians."
     75#endif
    7676                } parts __attribute__ ((packed));
    7777        } float64;
     
    8282#define FLOAT64_MIN
    8383
    84 /* For recognizing NaNs or infinity use isFloat32NaN and is Float32Inf, comparing with this constants is not sufficient */
     84/*
     85 * For recognizing NaNs or infinity use isFloat32NaN and is Float32Inf,
     86 * comparing with these constants is not sufficient.
     87 */
    8588#define FLOAT32_NAN 0x7FC00001
    8689#define FLOAT32_SIGNAN 0x7F800001
Note: See TracChangeset for help on using the changeset viewer.