Make the 64-bit detection static inline

Signed-off-by: Ikey Doherty <ikey@solus-project.com>
This commit is contained in:
Ikey Doherty
2016-05-26 21:45:58 +01:00
parent 6f12984bc2
commit 4e6f47368b
2 changed files with 12 additions and 10 deletions
-9
View File
@@ -9,19 +9,10 @@
* of the License, or (at your option) any later version.
*/
#include <stdint.h>
#include <stdio.h>
#include "lsi.h"
bool lsi_system_is_64bit(void)
{
#if UINTPTR_MAX == 0xffffffffffffffff
return true;
#endif
return false;
}
bool lsi_config_load(__lsi_unused__ LsiConfig *config)
{
fputs("lsi_config_load(): Not yet implemented", stderr);
+12 -1
View File
@@ -12,10 +12,13 @@
#pragma once
#include <stdbool.h>
#include <stdint.h>
/* Mark a variable/argument as unused to skip warnings */
#define __lsi_unused__ __attribute__((unused))
/* Force inlining of a function */
#define __lsi_inline__ __attribute__((always_inline))
/**
* Current Linux Steam Integration settings.
*/
@@ -40,8 +43,16 @@ bool lsi_config_store(LsiConfig *config);
/**
* Determine if the host system is 64-bit.
*
* @returns true if 64-bit, otherwise false
*/
bool lsi_system_is_64bit(void);
__lsi_inline__ static inline bool lsi_system_is_64bit(void)
{
#if UINTPTR_MAX == 0xffffffffffffffff
return true;
#endif
return false;
}
/*
* Editor modelines - https://www.wireshark.org/tools/modelines.html