CArray
v1.0.0-build
Minimal and Extensible Array Implementation for C
Toggle main menu visibility
Loading...
Searching...
No Matches
CARRpredefines.h
Go to the documentation of this file.
1
/**
2
* CARRpredefines.h - pcannonProjectStandards
3
* Predefines for C and C++ projects
4
* STD Information: 20250723 - 1.0S
5
*/
6
7
#pragma once
8
9
// Versioning
10
#define CARR_VERSION_MAJOR 1
11
#define CARR_VERSION_MINOR 0
12
#define CARR_VERSION_PATCH 0
13
14
#define CARR_VERSION_STD 20261025
15
16
// Version states:
17
// * dev
18
// * beta
19
// * build
20
#define CARR_VERSION_STATE "build"
21
22
#define CARR_VERSION ((CARR_VERSION_MAJOR<<16)|(CARR_VERSION_MINOR<<8)|(CARR_VERSION_PATCH)|(CARR_VERSION_STATE << 24))
23
24
#define CARR_VERSION_CHECK(CARR_VERSION_MAJOR, CARR_VERSION_MINOR, CARR_VERSION_PATCH, CARR_VERSION_STATE) \
25
(((CARR_VERSION_MAJOR)<<16)|((CARR_VERSION_MINOR)<<8)|(CARR_VERSION_PATCH)|((CARR_VERSION_STATE) << 24))
26
27
// Macro utils
28
#define CARR_STRINGIFY(x) #x
29
#define CARR_TOSTRING(x) CARR_STRINGIFY(x)
30
31
#ifndef CARR_DEV
32
# define CARR_DEV true
33
#endif
34
35
#define CARR_FREE(_x) \
36
do { \
37
free(_x); \
38
_x = NULL; \
39
} while (0)
40
41
#if defined(WIN32) || defined(_WIN32)
42
# define CARR_OS_WIN32
43
#elif defined(__APPLE__) || defined(__MACH__) || defined(Macintosh)
44
# define CARR_OS_MACOS
45
#elif defined(__linux__) || defined(__unix) || defined(__unix__)
46
# define CARR_OS_UNIX_LINUX
47
#elif defined(__FreeBSD__)
48
# define CARR_OS_FREEBSD
49
#else
50
# define CARR_OS_UNKNOWN
51
# warning "Current platform might not be supported"
52
#endif
// defined(WIN32) // Platform check
53
inc
carray
CARRpredefines.h
Generated by
1.18.0