fix to get this to build on VMS. thanks to colin blake for this patch. r=sspitzer

This commit is contained in:
sspitzer%netscape.com 2000-03-15 05:30:13 +00:00
Родитель b84d6f192d
Коммит 620987a70a
2 изменённых файлов: 20 добавлений и 6 удалений

Просмотреть файл

@ -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();