* process.c (proc_seteuid_m): defined to use rb_f_notimplement if not

implemented.
  (proc_setegid_m): ditto.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@23207 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
akr 2009-04-18 16:41:16 +00:00
Родитель df8ff329bb
Коммит f3d5d707cc
2 изменённых файлов: 20 добавлений и 2 удалений

Просмотреть файл

@ -1,3 +1,9 @@
Sun Apr 19 01:39:17 2009 Tanaka Akira <akr@fsij.org>
* 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@fsij.org> Sun Apr 19 01:03:56 2009 Tanaka Akira <akr@fsij.org>
* process.c (proc_setuid): use rb_f_notimplement if not implemented. * process.c (proc_setuid): use rb_f_notimplement if not implemented.

Просмотреть файл

@ -4805,6 +4805,12 @@ proc_seteuid(VALUE obj, VALUE euid)
return euid; 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 static rb_uid_t
rb_seteuid_core(rb_uid_t euid) rb_seteuid_core(rb_uid_t euid)
{ {
@ -4918,6 +4924,12 @@ proc_setegid(VALUE obj, VALUE egid)
return egid; 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 static rb_gid_t
rb_setegid_core(rb_gid_t egid) rb_setegid_core(rb_gid_t egid)
{ {
@ -5502,9 +5514,9 @@ Init_process(void)
rb_define_module_function(rb_mProcess, "gid", proc_getgid, 0); 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, "gid=", proc_setgid, 1);
rb_define_module_function(rb_mProcess, "euid", proc_geteuid, 0); 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_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, "initgroups", proc_initgroups, 2);
rb_define_module_function(rb_mProcess, "groups", proc_getgroups, 0); rb_define_module_function(rb_mProcess, "groups", proc_getgroups, 0);
rb_define_module_function(rb_mProcess, "groups=", proc_setgroups, 1); rb_define_module_function(rb_mProcess, "groups=", proc_setgroups, 1);