Menu

#36 VOS: big/little endian auto detection does not work in any environment

1.2.0.0
closed
mike
None
2014-07-14
2014-04-28
mike
No

The big/little endianess setting of the individual target (implemented in vos_utils.c) does not work in any target environment:

The following list of defines needs to be evaluated as true by the preprocessor in order to get a big endian target to be correctly recognized:
BIG_ENDIAN || ARMEB || AARCH64EB || MIPSEB

The drawback is, that not all compilers define such macros.

An always clean solution would be, that the compiler settings per platform contain for instance a directive -DBIGENDIAN or -DLITTLEENDIAN

Related

Tickets: #63

Discussion

  • Armin-Hagen Weiss

    • status: open --> accepted
    • assigned_to: mike
     
  • mike

    mike - 2014-07-11

    I will change config files in the config directory and change the detection implementation to force the definition of endianess by having a compile time error thrown

     
  • mike

    mike - 2014-07-14

    Put in solution outlined on page [Endianess] as [r1261]

     

    Related

    Commit: [r1261]
    Wiki: Endianess

  • mike

    mike - 2014-07-14
    • status: accepted --> closed
     

Log in to post a comment.

MongoDB Logo MongoDB