This is the mail archive of the java-discuss@sourceware.cygnus.com mailing list for the Java project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Change to natSystem.cc


I added this change to natSystem.cc to use overload resolution to find out the 
signature of getpwuid_r on HP's running HPUX 10.20.

The output was generated using the following command:

   diff -u natSystem.cc.old natSystem.cc > natSystem.patch
   
The file is located in the following directory:

   libgcj-snapshot-2000-01-07/libjava/java/lang/
   
Since I have not applied any patches or worked on libgcj, I include it here so 
that someone could apply it properly and update whatever documentation is 
necessary.

Scott Urban

------------------------------ diff out ----------------------------------------


--- natSystem.cc.old	Tue Jan 11 08:25:34 2000
+++ natSystem.cc	Tue Jan 11 08:25:47 2000
@@ -205,6 +205,17 @@
   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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]