ruby-changes:11572
From: akr <ko1@a...>
Date: Sun, 19 Apr 2009 01:42:24 +0900 (JST)
Subject: [ruby-changes:11572] Ruby:r23207 (trunk): * process.c (proc_seteuid_m): defined to use rb_f_notimplement if not
akr 2009-04-19 01:41:16 +0900 (Sun, 19 Apr 2009) New Revision: 23207 http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=23207 Log: * process.c (proc_seteuid_m): defined to use rb_f_notimplement if not implemented. (proc_setegid_m): ditto. Modified files: trunk/ChangeLog trunk/process.c Index: ChangeLog =================================================================== --- ChangeLog (revision 23206) +++ ChangeLog (revision 23207) @@ -1,3 +1,9 @@ +Sun Apr 19 01:39:17 2009 Tanaka Akira <akr@f...> + + * process.c (proc_seteuid_m): defined to use rb_f_notimplement if not + implemented. + (proc_setegid_m): ditto. + Sun Apr 19 01:03:56 2009 Tanaka Akira <akr@f...> * process.c (proc_setuid): use rb_f_notimplement if not implemented. Index: process.c =================================================================== --- process.c (revision 23206) +++ process.c (revision 23207) @@ -4805,6 +4805,12 @@ return euid; } +#if defined(HAVE_SETRESUID) || defined(HAVE_SETREUID) || defined(HAVE_SETEUID) || defined(HAVE_SETUID) +#define proc_seteuid_m proc_seteuid +#else +#define proc_seteuid_m rb_f_notimplement +#endif + static rb_uid_t rb_seteuid_core(rb_uid_t euid) { @@ -4918,6 +4924,12 @@ return egid; } +#if defined(HAVE_SETRESGID) || defined(HAVE_SETREGID) || defined(HAVE_SETEGID) || defined(HAVE_SETGID) +#define proc_setegid_m proc_setegid +#else +#define proc_setegid_m rb_f_notimplement +#endif + static rb_gid_t rb_setegid_core(rb_gid_t egid) { @@ -5502,9 +5514,9 @@ rb_define_module_function(rb_mProcess, "gid", proc_getgid, 0); rb_define_module_function(rb_mProcess, "gid=", proc_setgid, 1); rb_define_module_function(rb_mProcess, "euid", proc_geteuid, 0); - rb_define_module_function(rb_mProcess, "euid=", proc_seteuid, 1); + rb_define_module_function(rb_mProcess, "euid=", proc_seteuid_m, 1); rb_define_module_function(rb_mProcess, "egid", proc_getegid, 0); - rb_define_module_function(rb_mProcess, "egid=", proc_setegid, 1); + rb_define_module_function(rb_mProcess, "egid=", proc_setegid_m, 1); rb_define_module_function(rb_mProcess, "initgroups", proc_initgroups, 2); rb_define_module_function(rb_mProcess, "groups", proc_getgroups, 0); rb_define_module_function(rb_mProcess, "groups=", proc_setgroups, 1); -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/