Skip to content

Commit

Permalink
Add missing R2_BINDIR in r2 -H
Browse files Browse the repository at this point in the history
  • Loading branch information
radare authored and trufae committed Jan 8, 2024
1 parent 8ba101f commit 3bc91d2
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
2 changes: 2 additions & 0 deletions libr/include/r_userconf.h.acr
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ extern "C" {
#define R2_PREFIX "@PREFIX@"
#define R2_ETCDIR "@ETCDIR@"
#define R2_LIBDIR "@LIBDIR@"
#define R2_BINDIR "@BINDIR@"
#define R2_INCDIR "@INCLUDEDIR@"
#define R2_DATDIR "@DATADIR@"
#define R2_WWWROOT "@WWWROOT@"
Expand Down Expand Up @@ -71,6 +72,7 @@ extern "C" {
#define R2_PREFIX "@PREFIX@"
#define R2_ETCDIR "@ETCDIR@"
#define R2_LIBDIR "@LIBDIR@"
#define R2_BINDIR "@BINDIR@"
#define R2_INCDIR "@INCLUDEDIR@/libr"
#define R2_DATDIR "@DATADIR@"
#define R2_WWWROOT R2_DATDIR "/radare2/" R2_VERSION "/www"
Expand Down
4 changes: 4 additions & 0 deletions libr/main/radare2.c
Original file line number Diff line number Diff line change
Expand Up @@ -261,6 +261,7 @@ static int main_help(int line) {
" R2_LOG_FILE dump all logs to a file\n"
"Paths:\n"
" R2_INCDIR "R2_INCDIR"\n"
" R2_BINDIR "R2_BINDIR"\n"
" R2_LIBDIR "R2_LIBDIR"\n"
" R2_LIBEXT "R_LIB_EXT"\n"
" R2_PREFIX "R2_PREFIX"\n"
Expand All @@ -281,9 +282,11 @@ static int main_print_var(const char *var_name) {
#ifdef R2__WINDOWS__
char *incdir = r_str_r2_prefix (R2_INCDIR);
char *libdir = r_str_r2_prefix (R2_LIBDIR);
char *bindir = r_str_r2_prefix (R2_BINDIR);
#else
char *incdir = strdup (R2_INCDIR);
char *libdir = strdup (R2_LIBDIR);
char *bindir = strdup (R2_BINDIR);
#endif
char *confighome = r_xdg_configdir (NULL);
char *datahome = r_xdg_datadir (NULL);
Expand All @@ -302,6 +305,7 @@ static int main_print_var(const char *var_name) {
{ "R2_PREFIX", r2prefix },
{ "R2_MAGICPATH", magicpath },
{ "R2_INCDIR", incdir },
{ "R2_BINDIR", bindir },
{ "R2_LIBDIR", libdir },
{ "R2_LIBEXT", R_LIB_EXT },
{ "R2_RDATAHOME", datahome },
Expand Down

0 comments on commit 3bc91d2

Please sign in to comment.