Skip to content

File platform.h

Headers > cais > platform.h

Go to the source code of this file

  • #include <cais/types.h>
  • #include <stddef.h>
  • #include <stdlib.h>
  • #include <string.h>

Functions

Type Name
const char * cais_platform_arch (void)
int cais_platform_bits (void)
const char * cais_platform_endian (void)
const char * cais_platform_os (void)
CAIS_UNUSED_FN CAIS_INLINE char * cais_strdup (const char * s)

Static Functions

Type Name
const char * cais_detect_endianness (void)

Macros

Type Name
define CAIS_ARCH_NAME "unknown"
define CAIS_ARCH_UNKNOWN 1
define CAIS_BITS 32
define CAIS_CC_NAME "unknown"
define CAIS_CC_UNKNOWN 1
define CAIS_GET_ENDIAN_NAME () [**cais\_detect\_endianness**](platform_8h.md#function-cais_detect_endianness)()
define CAIS_INLINE static
define CAIS_IS_16BIT ([**CAIS\_BITS**](platform_8h.md#define-cais_bits) == 16)
define CAIS_IS_32BIT ([**CAIS\_BITS**](platform_8h.md#define-cais_bits) == 32)
define CAIS_IS_64BIT ([**CAIS\_BITS**](platform_8h.md#define-cais_bits) == 64)
define CAIS_IS_AMIGA 0
define CAIS_IS_AMIGAOS4 0
define CAIS_IS_AMIGA_CLASSIC 0
define CAIS_IS_AROS 0
define CAIS_IS_ATARIST 0
define CAIS_IS_BEOS 0
define CAIS_IS_BIG_ENDIAN ([**cais\_detect\_endianness**](platform_8h.md#function-cais_detect_endianness)()[0] == 'b')
define CAIS_IS_BSD 0
define CAIS_IS_DARWIN 0
define CAIS_IS_DOS 0
define CAIS_IS_FREEBSD 0
define CAIS_IS_GENERIC_UNIX 0
define CAIS_IS_HAIKU 0
define CAIS_IS_KOLIBRI 0
define CAIS_IS_LINUX 0
define CAIS_IS_LITTLE_ENDIAN ([**cais\_detect\_endianness**](platform_8h.md#function-cais_detect_endianness)()[0] == 'l')
define CAIS_IS_MAC68K 0
define CAIS_IS_MINIX 0
define CAIS_IS_NETBSD 0
define CAIS_IS_OPENBSD 0
define CAIS_IS_OS2 0
define CAIS_IS_PLAN9 0
define CAIS_IS_POSIX 0
define CAIS_IS_SOLARIS 0
define CAIS_IS_UNKNOWN 1
define CAIS_IS_WASI 0
define CAIS_IS_WINDOWS 0
define CAIS_IS_WINDOWS_CE 0
define CAIS_IS_WINDOWS_NT 0
define CAIS_IS_X68K 0
define CAIS_OS_NAME "unknown"
define CAIS_UNUSED (x) ((void)(x))
define CAIS_UNUSED_FN
define safe_strdup [**cais\_strdup**](platform_8h.md#function-cais_strdup)

Function Details

cais_platform_arch

const char * cais_platform_arch (
    void
) 

cais_platform_bits

int cais_platform_bits (
    void
) 

cais_platform_endian

const char * cais_platform_endian (
    void
) 

cais_platform_os

const char * cais_platform_os (
    void
) 

cais_strdup

CAIS_UNUSED_FN  CAIS_INLINE char * cais_strdup (
    const char * s
) 

Static Function Details

cais_detect_endianness

static const char * cais_detect_endianness (
    void
) 

Macro Details

CAIS_ARCH_NAME

#define CAIS_ARCH_NAME `"unknown"`

CAIS_ARCH_UNKNOWN

#define CAIS_ARCH_UNKNOWN `1`

CAIS_BITS

#define CAIS_BITS `32`

CAIS_CC_NAME

#define CAIS_CC_NAME `"unknown"`

CAIS_CC_UNKNOWN

#define CAIS_CC_UNKNOWN `1`

CAIS_GET_ENDIAN_NAME

#define CAIS_GET_ENDIAN_NAME (

) `cais_detect_endianness ()`

CAIS_INLINE

#define CAIS_INLINE `static`

CAIS_IS_16BIT

#define CAIS_IS_16BIT `( CAIS_BITS == 16)`

CAIS_IS_32BIT

#define CAIS_IS_32BIT `( CAIS_BITS == 32)`

CAIS_IS_64BIT

#define CAIS_IS_64BIT `( CAIS_BITS == 64)`

CAIS_IS_AMIGA

#define CAIS_IS_AMIGA `0`

CAIS_IS_AMIGAOS4

#define CAIS_IS_AMIGAOS4 `0`

CAIS_IS_AMIGA_CLASSIC

#define CAIS_IS_AMIGA_CLASSIC `0`

CAIS_IS_AROS

#define CAIS_IS_AROS `0`

CAIS_IS_ATARIST

#define CAIS_IS_ATARIST `0`

CAIS_IS_BEOS

#define CAIS_IS_BEOS `0`

CAIS_IS_BIG_ENDIAN

#define CAIS_IS_BIG_ENDIAN `( cais_detect_endianness ()[0] == 'b')`

CAIS_IS_BSD

#define CAIS_IS_BSD `0`

CAIS_IS_DARWIN

#define CAIS_IS_DARWIN `0`

CAIS_IS_DOS

#define CAIS_IS_DOS `0`

CAIS_IS_FREEBSD

#define CAIS_IS_FREEBSD `0`

CAIS_IS_GENERIC_UNIX

#define CAIS_IS_GENERIC_UNIX `0`

CAIS_IS_HAIKU

#define CAIS_IS_HAIKU `0`

CAIS_IS_KOLIBRI

#define CAIS_IS_KOLIBRI `0`

CAIS_IS_LINUX

#define CAIS_IS_LINUX `0`

CAIS_IS_LITTLE_ENDIAN

#define CAIS_IS_LITTLE_ENDIAN `( cais_detect_endianness ()[0] == 'l')`

CAIS_IS_MAC68K

#define CAIS_IS_MAC68K `0`

CAIS_IS_MINIX

#define CAIS_IS_MINIX `0`

CAIS_IS_NETBSD

#define CAIS_IS_NETBSD `0`

CAIS_IS_OPENBSD

#define CAIS_IS_OPENBSD `0`

CAIS_IS_OS2

#define CAIS_IS_OS2 `0`

CAIS_IS_PLAN9

#define CAIS_IS_PLAN9 `0`

CAIS_IS_POSIX

#define CAIS_IS_POSIX `0`

CAIS_IS_SOLARIS

#define CAIS_IS_SOLARIS `0`

CAIS_IS_UNKNOWN

#define CAIS_IS_UNKNOWN `1`

CAIS_IS_WASI

#define CAIS_IS_WASI `0`

CAIS_IS_WINDOWS

#define CAIS_IS_WINDOWS `0`

CAIS_IS_WINDOWS_CE

#define CAIS_IS_WINDOWS_CE `0`

CAIS_IS_WINDOWS_NT

#define CAIS_IS_WINDOWS_NT `0`

CAIS_IS_X68K

#define CAIS_IS_X68K `0`

CAIS_OS_NAME

#define CAIS_OS_NAME `"unknown"`

CAIS_UNUSED

#define CAIS_UNUSED (
    x
) `((void)(x))`

CAIS_UNUSED_FN

#define CAIS_UNUSED_FN 

safe_strdup

#define safe_strdup `cais_strdup`


The documentation was generated from the following file: include/cais/platform.h