CUBRID Engine  latest
release_string.c File Reference
#include <stdlib.h>
#include <string.h>
#include "config.h"
#include "porting.h"
#include "release_string.h"
#include "message_catalog.h"
#include "chartype.h"
#include "language_support.h"
#include "environment_variable.h"
#include "log_comm.h"
Include dependency graph for release_string.c:

Go to the source code of this file.

Classes

struct  version
 
struct  compatibility_rule
 

Macros

#define makestring1(x)   #x
 
#define makestring(x)   makestring1(x)
 

Typedefs

typedef struct version REL_VERSION
 
typedef struct compatibility_rule COMPATIBILITY_RULE
 

Enumerations

enum  COMPATIBILITY_CHECK_MODE { CHECK_LOG_COMPATIBILITY, CHECK_NET_PROTOCOL_COMPATIBILITY }
 

Functions

static REL_COMPATIBILITY rel_get_compatible_internal (const char *base_rel_str, const char *apply_rel_str, COMPATIBILITY_CHECK_MODE check, REL_VERSION rules[])
 
void rel_copy_version_string (char *buf, size_t len)
 
const char * rel_name (void)
 
const char * rel_release_string (void)
 
const char * rel_major_release_string (void)
 
const char * rel_build_number (void)
 
const char * rel_build_os (void)
 
const char * rel_build_type (void)
 
float rel_disk_compatible (void)
 
void rel_set_disk_compatible (float level)
 
int rel_bit_platform (void)
 
REL_COMPATIBILITY rel_get_disk_compatible (float db_level, REL_FIXUP_FUNCTION **fixups)
 
int rel_compare (const char *rel_a, const char *rel_b)
 
bool rel_is_log_compatible (const char *writer_rel_str, const char *reader_rel_str)
 
REL_COMPATIBILITY rel_get_net_compatible (const char *client_rel_str, const char *server_rel_str)
 

Variables

static const char * copyright_header
 
static const char * copyright_body
 
static const char * release_string = makestring (RELEASE_STRING)
 
static const char * major_release_string = makestring (MAJOR_RELEASE_STRING)
 
static const char * build_number = makestring (BUILD_NUMBER)
 
static const char * package_string = PACKAGE_STRING
 
static const char * build_os = makestring (BUILD_OS)
 
static const char * build_type = makestring (BUILD_TYPE)
 
static int bit_platform = __WORDSIZE
 
static float disk_compatibility_level = 11.0f
 
static COMPATIBILITY_RULE disk_compatibility_rules []
 
static REL_VERSION log_incompatible_versions []
 
static REL_VERSION net_incompatible_versions []
 

Macro Definition Documentation

#define makestring (   x)    makestring1(x)

Definition at line 83 of file release_string.c.

Referenced by admin_getid_cmd(), main(), and uc_version().

#define makestring1 (   x)    #x

Definition at line 82 of file release_string.c.

Typedef Documentation

typedef struct version REL_VERSION

Enumeration Type Documentation

Enumerator
CHECK_LOG_COMPATIBILITY 
CHECK_NET_PROTOCOL_COMPATIBILITY 

Definition at line 62 of file release_string.c.

Function Documentation

int rel_bit_platform ( void  )

Definition at line 257 of file release_string.c.

References bit_platform.

Referenced by boot_restart_server(), net_client_ping_server_with_handshake(), rel_copy_version_string(), server_ping_with_handshake(), and xboot_initialize_server().

Here is the caller graph for this function:

const char* rel_build_number ( void  )
const char* rel_build_os ( void  )

Definition at line 171 of file release_string.c.

References build_os.

Referenced by rel_copy_version_string().

Here is the caller graph for this function:

int rel_compare ( const char *  rel_a,
const char *  rel_b 
)

Definition at line 347 of file release_string.c.

References char_isalpha(), and str_to_int32().

Referenced by net_client_ping_server_with_handshake(), and server_ping_with_handshake().

Here is the caller graph for this function:

void rel_copy_version_string ( char *  buf,
size_t  len 
)

Definition at line 110 of file release_string.c.

References rel_bit_platform(), rel_build_number(), rel_build_os(), rel_build_type(), and rel_name().

Referenced by main(), and util_service_version().

Here is the caller graph for this function:

float rel_disk_compatible ( void  )
static REL_COMPATIBILITY rel_get_compatible_internal ( const char *  base_rel_str,
const char *  apply_rel_str,
COMPATIBILITY_CHECK_MODE  check,
REL_VERSION  rules[] 
)
static
REL_COMPATIBILITY rel_get_net_compatible ( const char *  client_rel_str,
const char *  server_rel_str 
)

Definition at line 500 of file release_string.c.

References CHECK_NET_PROTOCOL_COMPATIBILITY, and rel_get_compatible_internal().

Referenced by net_client_ping_server_with_handshake(), and server_ping_with_handshake().

Here is the caller graph for this function:

bool rel_is_log_compatible ( const char *  writer_rel_str,
const char *  reader_rel_str 
)

Definition at line 456 of file release_string.c.

References CHECK_LOG_COMPATIBILITY, rel_get_compatible_internal(), and REL_NOT_COMPATIBLE.

Referenced by fileio_continue_restore(), and log_initialize_internal().

Here is the caller graph for this function:

void rel_set_disk_compatible ( float  level)

Definition at line 246 of file release_string.c.

References disk_compatibility_level.

Referenced by boot_restart_client().

Here is the caller graph for this function:

Variable Documentation

int bit_platform = __WORDSIZE
static

Definition at line 95 of file release_string.c.

Referenced by rel_bit_platform().

const char* build_number = makestring (BUILD_NUMBER)
static

Definition at line 87 of file release_string.c.

Referenced by rel_build_number().

const char* build_os = makestring (BUILD_OS)
static

Definition at line 89 of file release_string.c.

Referenced by rel_build_os().

const char* build_type = makestring (BUILD_TYPE)
static

Definition at line 90 of file release_string.c.

Referenced by rel_build_type().

const char* copyright_body
static
Initial value:
= "\
Copyright Information\n\
"

Definition at line 75 of file release_string.c.

Referenced by rel_build_type().

const char* copyright_header
static
Initial value:
= "\
Copyright (C) 2008 Search Solution Corporation.\nCopyright (C) 2016 CUBRID Corporation.\n\
"

Definition at line 71 of file release_string.c.

Referenced by rel_build_type().

float disk_compatibility_level = 11.0f
static
COMPATIBILITY_RULE disk_compatibility_rules[]
static
Initial value:
= {
{{0, 0, 0}, {0, 0, 0}, REL_NOT_COMPATIBLE, NULL}
}
#define NULL
Definition: freelistheap.h:34

Definition at line 270 of file release_string.c.

REL_VERSION log_incompatible_versions[]
static
Initial value:
= {
{10, 0, 0},
{0, 0, 0}
}

Definition at line 439 of file release_string.c.

const char* major_release_string = makestring (MAJOR_RELEASE_STRING)
static

Definition at line 86 of file release_string.c.

Referenced by rel_major_release_string().

REL_VERSION net_incompatible_versions[]
static
Initial value:
= {
{10, 0, 0},
{0, 0, 0}
}

Definition at line 473 of file release_string.c.

const char* package_string = PACKAGE_STRING
static

Definition at line 88 of file release_string.c.

Referenced by rel_name().

const char* release_string = makestring (RELEASE_STRING)
static

Definition at line 85 of file release_string.c.

Referenced by rel_release_string().