Displaying 3 results from an estimated 3 matches for "llvm_support_datatypes_h".
2002 Sep 13
2
[LLVMdev] Linux-x86 Compatability
Chris Lattner wrote:
>>>Interesting. INT64_MAX is supposed to be provided by
>>>include/Support/DataTypes.h. Do you know of a reliable preprocessor
>>>symbol that can be used to determine whether we're on a linux box, or
>>>
>>>
>
>
>
>>Well, there is always __linux__, but that doesn't necessarily imply that
>>we
2002 Sep 13
0
[LLVMdev] Linux-x86 Compatability
...MACROS not defined. I think
> the best solution to this problem is to change DataTypes.h to simply:
>
> #define __STDC_LIMIT_MACROS
> #include <inttypes.h>
>
> Which will work on both Linux and Solaris without requiring platform detection.
Ok, how about this:?
#ifndef LLVM_SUPPORT_DATATYPES_H
#define LLVM_SUPPORT_DATATYPES_H
#define __STDC_LIMIT_MACROS 1
#include <inttypes.h>
#ifdef __linux__
#include <endian.h>
#endif
#ifdef __sparc__
#include <sys/types.h>
#ifdef _LITTLE_ENDIAN
#define LITTLE_ENDIAN 1
#endif
#endif
#endif /* LLVM_SUPPORT_DATATYPES_H */
-Chris...
2002 Sep 13
1
[LLVMdev] Linux-x86 Compatability
...ge DataTypes.h to simply:
>>
>> #define __STDC_LIMIT_MACROS
>> #include <inttypes.h>
>>
>>Which will work on both Linux and Solaris without requiring platform detection.
>>
>>
I forgot about endianness.
>Ok, how about this:?
>
>#ifndef LLVM_SUPPORT_DATATYPES_H
>#define LLVM_SUPPORT_DATATYPES_H
>
>#define __STDC_LIMIT_MACROS 1
>#include <inttypes.h>
>
>#ifdef __linux__
>#include <endian.h>
>#endif
>
>#ifdef __sparc__
>#include <sys/types.h>
>#ifdef _LITTLE_ENDIAN
>#define LITTLE_ENDIAN 1
>#endif...