diff --git a/include/extern.h b/include/extern.h index 6f355fa07..ce0b42008 100644 --- a/include/extern.h +++ b/include/extern.h @@ -2567,7 +2567,7 @@ E unsigned long NDECL(get_current_feature_ver); E const char *FDECL(copyright_banner_line, (int)); #ifdef RUNTIME_PORT_ID -E void FDECL(append_port_id, (char *)); +E char *FDECL(get_port_id, (char *)); #endif /* ### video.c ### */ diff --git a/src/version.c b/src/version.c index 4567e30d7..19f74c265 100644 --- a/src/version.c +++ b/src/version.c @@ -15,8 +15,6 @@ #include "patchlevel.h" #endif -#define BETA_INFO "" - STATIC_DCL void FDECL(insert_rtoption, (char *)); /* fill buffer with short version (so caller can avoid including date.h) */ @@ -32,13 +30,26 @@ char * getversionstring(buf) char *buf; { + int details = 0; + Strcpy(buf, VERSION_ID); -#if defined(BETA) && defined(BETA_INFO) - Sprintf(eos(buf), " %s", BETA_INFO); -#endif #if defined(RUNTIME_PORT_ID) - append_port_id(buf); + details++; #endif + + if (details) { + int c = 0; + char tmpbuf[BUFSZ]; + char *tmp = (char *)0; + + Sprintf(eos(buf), " ("); +#if defined(RUNTIME_PORT_ID) + tmp = get_port_id(tmpbuf); + if (tmp) + Sprintf(eos(buf), "%s%s", c++ ? "," : "", tmp); +#endif + Sprintf(eos(buf), ")"); + } return buf; } diff --git a/sys/winnt/winnt.c b/sys/winnt/winnt.c index 892744432..842bfd036 100644 --- a/sys/winnt/winnt.c +++ b/sys/winnt/winnt.c @@ -326,23 +326,23 @@ int interjection_type; */ #ifndef _M_IX86 #ifdef _M_X64 -#define TARGET_PORT "(x64) " +#define TARGET_PORT "x64" #endif #ifdef _M_IA64 -#define TARGET_PORT "(IA64) " +#define TARGET_PORT "IA64" #endif #endif #ifndef TARGET_PORT -#define TARGET_PORT "(x86) " +#define TARGET_PORT "x86" #endif -void -append_port_id(buf) +char * +get_port_id(buf) char *buf; { - char *portstr = TARGET_PORT; - Sprintf(eos(buf), " %s", portstr); + Strcpy(buf, TARGET_PORT); + return buf; } #endif /* RUNTIME_PORT_ID */