rlib
Convenience library for useful things
Loading...
Searching...
No Matches
Build configuration and platform

Compile-time feature, architecture, OS and ABI macros resolved at configure time and emitted into the build-generated rlib/rconfig.h. More...

Optional subsystems

Defined when the corresponding subsystem was compiled in.

#define RLIB_HAVE_THREADS
 Threads, mutexes and TLS are available.
 
#define RLIB_HAVE_MODULES
 Dynamic module loading is available.
 
#define RLIB_HAVE_SIGNALS
 Signal timers are available.
 
#define RLIB_HAVE_FILES
 File and filesystem APIs are available.
 
#define RLIB_HAVE_SOCKETS
 Socket and networking APIs are available.
 
#define RLIB_HAVE_ALLOCA_H
 <alloca.h> is present on the host.
 

Target architecture

Exactly one is defined, for the architecture being built.

#define R_ARCH_X86
 Targeting 32-bit x86.
 
#define R_ARCH_X86_64
 Targeting 64-bit x86-64.
 
#define R_ARCH_IA64
 Targeting Itanium (IA-64).
 
#define R_ARCH_ARM
 Targeting 32-bit ARM.
 
#define R_ARCH_THUMB
 Targeting ARM Thumb.
 
#define R_ARCH_AARCH64
 Targeting 64-bit ARM (AArch64).
 
#define R_ARCH_SPARC
 Targeting SPARC.
 
#define R_ARCH_XTENSA
 Targeting Xtensa.
 

Target operating system

Defined for the OS being built; R_OS_UNIX also covers the Unix-like family (Linux / BSD / Darwin).

#define R_OS_BARE_METAL
 Targeting a bare-metal / no-OS environment.
 
#define R_OS_WIN32
 Targeting Windows.
 
#define R_OS_UNIX
 Targeting a Unix-like OS.
 
#define R_OS_LINUX
 Targeting Linux.
 
#define R_OS_BSD
 Targeting a BSD.
 
#define R_OS_DARWIN
 Targeting macOS / Darwin.
 
#define R_OS_RTEMS
 Targeting RTEMS.
 

Type sizes (bytes)

#define RLIB_SIZEOF_VOID_P   8
 sizeof(void*) on the host.
 
#define RLIB_SIZEOF_INT   4
 sizeof(int) on the host.
 
#define RLIB_SIZEOF_LONG   8
 sizeof(long) on the host.
 
#define RLIB_SIZEOF_INTMAX   8
 sizeof(rintmax) on the host.
 
#define RLIB_SIZEOF_SIZE_T   8
 sizeof(rsize) on the host.
 

getaddrinfo hint flags

Mirror the platform's AI_* constants for DNS resolution.

#define R_AI_PASSIVE
 Address is intended for bind (passive socket).
 
#define R_AI_CANONNAME
 Request the canonical host name.
 
#define R_AI_NUMERICHOST
 Treat the host string as a numeric address only.
 
#define R_AI_V4MAPPED
 Return IPv4-mapped IPv6 addresses if no IPv6 found.
 
#define R_AI_ALL
 Return both IPv6 and IPv4-mapped addresses.
 
#define R_AI_ADDRCONFIG
 Only return families configured on the host.
 

Detailed Description

Compile-time feature, architecture, OS and ABI macros resolved at configure time and emitted into the build-generated rlib/rconfig.h.

The R_OS_* / R_ARCH_* macros are defined only for the target being built (test with #ifdef); the RLIB_HAVE_* flags report which optional subsystems were compiled in; the RLIB_SIZEOF_* macros give the host's type widths in bytes; and the R_AI_* macros mirror the platform's getaddrinfo hint flags.