Skip to content

Commit

Permalink
prefix macro VERSION
Browse files Browse the repository at this point in the history
  • Loading branch information
cspiel1 committed Jul 19, 2023
1 parent bfdbe04 commit 6ca3857
Show file tree
Hide file tree
Showing 7 changed files with 11 additions and 11 deletions.
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ set(re_DIR ${CMAKE_CURRENT_LIST_DIR}/cmake)
find_package(re CONFIG REQUIRED)

list(APPEND RE_DEFINITIONS
-DVERSION="${PROJECT_VERSION_FULL}"
-DRE_VERSION="${PROJECT_VERSION_FULL}"
-DVER_MAJOR=${PROJECT_VERSION_MAJOR}
-DVER_MINOR=${PROJECT_VERSION_MINOR}
-DVER_PATCH=${PROJECT_VERSION_PATCH}
Expand Down
4 changes: 2 additions & 2 deletions include/re_sys.h
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@
*/
#include <stdio.h>

#ifndef VERSION
#define VERSION "?"
#ifndef RE_VERSION
#define RE_VERSION "?"
#endif

/**
Expand Down
6 changes: 3 additions & 3 deletions src/http/request.c
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,8 @@
#define DEBUG_LEVEL 5
#include <re_dbg.h>

#ifndef VERSION
#define VERSION "???"
#ifndef RE_VERSION
#define RE_VERSION "???"
#endif


Expand Down Expand Up @@ -358,7 +358,7 @@ static int send_req(struct http_reqconn *conn, const struct pl *auth)
(conn->bodyh || conn->body) ? req_body_handler : NULL,
conn,
"%r%s"
"User-Agent: re " VERSION "\r\n"
"User-Agent: re " RE_VERSION "\r\n"
"%r"
"%r"
"%r"
Expand Down
2 changes: 1 addition & 1 deletion src/ice/stunsrv.c
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
#include <re_dbg.h>


static const char *sw = "ice stunsrv v" VERSION " (" ARCH "/" OS ")";
static const char *sw = "ice stunsrv v" RE_VERSION " (" ARCH "/" OS ")";


static void triggered_check(struct icem *icem, struct ice_cand *lcand,
Expand Down
2 changes: 1 addition & 1 deletion src/stun/stun.c
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
#include "stun.h"


const char *stun_software = "libre v" VERSION " (" ARCH "/" OS ")";
const char *stun_software = "libre v" RE_VERSION " (" ARCH "/" OS ")";


static const struct stun_conf conf_default = {
Expand Down
4 changes: 2 additions & 2 deletions src/sys/sys.c
Original file line number Diff line number Diff line change
Expand Up @@ -139,8 +139,8 @@ const char *sys_os_get(void)
*/
const char *sys_libre_version_get(void)
{
#ifdef VERSION
return VERSION;
#ifdef RE_VERSION
return RE_VERSION;
#else
return "?";
#endif
Expand Down
2 changes: 1 addition & 1 deletion src/trice/stunsrv.c
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
#include <re_dbg.h>


static const char *sw = "ice stunsrv v" VERSION " (" ARCH "/" OS ")";
static const char *sw = "ice stunsrv v" RE_VERSION " (" ARCH "/" OS ")";


/*
Expand Down

0 comments on commit 6ca3857

Please sign in to comment.