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

ruby-changes:14820

From: akr <ko1@a...>
Date: Tue, 16 Feb 2010 21:03:54 +0900 (JST)
Subject: [ruby-changes:14820] Ruby:r26682 (ruby_1_8, trunk): * file.c (rb_group_member): renamed from group_member.

akr	2010-02-16 21:00:24 +0900 (Tue, 16 Feb 2010)

  New Revision: 26682

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

  Log:
    * file.c (rb_group_member): renamed from group_member.
      don't use group_member() in glibc because it's not valgrind clean.
      http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=570047

  Modified files:
    branches/ruby_1_8/ChangeLog
    branches/ruby_1_8/configure.in
    branches/ruby_1_8/file.c
    trunk/ChangeLog
    trunk/configure.in
    trunk/file.c

Index: configure.in
===================================================================
--- configure.in	(revision 26681)
+++ configure.in	(revision 26682)
@@ -1114,7 +1114,7 @@
 	      setitimer setruid seteuid setreuid setresuid setproctitle socketpair\
 	      setrgid setegid setregid setresgid issetugid pause lchown lchmod\
 	      getpgrp setpgrp getpgid setpgid initgroups getgroups setgroups\
-	      getpriority getrlimit setrlimit sysconf group_member\
+	      getpriority getrlimit setrlimit sysconf \
 	      dlopen sigprocmask sigaction sigsetjmp _setjmp _longjmp snprintf\
 	      setsid telldir seekdir fchmod cosh sinh tanh log2 round signbit\
 	      setuid setgid daemon select_large_fdset setenv unsetenv\
Index: ChangeLog
===================================================================
--- ChangeLog	(revision 26681)
+++ ChangeLog	(revision 26682)
@@ -1,3 +1,9 @@
+Tue Feb 16 20:56:39 2010  Tanaka Akira  <akr@f...>
+
+	* file.c (rb_group_member): renamed from group_member.
+	  don't use group_member() in glibc because it's not valgrind clean.
+	  http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=570047
+
 Tue Feb 16 19:19:21 2010  Nobuyoshi Nakada  <nobu@r...>
 
 	* ext/dl/cfunc.c (rb_dlcfunc_call): convert signed value to
Index: file.c
===================================================================
--- file.c	(revision 26681)
+++ file.c	(revision 26682)
@@ -921,9 +921,8 @@
 #endif
 }
 
-#ifndef HAVE_GROUP_MEMBER
 static int
-group_member(GETGROUPS_T gid)
+rb_group_member(GETGROUPS_T gid)
 {
 #ifndef _WIN32
     if (getgid() == gid || getegid() == gid)
@@ -950,7 +949,6 @@
 #endif
     return FALSE;
 }
-#endif
 
 #ifndef S_IXUGO
 #  define S_IXUGO		(S_IXUSR | S_IXGRP | S_IXOTH)
@@ -987,7 +985,7 @@
 
     if (st.st_uid == euid)        /* owner */
 	mode <<= 6;
-    else if (group_member(st.st_gid))
+    else if (rb_group_member(st.st_gid))
 	mode <<= 3;
 
     if ((int)(st.st_mode & mode) == mode) return 0;
@@ -1487,7 +1485,7 @@
     struct stat st;
 
     if (rb_stat(fname, &st) < 0) return Qfalse;
-    if (group_member(st.st_gid)) return Qtrue;
+    if (rb_group_member(st.st_gid)) return Qtrue;
 #endif
     return Qfalse;
 }
@@ -4275,7 +4273,7 @@
 rb_stat_grpowned(VALUE obj)
 {
 #ifndef _WIN32
-    if (group_member(get_stat(obj)->st_gid)) return Qtrue;
+    if (rb_group_member(get_stat(obj)->st_gid)) return Qtrue;
 #endif
     return Qfalse;
 }
@@ -4337,7 +4335,7 @@
 	return st->st_mode & S_IRUSR ? Qtrue : Qfalse;
 #endif
 #ifdef S_IRGRP
-    if (group_member(get_stat(obj)->st_gid))
+    if (rb_group_member(get_stat(obj)->st_gid))
 	return st->st_mode & S_IRGRP ? Qtrue : Qfalse;
 #endif
 #ifdef S_IROTH
@@ -4429,7 +4427,7 @@
 	return st->st_mode & S_IWUSR ? Qtrue : Qfalse;
 #endif
 #ifdef S_IWGRP
-    if (group_member(get_stat(obj)->st_gid))
+    if (rb_group_member(get_stat(obj)->st_gid))
 	return st->st_mode & S_IWGRP ? Qtrue : Qfalse;
 #endif
 #ifdef S_IWOTH
@@ -4524,7 +4522,7 @@
 	return st->st_mode & S_IXUSR ? Qtrue : Qfalse;
 #endif
 #ifdef S_IXGRP
-    if (group_member(get_stat(obj)->st_gid))
+    if (rb_group_member(get_stat(obj)->st_gid))
 	return st->st_mode & S_IXGRP ? Qtrue : Qfalse;
 #endif
 #ifdef S_IXOTH
Index: ruby_1_8/configure.in
===================================================================
--- ruby_1_8/configure.in	(revision 26681)
+++ ruby_1_8/configure.in	(revision 26682)
@@ -646,7 +646,7 @@
 	      setproctitle setrgid setegid setregid setresgid issetugid pause\
 	      lchown lchmod getpgrp setpgrp getpgid setpgid initgroups\
 	      getgroups setgroups getpriority getrlimit setrlimit sysconf\
-	      group_member dlopen sigprocmask\
+	      dlopen sigprocmask\
 	      sigaction sigsetjmp _setjmp _longjmp setsid telldir seekdir fchmod\
 	      mktime timegm gettimeofday\
 	      cosh sinh tanh round setuid setgid setenv unsetenv)
Index: ruby_1_8/ChangeLog
===================================================================
--- ruby_1_8/ChangeLog	(revision 26681)
+++ ruby_1_8/ChangeLog	(revision 26682)
@@ -1,3 +1,9 @@
+Tue Feb 16 20:56:39 2010  Tanaka Akira  <akr@f...>
+
+	* file.c (rb_group_member): renamed from group_member.
+	  don't use group_member() in glibc because it's not valgrind clean.
+	  http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=570047
+
 Thu Feb 11 20:43:00 2010  Tanaka Akira  <akr@f...>
 
 	* io.c (rb_io_modenum_mode): return "r" for O_RDONLY|O_APPEND.
Index: ruby_1_8/file.c
===================================================================
--- ruby_1_8/file.c	(revision 26681)
+++ ruby_1_8/file.c	(revision 26682)
@@ -816,9 +816,8 @@
 #endif
 }
 
-#ifndef HAVE_GROUP_MEMBER
 static int
-group_member(gid)
+rb_group_member(gid)
     GETGROUPS_T gid;
 {
 #ifndef _WIN32
@@ -846,7 +845,6 @@
 #endif
     return Qfalse;
 }
-#endif
 
 #ifndef S_IXUGO
 #  define S_IXUGO		(S_IXUSR | S_IXGRP | S_IXOTH)
@@ -885,7 +883,7 @@
 
     if (st.st_uid == euid)        /* owner */
 	mode <<= 6;
-    else if (group_member(st.st_gid))
+    else if (rb_group_member(st.st_gid))
 	mode <<= 3;
 
     if ((st.st_mode & mode) == mode) return 0;
@@ -1312,7 +1310,7 @@
     struct stat st;
 
     if (rb_stat(fname, &st) < 0) return Qfalse;
-    if (group_member(st.st_gid)) return Qtrue;
+    if (rb_group_member(st.st_gid)) return Qtrue;
 #endif
     return Qfalse;
 }
@@ -3897,7 +3895,7 @@
     VALUE obj;
 {
 #ifndef _WIN32
-    if (group_member(get_stat(obj)->st_gid)) return Qtrue;
+    if (rb_group_member(get_stat(obj)->st_gid)) return Qtrue;
 #endif
     return Qfalse;
 }
@@ -3961,7 +3959,7 @@
 	return st->st_mode & S_IRUSR ? Qtrue : Qfalse;
 #endif
 #ifdef S_IRGRP
-    if (group_member(get_stat(obj)->st_gid))
+    if (rb_group_member(get_stat(obj)->st_gid))
 	return st->st_mode & S_IRGRP ? Qtrue : Qfalse;
 #endif
 #ifdef S_IROTH
@@ -4029,7 +4027,7 @@
 	return st->st_mode & S_IWUSR ? Qtrue : Qfalse;
 #endif
 #ifdef S_IWGRP
-    if (group_member(get_stat(obj)->st_gid))
+    if (rb_group_member(get_stat(obj)->st_gid))
 	return st->st_mode & S_IWGRP ? Qtrue : Qfalse;
 #endif
 #ifdef S_IWOTH
@@ -4100,7 +4098,7 @@
 	return st->st_mode & S_IXUSR ? Qtrue : Qfalse;
 #endif
 #ifdef S_IXGRP
-    if (group_member(get_stat(obj)->st_gid))
+    if (rb_group_member(get_stat(obj)->st_gid))
 	return st->st_mode & S_IXGRP ? Qtrue : Qfalse;
 #endif
 #ifdef S_IXOTH

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

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