[前][次][番号順一覧][スレッド一覧]

ruby-changes:29510

From: charliesome <ko1@a...>
Date: Sat, 22 Jun 2013 14:43:19 +0900 (JST)
Subject: [ruby-changes:29510] charliesome:r41562 (trunk): * ext/etc/etc.c (Init_etc): omit 'passwd' from definition of Etc::Passwd

charliesome	2013-06-22 14:43:08 +0900 (Sat, 22 Jun 2013)

  New Revision: 41562

  http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=41562

  Log:
    * ext/etc/etc.c (Init_etc): omit 'passwd' from definition of Etc::Passwd
      if HAVE_STRUCT_PASSWD_PW_PASSWD is not defined to prevent mismatch of
      fields and values in setup_passwd

  Modified files:
    trunk/ChangeLog
    trunk/ext/etc/etc.c

Index: ChangeLog
===================================================================
--- ChangeLog	(revision 41561)
+++ ChangeLog	(revision 41562)
@@ -1,3 +1,9 @@ https://github.com/ruby/ruby/blob/trunk/ChangeLog#L1
+Sat Jun 22 14:39:00 2013  Charlie Somerville  <charliesome@r...>
+
+	* ext/etc/etc.c (Init_etc): omit 'passwd' from definition of Etc::Passwd
+	  if HAVE_STRUCT_PASSWD_PW_PASSWD is not defined to prevent mismatch of
+	  fields and values in setup_passwd
+
 Sat Jun 22 14:35:40 2013  Tanaka Akira  <akr@f...>
 
 	* ext/dl/cfunc.c (rb_dlcfunc_call): Use rb_big_pack instead of
Index: ext/etc/etc.c
===================================================================
--- ext/etc/etc.c	(revision 41561)
+++ ext/etc/etc.c	(revision 41562)
@@ -673,11 +673,17 @@ Init_etc(void) https://github.com/ruby/ruby/blob/trunk/ext/etc/etc.c#L673
     rb_define_module_function(mEtc, "systmpdir", etc_systmpdir, 0);
 
     sPasswd =  rb_struct_define(NULL,
-				"name", "passwd", "uid", "gid",
+				"name",
+#ifdef HAVE_STRUCT_PASSWD_PW_PASSWD
+				"passwd",
+#endif
+				"uid",
+				"gid",
 #ifdef HAVE_STRUCT_PASSWD_PW_GECOS
 				"gecos",
 #endif
-				"dir", "shell",
+				"dir",
+				"shell",
 #ifdef HAVE_STRUCT_PASSWD_PW_CHANGE
 				"change",
 #endif

--
ML: ruby-changes@q...
Info: http://www.atdot.net/~ko1/quickml/

[前][次][番号順一覧][スレッド一覧]