From f090bb6fe22c5c5657aba4cfa391348e423d61d1 Mon Sep 17 00:00:00 2001 From: "radha%netscape.com" Date: Sun, 4 Jul 1999 22:41:59 +0000 Subject: [PATCH] Set XP_AppPlatform to the right platform name instead of a generic "Unix". This checkin applies only to unix builds git-svn-id: svn://10.0.0.236/trunk@38328 18797224-902f-48f8-a5cc-f745e15eee43 --- mozilla/network/module/nsNetService.cpp | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/mozilla/network/module/nsNetService.cpp b/mozilla/network/module/nsNetService.cpp index a520dac8060..567ade9a660 100644 --- a/mozilla/network/module/nsNetService.cpp +++ b/mozilla/network/module/nsNetService.cpp @@ -62,6 +62,11 @@ static HINSTANCE g_hInst = NULL; #include #endif +#ifdef XP_UNIX +#include +#endif /* XP_UNIX */ + + /* ** Define TIMEBOMB_ON for beta builds. ** Undef TIMEBOMB_ON for release builds. @@ -216,7 +221,12 @@ nsNetlibService::nsNetlibService() XP_AppPlatform = PL_strdup("BeOS"); #elif defined(XP_UNIX) /* XXX: Need to differentiate between various Unisys */ - XP_AppPlatform = PL_strdup("Unix"); + struct utsname name; + int ret = uname(&name); + if (ret >= 0) { + XP_AppPlatform = PL_strdup((char *) name.sysname); + } + #endif /* XXXXX TEMPORARY TESTING HACK XXXXX */