X-Git-Url: https://jxself.org/git/?a=blobdiff_plain;f=config%2Flkc.h;h=f8aee5fc6d5e607625fc9e7f93bcbcf7f2e9f13b;hb=320cfce45cb7016f265df42c9512414fb8e5d1e1;hp=c18f2bd9c095510d1d5e58575b265bd67ae9e781;hpb=bb8077d7e3a3b8cab3fb3c3065c99fce9aeed2bc;p=carl9170fw.git diff --git a/config/lkc.h b/config/lkc.h index c18f2bd..f8aee5f 100644 --- a/config/lkc.h +++ b/config/lkc.h @@ -39,6 +39,12 @@ extern "C" { #ifndef CONFIG_ #define CONFIG_ "CONFIG_" #endif +static inline const char *CONFIG_prefix(void) +{ + return getenv( "CONFIG_" ) ?: CONFIG_; +} +#undef CONFIG_ +#define CONFIG_ CONFIG_prefix() #define TF_COMMAND 0x0001 #define TF_PARAM 0x0002 @@ -116,6 +122,8 @@ void menu_set_type(int type); /* util.c */ struct file *file_lookup(const char *name); int file_write_dep(const char *name); +void *xmalloc(size_t size); +void *xcalloc(size_t nmemb, size_t size); struct gstr { size_t len;