зеркало из https://github.com/mozilla/gecko-dev.git
fix to get this to build on VMS. thanks to colin blake for this patch. r=sspitzer
This commit is contained in:
Родитель
b84d6f192d
Коммит
620987a70a
|
@ -32,6 +32,13 @@
|
|||
#include "nsString.h"
|
||||
#include "nsXPIDLString.h"
|
||||
|
||||
/* Some UNIXy platforms don't have pw_gecos. In this case we use pw_name */
|
||||
#if defined(VMS)
|
||||
#define PW_GECOS pw_name
|
||||
#else
|
||||
#define PW_GECOS pw_gecos
|
||||
#endif
|
||||
|
||||
nsUserInfo::nsUserInfo()
|
||||
{
|
||||
NS_INIT_REFCNT();
|
||||
|
@ -52,13 +59,13 @@ nsUserInfo::GetFullname(PRUnichar **aFullname)
|
|||
|
||||
// do I need to free pw?
|
||||
|
||||
if (!pw || !pw->pw_gecos) return NS_ERROR_FAILURE;
|
||||
if (!pw || !pw->PW_GECOS) return NS_ERROR_FAILURE;
|
||||
|
||||
#ifdef DEBUG_sspitzer
|
||||
printf("fullname = %s\n", pw->pw_gecos);
|
||||
printf("fullname = %s\n", pw->PW_GECOS);
|
||||
#endif
|
||||
|
||||
nsAutoString fullname(pw->pw_gecos);
|
||||
nsAutoString fullname(pw->PW_GECOS);
|
||||
|
||||
*aFullname = fullname.ToNewUnicode();
|
||||
|
||||
|
|
|
@ -32,6 +32,13 @@
|
|||
#include "nsString.h"
|
||||
#include "nsXPIDLString.h"
|
||||
|
||||
/* Some UNIXy platforms don't have pw_gecos. In this case we use pw_name */
|
||||
#if defined(VMS)
|
||||
#define PW_GECOS pw_name
|
||||
#else
|
||||
#define PW_GECOS pw_gecos
|
||||
#endif
|
||||
|
||||
nsUserInfo::nsUserInfo()
|
||||
{
|
||||
NS_INIT_REFCNT();
|
||||
|
@ -52,13 +59,13 @@ nsUserInfo::GetFullname(PRUnichar **aFullname)
|
|||
|
||||
// do I need to free pw?
|
||||
|
||||
if (!pw || !pw->pw_gecos) return NS_ERROR_FAILURE;
|
||||
if (!pw || !pw->PW_GECOS) return NS_ERROR_FAILURE;
|
||||
|
||||
#ifdef DEBUG_sspitzer
|
||||
printf("fullname = %s\n", pw->pw_gecos);
|
||||
printf("fullname = %s\n", pw->PW_GECOS);
|
||||
#endif
|
||||
|
||||
nsAutoString fullname(pw->pw_gecos);
|
||||
nsAutoString fullname(pw->PW_GECOS);
|
||||
|
||||
*aFullname = fullname.ToNewUnicode();
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче