natSystem.cc (getpwuid_adaptor): New adaptor for HP/UX.

* java/lang/natSystem.cc (getpwuid_adaptor): New adaptor for
	HP/UX.  From David Scott Urban.

From-SVN: r31332
This commit is contained in:
Tom Tromey 2000-01-11 18:58:13 +00:00 committed by Tom Tromey
parent 519104fe1a
commit 6baee4c5c3
2 changed files with 17 additions and 1 deletions

View File

@ -1,3 +1,8 @@
2000-01-11 Tom Tromey <tromey@cygnus.com>
* java/lang/natSystem.cc (getpwuid_adaptor): New adaptor for
HP/UX. From David Scott Urban.
2000-01-10 Jeff Sturm <jsturm@sigma6.com>
* java/lang/natMath.cc (pow): Cast args to `double', not

View File

@ -1,6 +1,6 @@
// natSystem.cc - Native code implementing System class.
/* Copyright (C) 1998, 1999 Cygnus Solutions
/* Copyright (C) 1998, 1999, 2000 Cygnus Solutions
This file is part of libgcj.
@ -205,6 +205,17 @@ getpwuid_adaptor(int (*getpwuid_r)(T_uid user_id, T_passwd *pwd_r,
return getpwuid_r (user_id, pwd_r, buf_r, len_r, pwd_entry);
}
/* This is used on HPUX 10.20 */
template <typename T_uid, typename T_passwd, typename T_buf, typename T_len>
static inline int
getpwuid_adaptor(int (*getpwuid_r)(T_uid user_id, T_passwd *pwd_r,
T_buf *buf_r, T_len len_r),
uid_t user_id, struct passwd *pwd_r,
char *buf_r, size_t len_r, struct passwd **pwd_entry)
{
return getpwuid_r (user_id, pwd_r, buf_r, len_r);
}
/* This is used on IRIX 5.2. */
template <typename T_uid, typename T_passwd, typename T_buf, typename T_len>
static inline int