axle OS
x86_32 UNIX-like hobby OS
src
std
std_base.h
1
#ifndef STD_BASE_H
2
#define STD_BASE_H
3
4
// Check if the compiler thinks we're targeting the wrong OS
5
#if defined(__linux__)
6
# error "You are not using a cross compiler! You will certainly run into trouble."
7
#endif // __linux__
8
9
// OS only works for the 32-bit ix86 target
10
#if !defined(__i386__)
11
# error "OS must be compiled with a ix86-elf compiler."
12
#endif // __i386__
13
14
// Allow headers to work properly on both C and C++ compilers
15
#ifdef __cplusplus
16
# define __BEGIN_DECLS extern "C" {
17
# define __END_DECLS }
18
#else // __cplusplus
19
# define __BEGIN_DECLS
20
# define __END_DECLS
21
#endif // __cplusplus
22
23
// Publicly visible library functions
24
#ifndef STDAPI
25
# define STDAPI extern
26
#endif // STDAPI
27
28
// Suppress unused parameter warnings
29
#ifndef UNUSED
30
#ifdef __GNUC__
31
# define UNUSED(x) UNUSED_ ## x __attribute__((__unused__))
32
#else
33
# define UNUSED(x) UNUSED_ ## x
34
#endif // __GNUC__
35
#endif // UNUSED
36
37
#endif // STD_BASE_H
Generated by
1.8.14