Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
CMake
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Mattias Ellert
CMake
Commits
d0ff3e70
Commit
d0ff3e70
authored
8 years ago
by
Brad King
Browse files
Options
Downloads
Patches
Plain Diff
librhash: Port to KWIML for ABI and integer type information
parent
465a85fb
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
Utilities/cmlibrhash/librhash/byte_order.h
+3
-17
3 additions, 17 deletions
Utilities/cmlibrhash/librhash/byte_order.h
Utilities/cmlibrhash/librhash/ustd.h
+25
-23
25 additions, 23 deletions
Utilities/cmlibrhash/librhash/ustd.h
with
28 additions
and
40 deletions
Utilities/cmlibrhash/librhash/byte_order.h
+
3
−
17
View file @
d0ff3e70
...
...
@@ -4,10 +4,6 @@
#include
"ustd.h"
#include
<stdlib.h>
#ifdef __GLIBC__
# include <endian.h>
#endif
#ifdef __cplusplus
extern
"C"
{
#endif
...
...
@@ -32,22 +28,12 @@ extern "C" {
/* detect CPU endianness */
#if (defined(__BYTE_ORDER) && defined(__LITTLE_ENDIAN) && \
__BYTE_ORDER == __LITTLE_ENDIAN) || \
defined(CPU_IA32) || defined(CPU_X64) || \
defined(__ia64) || defined(__ia64__) || defined(__alpha__) || defined(_M_ALPHA) || \
defined(vax) || defined(MIPSEL) || defined(_ARM_) || defined(__arm__)
#include
<cm_kwiml.h>
#if KWIML_ABI_ENDIAN_ID == KWIML_ABI_ENDIAN_ID_LITTLE
# define CPU_LITTLE_ENDIAN
# define IS_BIG_ENDIAN 0
# define IS_LITTLE_ENDIAN 1
#elif (defined(__BYTE_ORDER) && defined(__BIG_ENDIAN) && \
__BYTE_ORDER == __BIG_ENDIAN) || \
defined(__sparc) || defined(__sparc__) || defined(sparc) || \
defined(_ARCH_PPC) || defined(_ARCH_PPC64) || defined(_POWER) || \
defined(__POWERPC__) || defined(POWERPC) || defined(__powerpc) || \
defined(__powerpc__) || defined(__powerpc64__) || defined(__ppc__) || \
defined(__hpux) || defined(_MIPSEB) || defined(mc68000) || \
defined(__s390__) || defined(__s390x__) || defined(sel)
#elif KWIML_ABI_ENDIAN_ID == KWIML_ABI_ENDIAN_ID_BIG
# define CPU_BIG_ENDIAN
# define IS_BIG_ENDIAN 1
# define IS_LITTLE_ENDIAN 0
...
...
This diff is collapsed.
Click to expand it.
Utilities/cmlibrhash/librhash/ustd.h
+
25
−
23
View file @
d0ff3e70
...
...
@@ -9,29 +9,31 @@
# pragma warning(push,1)
#endif
#i
f _MSC_VER >= 1300
#i
nclude
<cm_kwiml.h>
# define int64_t __int64
# define int32_t __int32
# define int16_t __int16
# define int8_t __int8
# define uint64_t unsigned __int64
# define uint32_t unsigned __int32
# define uint16_t unsigned __int16
# define uint8_t unsigned __int8
/* disable warnings: The POSIX name for this item is deprecated. Use the ISO C++ conformant name. */
#pragma warning(disable : 4996)
#else
/* _MSC_VER >= 1300 */
# include <stdint.h>
# include <unistd.h>
#endif
/* _MSC_VER >= 1300 */
#if _MSC_VER <= 1300
# include <stdlib.h>
/* size_t for vc6.0 */
#endif
/* _MSC_VER <= 1300 */
#ifndef KWIML_INT_HAVE_INT64_T
# define int64_t KWIML_INT_int64_t
#endif
#ifndef KWIML_INT_HAVE_INT32_T
# define int32_t KWIML_INT_int32_t
#endif
#ifndef KWIML_INT_HAVE_INT16_T
# define int16_t KWIML_INT_int16_t
#endif
#ifndef KWIML_INT_HAVE_INT8_T
# define int8_t KWIML_INT_int8_t
#endif
#ifndef KWIML_INT_HAVE_UINT64_T
# define uint64_t KWIML_INT_uint64_t
#endif
#ifndef KWIML_INT_HAVE_UINT32_T
# define uint32_t KWIML_INT_uint32_t
#endif
#ifndef KWIML_INT_HAVE_UINT16_T
# define uint16_t KWIML_INT_uint16_t
#endif
#ifndef KWIML_INT_HAVE_UINT8_T
# define uint8_t KWIML_INT_uint8_t
#endif
#endif
/* LIBRHASH_USTD_H */
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment