xoreos  0.0.5
Macros | Functions
system.h File Reference

Low-level detection of architecture/system properties. More...

#include "src/common/noreturn.h"
#include "src/common/fallthrough.h"
#include <cctype>
#include <cerrno>
#include <climits>
Include dependency graph for system.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Macros

#define PACKED_STRUCT
 
#define GCC_PRINTF(x, y)
 
#define UNUSED(x)   UNUSED_ ## x
 
#define strtof   c99_strtof
 
#define HAVE_STRTOF   1
 
#define strtoll   c99_strtoll
 
#define LLONG_MAX   0x7FFFFFFFFFFFFFFFlL
 
#define LLONG_MIN   (-0x7FFFFFFFFFFFFFFFLL-1)
 
#define HAVE_STRTOLL   1
 
#define strtoull   c99_strtoull
 
#define ULLONG_MAX   0xFFFFFFFFFFFFFFFFULL
 
#define HAVE_STRTOULL   1
 
#define XOREOS_EXPLICIT_OPERATOR_CONV
 
#define FORCEINLINE   inline
 
#define STRINGBUFLEN   1024
 
#define MAXPATHLEN   256
 
#define IGNORE_UNUSED_VARIABLES
 

Functions

static FORCEINLINE float c99_strtof (const char *nptr, char **endptr)
 
static long long c99_strtoll (const char *nptr, char **endptr, int base)
 Convert a string to a long long. More...
 
static unsigned long long c99_strtoull (const char *nptr, char **endptr, int base)
 Convert a string to an unsigned long long. More...
 

Detailed Description

Low-level detection of architecture/system properties.

Definition in file system.h.

Macro Definition Documentation

◆ FORCEINLINE

#define FORCEINLINE   inline

Definition at line 411 of file system.h.

◆ GCC_PRINTF

#define GCC_PRINTF (   x,
 
)

Definition at line 161 of file system.h.

◆ HAVE_STRTOF

#define HAVE_STRTOF   1

Definition at line 191 of file system.h.

◆ HAVE_STRTOLL

#define HAVE_STRTOLL   1

Definition at line 315 of file system.h.

◆ HAVE_STRTOULL

#define HAVE_STRTOULL   1

Definition at line 397 of file system.h.

◆ IGNORE_UNUSED_VARIABLES

#define IGNORE_UNUSED_VARIABLES

Definition at line 423 of file system.h.

◆ LLONG_MAX

#define LLONG_MAX   0x7FFFFFFFFFFFFFFFlL

Definition at line 202 of file system.h.

Referenced by c99_strtoll().

◆ LLONG_MIN

#define LLONG_MIN   (-0x7FFFFFFFFFFFFFFFLL-1)

Definition at line 206 of file system.h.

Referenced by c99_strtoll().

◆ MAXPATHLEN

#define MAXPATHLEN   256

Definition at line 419 of file system.h.

◆ PACKED_STRUCT

#define PACKED_STRUCT

Definition at line 160 of file system.h.

◆ STRINGBUFLEN

#define STRINGBUFLEN   1024

◆ strtof

#define strtof   c99_strtof

Definition at line 185 of file system.h.

Referenced by Common::parse().

◆ strtoll

#define strtoll   c99_strtoll

Definition at line 195 of file system.h.

Referenced by Common::parse().

◆ strtoull

#define strtoull   c99_strtoull

Definition at line 319 of file system.h.

Referenced by Common::parse().

◆ ULLONG_MAX

#define ULLONG_MAX   0xFFFFFFFFFFFFFFFFULL

Definition at line 326 of file system.h.

Referenced by c99_strtoull().

◆ UNUSED

#define UNUSED (   x)    UNUSED_ ## x

Definition at line 170 of file system.h.

◆ XOREOS_EXPLICIT_OPERATOR_CONV

#define XOREOS_EXPLICIT_OPERATOR_CONV

Definition at line 402 of file system.h.

Function Documentation

◆ c99_strtof()

static FORCEINLINE float c99_strtof ( const char *  nptr,
char **  endptr 
)
static

Definition at line 187 of file system.h.

◆ c99_strtoll()

static long long c99_strtoll ( const char *  nptr,
char **  endptr,
int  base 
)
static

Convert a string to a long long.

Based on OpenBSD's strtoll() function, released under the terms of the 3-clause BSD license.

Ignores 'locale' stuff. Assumes that the upper and lower case alphabets and digits are each contiguous.

Definition at line 217 of file system.h.

References LLONG_MAX, and LLONG_MIN.

◆ c99_strtoull()

static unsigned long long c99_strtoull ( const char *  nptr,
char **  endptr,
int  base 
)
static

Convert a string to an unsigned long long.

Based on OpenBSD's strtoull() function, released under the terms of the 3-clause BSD license.

Ignores 'locale' stuff. Assumes that the upper and lower case alphabets and digits are each contiguous.

Definition at line 337 of file system.h.

References ULLONG_MAX.