RTEMS
version.c
Go to the documentation of this file.
1 
14 /*
15  * Copyright (C) 2017.
16  * Chris Johns <chrisj@rtems.org>
17  *
18  * The license and distribution terms for this file may be
19  * found in the file LICENSE in this distribution or at
20  * http://www.rtems.org/license/LICENSE.
21  */
22 
23 #ifdef HAVE_CONFIG_H
24 #include "config.h"
25 #endif
26 
27 #include <rtems.h>
28 #include <rtems/version.h>
29 
30 #include "version-vc-key.h"
31 
32 const char *rtems_version( void )
33 {
34 #ifdef RTEMS_VERSION_VC_KEY
35  return RTEMS_VERSION "." RTEMS_VERSION_VC_KEY;
36 #else
37  return RTEMS_VERSION;
38 #endif
39 }
40 
42 {
43  return __RTEMS_MAJOR__;
44 }
45 
47 {
48  return __RTEMS_MINOR__;
49 }
50 
52 {
53  return __RTEMS_REVISION__;
54 }
55 
56 const char *rtems_version_control_key( void )
57 {
58 #ifdef RTEMS_VERSION_VC_KEY
59  return RTEMS_VERSION_VC_KEY;
60 #else
61  return "";
62 #endif
63 }
const char * rtems_version_control_key(void)
Returns the version control key for the current version of code that has been built.
Definition: version.c:56
Version API.
This header file defines the RTEMS Classic API.
const char * rtems_version(void)
Returns the version string.
Definition: version.c:32
int rtems_version_revision(void)
Returns the version&#39;s revision number.
Definition: version.c:51
int rtems_version_minor(void)
Returns the version&#39;s minor number.
Definition: version.c:46
int rtems_version_major(void)
Returns the version&#39;s major number.
Definition: version.c:41