diff --git a/binr/rarun2/rarun2.c b/binr/rarun2/rarun2.c index 6a2d51ef67..83d3cf303e 100644 --- a/binr/rarun2/rarun2.c +++ b/binr/rarun2/rarun2.c @@ -1,7 +1,16 @@ -/* radare2 - Copyleft 2011-2019 - pancake */ +/* radare2 - Copyleft 2011-2023 - pancake */ #include int main(int argc, const char **argv) { + char *ea = r_sys_getenv ("RARUN2_ARGS"); + if (ea) { + char **argv = r_str_argv (ea, &argc); + r_sys_setenv ("RARUN2_ARGS", NULL); + int res = r_main_rarun2 (argc, (const char **)argv); + free (ea); + free (argv); + return res; + } return r_main_rarun2 (argc, argv); } diff --git a/man/rarun2.1 b/man/rarun2.1 index e867909a9a..31df3c5dbd 100644 --- a/man/rarun2.1 +++ b/man/rarun2.1 @@ -1,4 +1,4 @@ -.Dd Feb 3, 2017 +.Dd Aug 18, 2023 .Dt RARUN2 1 .Sh NAME .Nm rarun2 @@ -160,6 +160,8 @@ You can also use the -- flag to specify program and arguments in a more natural Run a library function .Pp $ rarun2 runlib=/lib/libc-2.25.so runlib.fcn=system arg1="ls /" +.Sh ENVIRONMENT + RARUN2_ARGS useful to just run "rarun2" but parse arguments from environment var .Sh SEE ALSO .Pp .Xr radare2(1) diff --git a/shlr/sdb/include/sdb/sdb.h b/shlr/sdb/include/sdb/sdb.h index 49db69e920..e4a685d279 100644 --- a/shlr/sdb/include/sdb/sdb.h +++ b/shlr/sdb/include/sdb/sdb.h @@ -29,7 +29,6 @@ extern "C" { #define SDB_HASH_FAST 0 #define SDB_INLINE_HASH 1 -#define SDB_INLINE __attribute__((always_inline)) // ftp://ftp.gnu.org/old-gnu/Manuals/gperf-2.7/html_node/gperf_17.es.html #define SDB_MAX_GPERF_KEYS 15000 @@ -41,9 +40,11 @@ extern "C" { #if defined(__GNUC__) #define SDB_LIKELY(x) __builtin_expect((size_t)(x),1) #define SDB_UNLIKELY(x) __builtin_expect((size_t)(x),0) +#define SDB_INLINE __attribute__((always_inline)) #else #define SDB_LIKELY(x) (x) #define SDB_UNLIKELY(x) (x) +#define SDB_INLINE #endif /* printf format check attributes */