---
name: "os_version"
section: "3alleg4"
platform: "linux"
package: "allegro4-doc"
version: "2:4.4.3.1-5"
release: "Debian 13 (Trixie)"
platforms: ["linux"]
url: "https://new.carta.tech/os_version/3alleg4"
---

# os\_version(3alleg4)

Version of the OS currently running. Allegro game programming library.

## NAME

os\_version, os\_revision - Version of the OS currently running. Allegro game programming library.

## SYNOPSIS

**#include \<allegro.h\>**

**extern int os\_version;**

**extern int os\_revision;**

## DESCRIPTION

The major and minor version of the Operating System currently running. Set by allegro\_init(). If Allegro for some reason was not able to retrieve the version of the Operating System, os\_version and os\_revision will be set to -1. For example: Under Win98 SE (v4.10.2222) os\_version will be set to 4 and os\_revision to 10.

## SEE ALSO

**os\_type**(3alleg4), **os\_multitasking**(3alleg4)
