merge definitions
* process.c (proc_exec_v, rb_proc_exec_e): merge definitions. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35906 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
b89e9bf544
commit
de8eb56e88
28
process.c
28
process.c
@ -1066,16 +1066,13 @@ exec_with_sh(const char *prog, char **argv)
|
|||||||
#define ALLOC_ARGV_WITH_STR(n, v, s, l) \
|
#define ALLOC_ARGV_WITH_STR(n, v, s, l) \
|
||||||
(char **)(((s) = ALLOCV_N(char, (v), ARGV_SIZE(n) + (l)) + ARGV_SIZE(n)) - ARGV_SIZE(n))
|
(char **)(((s) = ALLOCV_N(char, (v), ARGV_SIZE(n) + (l)) + ARGV_SIZE(n)) - ARGV_SIZE(n))
|
||||||
|
|
||||||
|
static int
|
||||||
|
proc_exec_v(const char *prog, VALUE argv_str, VALUE envp_str)
|
||||||
|
{
|
||||||
#ifdef __native_client__
|
#ifdef __native_client__
|
||||||
static int
|
rb_notimplement();
|
||||||
proc_exec_v(const char *prog, VALUE argv_str, VALUE envp_str)
|
UNREACHABLE;
|
||||||
{
|
|
||||||
rb_notimplement();
|
|
||||||
}
|
|
||||||
#else
|
#else
|
||||||
static int
|
|
||||||
proc_exec_v(const char *prog, VALUE argv_str, VALUE envp_str)
|
|
||||||
{
|
|
||||||
char **argv;
|
char **argv;
|
||||||
char fbuf[MAXPATHLEN];
|
char fbuf[MAXPATHLEN];
|
||||||
# if defined(__EMX__) || defined(OS2)
|
# if defined(__EMX__) || defined(OS2)
|
||||||
@ -1133,19 +1130,16 @@ proc_exec_v(const char *prog, VALUE argv_str, VALUE envp_str)
|
|||||||
}
|
}
|
||||||
# endif
|
# endif
|
||||||
return -1;
|
return -1;
|
||||||
}
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef __native_client__
|
|
||||||
static int
|
|
||||||
rb_proc_exec_e(const char *str, VALUE envp_str)
|
|
||||||
{
|
|
||||||
rb_notimplement();
|
|
||||||
}
|
}
|
||||||
#else
|
|
||||||
static int
|
static int
|
||||||
rb_proc_exec_e(const char *str, VALUE envp_str)
|
rb_proc_exec_e(const char *str, VALUE envp_str)
|
||||||
{
|
{
|
||||||
|
#ifdef __native_client__
|
||||||
|
rb_notimplement();
|
||||||
|
UNREACHABLE;
|
||||||
|
#else
|
||||||
while (*str == ' ' || *str == '\t' || *str == '\n')
|
while (*str == ' ' || *str == '\t' || *str == '\n')
|
||||||
str++;
|
str++;
|
||||||
|
|
||||||
@ -1184,8 +1178,8 @@ rb_proc_exec_e(const char *str, VALUE envp_str)
|
|||||||
#endif
|
#endif
|
||||||
return -1;
|
return -1;
|
||||||
#endif /* _WIN32 */
|
#endif /* _WIN32 */
|
||||||
}
|
|
||||||
#endif
|
#endif
|
||||||
|
}
|
||||||
|
|
||||||
int
|
int
|
||||||
rb_proc_exec(const char *str)
|
rb_proc_exec(const char *str)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user