void sym_init(void) { struct symbol *sym; struct utsname uts; char *p; static bool inited = false; if (inited) return; inited = true; uname(&uts); sym = sym_lookup("ARCH", 0); sym->type = S_STRING; sym->flags |= SYMBOL_AUTO; p = getenv("ARCH"); if (p) sym_add_default(sym, p); sym = sym_lookup("KERNELVERSION", 0); sym->type = S_STRING; sym->flags |= SYMBOL_AUTO; p = getenv("KERNELVERSION"); if (p) sym_add_default(sym, p); sym = sym_lookup("UNAME_RELEASE", 0); sym->type = S_STRING; sym->flags |= SYMBOL_AUTO; sym_add_default(sym, uts.release); }
void sym_init(void) { struct symbol *sym; char *p; static bool inited = false; if (inited) return; inited = true; sym = sym_lookup("VERSION", 0); sym->type = S_STRING; sym->flags |= SYMBOL_AUTO; p = getenv("VERSION"); if (p) sym_add_default(sym, p); sym = sym_lookup("TARGET_ARCH", 0); sym->type = S_STRING; sym->flags |= SYMBOL_AUTO; p = getenv("TARGET_ARCH"); if (p) sym_add_default(sym, p); }
void sym_init(void) { struct symbol *sym; #ifndef __MINGW32__ struct utsname uts; #endif static bool inited = false; if (inited) return; inited = true; #ifndef __MINGW32__ uname(&uts); #endif sym = sym_lookup("UNAME_RELEASE", 0); sym->type = S_STRING; sym->flags |= SYMBOL_AUTO; #ifndef __MINGW32__ sym_add_default(sym, uts.release); #else sym_add_default(sym, "mingw-unknown"); #endif }
void sym_init(void) { struct symbol *sym; struct utsname uts; static bool inited = false; if (inited) return; inited = true; uname(&uts); sym = sym_lookup("UNAME_RELEASE", 0); sym->type = S_STRING; sym->flags |= SYMBOL_AUTO; sym_add_default(sym, uts.release); }