Skip to content

File syn_version.h

FileList > src > syntropic > system > syn_version.h

Go to the source code of this file

Build version and metadata — compile-time constants. More...

  • #include <stdint.h>

Classes

Type Name
struct SYN_Version
Compile-time version information.

Public Static Functions

Type Name
const SYN_Version * syn_version (void)
Get the compile-time version info.
int syn_version_at_least (uint16_t year, uint8_t month, uint8_t rel)
Check if running version is at least year.month.release.

Macros

Type Name
define SYN_APP_NAME "SyntropicOS"
define SYN_BUILD_DATE \_\_DATE\_\_
define SYN_BUILD_TIME \_\_TIME\_\_
define SYN_GIT_HASH "unknown"
define SYN_VERSION_CODE /* multi line expression */
define SYN_VERSION_MONTH 7
Release month (CalVer).
define SYN_VERSION_RELEASE 4
Release number within the month (CalVer).
define SYN_VERSION_YEAR 2026
Release year (CalVer).

Detailed Description

Provides version numbers, build date/time, and optional git hash. Users define these in their build system or syn_config.h.

** **

printf("SyntropicOS v%d.%d.%d built %s\n",
       SYN_VERSION_YEAR, SYN_VERSION_MONTH, SYN_VERSION_RELEASE,
       SYN_BUILD_DATE);

// Or use the struct:
const SYN_Version *v = syn_version();
printf("%s\n", v->string);

Public Static Functions Documentation

function syn_version

Get the compile-time version info.

static inline const SYN_Version * syn_version (
    void
) 

Returns:

Pointer to static version struct.


function syn_version_at_least

Check if running version is at least year.month.release.

static inline int syn_version_at_least (
    uint16_t year,
    uint8_t month,
    uint8_t rel
) 

Parameters:

  • year Required year component.
  • month Required month component.
  • rel Required release component.

Returns:

Non-zero if the current version meets or exceeds the requirements.


Macro Definition Documentation

define SYN_APP_NAME

#define SYN_APP_NAME `"SyntropicOS"`

Application name.


define SYN_BUILD_DATE

#define SYN_BUILD_DATE `__DATE__`

Build date string (e.g., "Jun 27 2026").


define SYN_BUILD_TIME

#define SYN_BUILD_TIME `__TIME__`

Build time string (e.g., "14:30:00").


define SYN_GIT_HASH

#define SYN_GIT_HASH `"unknown"`

Git hash (short). Override in build system: -DSYN_GIT_HASH="abc1234"


define SYN_VERSION_CODE

#define SYN_VERSION_CODE `/* multi line expression */`

Packed version: 0xYYYYMMRR (year.month.release).


define SYN_VERSION_MONTH

Release month (CalVer).

#define SYN_VERSION_MONTH `7`


define SYN_VERSION_RELEASE

Release number within the month (CalVer).

#define SYN_VERSION_RELEASE `4`


define SYN_VERSION_YEAR

Release year (CalVer).

#define SYN_VERSION_YEAR `2026`



The documentation for this class was generated from the following file src/syntropic/system/syn_version.h