mirror of
https://github.com/mirror/make.git
synced 2025-03-14 20:00:32 +08:00
Use MK_OS_OS2 macro instead of __EMX__
* src/makeint.h: Set MK_OS_OS2 to 1 if __EMX__ is set. * src/*: Convert #if refs to __EMX__, to use MK_OS_OS2.
This commit is contained in:
parent
6f3e9e9b84
commit
9b9f3351d1
@ -27,7 +27,7 @@ this program. If not, see <https://www.gnu.org/licenses/>. */
|
|||||||
|
|
||||||
/* Define GCC_IS_NATIVE if gcc is the native development environment on
|
/* Define GCC_IS_NATIVE if gcc is the native development environment on
|
||||||
your system (gcc/bison/flex vs cc/yacc/lex). */
|
your system (gcc/bison/flex vs cc/yacc/lex). */
|
||||||
#if MK_OS_DOS || defined(__EMX__)
|
#if MK_OS_DOS || MK_OS_OS2
|
||||||
# define GCC_IS_NATIVE
|
# define GCC_IS_NATIVE
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@ -43,7 +43,7 @@ static char default_suffixes[]
|
|||||||
.for .f .r .y .l .ym .yl .mar .s .ss .i .ii .mod .sym .def .h .info .dvi \
|
.for .f .r .y .l .ym .yl .mar .s .ss .i .ii .mod .sym .def .h .info .dvi \
|
||||||
.tex .texinfo .texi .txinfo .mem .hlp .brn .rnh .rno .rnt .rnx .w .ch .cweb \
|
.tex .texinfo .texi .txinfo .mem .hlp .brn .rnh .rno .rnt .rnx .w .ch .cweb \
|
||||||
.web .com .sh .elc .el";
|
.web .com .sh .elc .el";
|
||||||
#elif defined(__EMX__)
|
#elif MK_OS_OS2
|
||||||
= ".out .a .ln .o .c .cc .C .cpp .p .f .F .m .r .y .l .ym .yl .s .S \
|
= ".out .a .ln .o .c .cc .C .cpp .p .f .F .m .r .y .l .ym .yl .s .S \
|
||||||
.mod .sym .def .h .info .dvi .tex .texinfo .texi .txinfo \
|
.mod .sym .def .h .info .dvi .tex .texinfo .texi .txinfo \
|
||||||
.w .ch .web .sh .elc .el .obj .exe .dll .lib";
|
.w .ch .web .sh .elc .el .obj .exe .dll .lib";
|
||||||
|
@ -653,7 +653,7 @@ dir_contents_file_exists_p (struct directory *dir,
|
|||||||
filename = downcase (filename);
|
filename = downcase (filename);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef __EMX__
|
#if MK_OS_OS2
|
||||||
if (filename != NULL)
|
if (filename != NULL)
|
||||||
{
|
{
|
||||||
size_t len = strlen (filename);
|
size_t len = strlen (filename);
|
||||||
|
52
src/job.c
52
src/job.c
@ -46,7 +46,7 @@ HANDLE main_thread;
|
|||||||
const char *default_shell = "command.com";
|
const char *default_shell = "command.com";
|
||||||
int batch_mode_shell = 0;
|
int batch_mode_shell = 0;
|
||||||
|
|
||||||
#elif defined (__EMX__)
|
#elif MK_OS_OS2
|
||||||
|
|
||||||
const char *default_shell = "/bin/sh";
|
const char *default_shell = "/bin/sh";
|
||||||
int batch_mode_shell = 0;
|
int batch_mode_shell = 0;
|
||||||
@ -102,7 +102,7 @@ static void vmsWaitForChildren (int *);
|
|||||||
# define WAIT_NOHANG 1
|
# define WAIT_NOHANG 1
|
||||||
#endif /* MK_OS_W32 */
|
#endif /* MK_OS_W32 */
|
||||||
|
|
||||||
#ifdef __EMX__
|
#if MK_OS_OS2
|
||||||
# include <process.h>
|
# include <process.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@ -368,7 +368,7 @@ create_batch_file (char const *base, int unixy, int *fd)
|
|||||||
}
|
}
|
||||||
#endif /* MK_OS_W32 */
|
#endif /* MK_OS_W32 */
|
||||||
|
|
||||||
#ifdef __EMX__
|
#if MK_OS_OS2
|
||||||
/* returns whether path is assumed to be a unix like shell. */
|
/* returns whether path is assumed to be a unix like shell. */
|
||||||
int
|
int
|
||||||
_is_unixy_shell (const char *path)
|
_is_unixy_shell (const char *path)
|
||||||
@ -412,7 +412,7 @@ _is_unixy_shell (const char *path)
|
|||||||
/* in doubt assume a unix like shell */
|
/* in doubt assume a unix like shell */
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
#endif /* __EMX__ */
|
#endif /* MK_OS_OS2 */
|
||||||
|
|
||||||
/* determines whether path looks to be a Bourne-like shell. */
|
/* determines whether path looks to be a Bourne-like shell. */
|
||||||
int
|
int
|
||||||
@ -600,7 +600,7 @@ child_handler (int sig UNUSED)
|
|||||||
|
|
||||||
jobserver_signal ();
|
jobserver_signal ();
|
||||||
|
|
||||||
#ifdef __EMX__
|
#if MK_OS_OS2
|
||||||
/* The signal handler must called only once! */
|
/* The signal handler must called only once! */
|
||||||
signal (SIGCHLD, SIG_DFL);
|
signal (SIGCHLD, SIG_DFL);
|
||||||
#endif
|
#endif
|
||||||
@ -1353,7 +1353,7 @@ start_job_command (struct child *child)
|
|||||||
|
|
||||||
#if !MK_OS_VMS
|
#if !MK_OS_VMS
|
||||||
if (
|
if (
|
||||||
#if MK_OS_DOS || defined (__EMX__)
|
#if MK_OS_DOS || MK_OS_OS2
|
||||||
unixy_shell /* the test is complicated and we already did it */
|
unixy_shell /* the test is complicated and we already did it */
|
||||||
#else
|
#else
|
||||||
(argv[0] && is_bourne_compatible_shell (argv[0]))
|
(argv[0] && is_bourne_compatible_shell (argv[0]))
|
||||||
@ -2171,7 +2171,7 @@ start_waiting_jobs (void)
|
|||||||
#if !MK_OS_W32
|
#if !MK_OS_W32
|
||||||
|
|
||||||
/* EMX: Start a child process. This function returns the new pid. */
|
/* EMX: Start a child process. This function returns the new pid. */
|
||||||
# if defined __EMX__
|
# if MK_OS_OS2
|
||||||
pid_t
|
pid_t
|
||||||
child_execute_job (struct childbase *child, int good_stdin, char **argv)
|
child_execute_job (struct childbase *child, int good_stdin, char **argv)
|
||||||
{
|
{
|
||||||
@ -2547,7 +2547,7 @@ exec_command (char **argv, char **envp)
|
|||||||
|
|
||||||
pid_t pid = -1;
|
pid_t pid = -1;
|
||||||
|
|
||||||
# ifdef __EMX__
|
# if MK_OS_OS2
|
||||||
/* Run the program. */
|
/* Run the program. */
|
||||||
pid = spawnvpe (P_NOWAIT, argv[0], argv, envp);
|
pid = spawnvpe (P_NOWAIT, argv[0], argv, envp);
|
||||||
if (pid >= 0)
|
if (pid >= 0)
|
||||||
@ -2569,7 +2569,7 @@ exec_command (char **argv, char **envp)
|
|||||||
environ = envp;
|
environ = envp;
|
||||||
execvp (argv[0], argv);
|
execvp (argv[0], argv);
|
||||||
|
|
||||||
# endif /* !__EMX__ */
|
# endif /* !MK_OS_OS2 */
|
||||||
|
|
||||||
switch (errno)
|
switch (errno)
|
||||||
{
|
{
|
||||||
@ -2584,7 +2584,7 @@ exec_command (char **argv, char **envp)
|
|||||||
int argc;
|
int argc;
|
||||||
int i=1;
|
int i=1;
|
||||||
|
|
||||||
# ifdef __EMX__
|
# if MK_OS_OS2
|
||||||
/* Do not use $SHELL from the environment */
|
/* Do not use $SHELL from the environment */
|
||||||
struct variable *p = lookup_variable ("SHELL", 5);
|
struct variable *p = lookup_variable ("SHELL", 5);
|
||||||
if (p)
|
if (p)
|
||||||
@ -2601,7 +2601,7 @@ exec_command (char **argv, char **envp)
|
|||||||
while (argv[argc] != 0)
|
while (argv[argc] != 0)
|
||||||
++argc;
|
++argc;
|
||||||
|
|
||||||
# ifdef __EMX__
|
# if MK_OS_OS2
|
||||||
if (!unixy_shell)
|
if (!unixy_shell)
|
||||||
++argc;
|
++argc;
|
||||||
# endif
|
# endif
|
||||||
@ -2609,7 +2609,7 @@ exec_command (char **argv, char **envp)
|
|||||||
new_argv = alloca ((1 + argc + 1) * sizeof (char *));
|
new_argv = alloca ((1 + argc + 1) * sizeof (char *));
|
||||||
new_argv[0] = (char *)shell;
|
new_argv[0] = (char *)shell;
|
||||||
|
|
||||||
# ifdef __EMX__
|
# if MK_OS_OS2
|
||||||
if (!unixy_shell)
|
if (!unixy_shell)
|
||||||
{
|
{
|
||||||
new_argv[1] = (char *)"/c";
|
new_argv[1] = (char *)"/c";
|
||||||
@ -2625,7 +2625,7 @@ exec_command (char **argv, char **envp)
|
|||||||
--argc;
|
--argc;
|
||||||
}
|
}
|
||||||
|
|
||||||
# ifdef __EMX__
|
# if MK_OS_OS2
|
||||||
pid = spawnvpe (P_NOWAIT, shell, new_argv, envp);
|
pid = spawnvpe (P_NOWAIT, shell, new_argv, envp);
|
||||||
if (pid >= 0)
|
if (pid >= 0)
|
||||||
break;
|
break;
|
||||||
@ -2639,7 +2639,7 @@ exec_command (char **argv, char **envp)
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
# ifdef __EMX__
|
# if MK_OS_OS2
|
||||||
case EINVAL:
|
case EINVAL:
|
||||||
/* this nasty error was driving me nuts :-( */
|
/* this nasty error was driving me nuts :-( */
|
||||||
O (error, NILF, _("spawnvpe: environment space might be exhausted"));
|
O (error, NILF, _("spawnvpe: environment space might be exhausted"));
|
||||||
@ -2725,7 +2725,7 @@ construct_command_argv_internal (char *line, char **restp, const char *shell,
|
|||||||
const char *sh_chars;
|
const char *sh_chars;
|
||||||
const char **sh_cmds;
|
const char **sh_cmds;
|
||||||
|
|
||||||
#elif defined (__EMX__)
|
#elif MK_OS_OS2
|
||||||
static const char *sh_chars_dos = "*?[];|<>%^&()";
|
static const char *sh_chars_dos = "*?[];|<>%^&()";
|
||||||
static const char *sh_cmds_dos[] =
|
static const char *sh_cmds_dos[] =
|
||||||
{ "break", "call", "cd", "chcp", "chdir", "cls", "copy", "ctty", "date",
|
{ "break", "call", "cd", "chcp", "chdir", "cls", "copy", "ctty", "date",
|
||||||
@ -2856,7 +2856,7 @@ construct_command_argv_internal (char *line, char **restp, const char *shell,
|
|||||||
if (slow_flag)
|
if (slow_flag)
|
||||||
goto slow;
|
goto slow;
|
||||||
#else /* not MK_OS_W32 */
|
#else /* not MK_OS_W32 */
|
||||||
#if MK_OS_DOS || defined (__EMX__)
|
#if MK_OS_DOS || MK_OS_OS2
|
||||||
else if (strcasecmp (shell, default_shell))
|
else if (strcasecmp (shell, default_shell))
|
||||||
{
|
{
|
||||||
extern int _is_unixy_shell (const char *_path);
|
extern int _is_unixy_shell (const char *_path);
|
||||||
@ -2877,7 +2877,7 @@ construct_command_argv_internal (char *line, char **restp, const char *shell,
|
|||||||
{
|
{
|
||||||
sh_chars = sh_chars_dos;
|
sh_chars = sh_chars_dos;
|
||||||
sh_cmds = sh_cmds_dos;
|
sh_cmds = sh_cmds_dos;
|
||||||
# ifdef __EMX__
|
# if MK_OS_OS2
|
||||||
if (_osmode == OS2_MODE)
|
if (_osmode == OS2_MODE)
|
||||||
{
|
{
|
||||||
sh_chars = sh_chars_os2;
|
sh_chars = sh_chars_os2;
|
||||||
@ -2888,7 +2888,7 @@ construct_command_argv_internal (char *line, char **restp, const char *shell,
|
|||||||
#else /* !MK_OS_DOS */
|
#else /* !MK_OS_DOS */
|
||||||
else if (strcmp (shell, default_shell))
|
else if (strcmp (shell, default_shell))
|
||||||
goto slow;
|
goto slow;
|
||||||
#endif /* !MK_OS_DOS && !__EMX__ */
|
#endif /* !MK_OS_DOS && !MK_OS_OS2 */
|
||||||
#endif /* not MK_OS_W32 */
|
#endif /* not MK_OS_W32 */
|
||||||
|
|
||||||
if (ifs)
|
if (ifs)
|
||||||
@ -2938,7 +2938,7 @@ construct_command_argv_internal (char *line, char **restp, const char *shell,
|
|||||||
DOS/Windows/OS2, if we don't have a POSIX shell, we keep the
|
DOS/Windows/OS2, if we don't have a POSIX shell, we keep the
|
||||||
pre-POSIX behavior of removing the backslash-newline. */
|
pre-POSIX behavior of removing the backslash-newline. */
|
||||||
if (instring == '"'
|
if (instring == '"'
|
||||||
#if MK_OS_DOS || defined (__EMX__) || MK_OS_W32
|
#if MK_OS_DOS || MK_OS_OS2 || MK_OS_W32
|
||||||
|| !unixy_shell
|
|| !unixy_shell
|
||||||
#endif
|
#endif
|
||||||
)
|
)
|
||||||
@ -3096,7 +3096,7 @@ construct_command_argv_internal (char *line, char **restp, const char *shell,
|
|||||||
{
|
{
|
||||||
if (streq (sh_cmds[j], new_argv[0]))
|
if (streq (sh_cmds[j], new_argv[0]))
|
||||||
goto slow;
|
goto slow;
|
||||||
#if defined(__EMX__) || MK_OS_W32
|
#if MK_OS_OS2 || MK_OS_W32
|
||||||
/* Non-Unix shells are case insensitive. */
|
/* Non-Unix shells are case insensitive. */
|
||||||
if (!unixy_shell
|
if (!unixy_shell
|
||||||
&& strcasecmp (sh_cmds[j], new_argv[0]) == 0)
|
&& strcasecmp (sh_cmds[j], new_argv[0]) == 0)
|
||||||
@ -3191,7 +3191,7 @@ construct_command_argv_internal (char *line, char **restp, const char *shell,
|
|||||||
char *command_ptr = NULL; /* used for batch_mode_shell mode */
|
char *command_ptr = NULL; /* used for batch_mode_shell mode */
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
# ifdef __EMX__ /* is this necessary? */
|
# if MK_OS_OS2 /* is this necessary? */
|
||||||
if (!unixy_shell && shellflags)
|
if (!unixy_shell && shellflags)
|
||||||
{
|
{
|
||||||
size_t len = strlen (shellflags);
|
size_t len = strlen (shellflags);
|
||||||
@ -3218,7 +3218,7 @@ construct_command_argv_internal (char *line, char **restp, const char *shell,
|
|||||||
|
|
||||||
/* Remove and ignore interior prefix chars [@+-] because they're
|
/* Remove and ignore interior prefix chars [@+-] because they're
|
||||||
meaningless given a single shell. */
|
meaningless given a single shell. */
|
||||||
#if MK_OS_DOS || defined (__EMX__)
|
#if MK_OS_DOS || MK_OS_OS2
|
||||||
if (unixy_shell) /* the test is complicated and we already did it */
|
if (unixy_shell) /* the test is complicated and we already did it */
|
||||||
#else
|
#else
|
||||||
if (is_bourne_compatible_shell (shell)
|
if (is_bourne_compatible_shell (shell)
|
||||||
@ -3414,7 +3414,7 @@ construct_command_argv_internal (char *line, char **restp, const char *shell,
|
|||||||
/* POSIX says we keep the backslash-newline. If we don't have a
|
/* POSIX says we keep the backslash-newline. If we don't have a
|
||||||
POSIX shell on DOS/Windows/OS2, mimic the pre-POSIX behavior
|
POSIX shell on DOS/Windows/OS2, mimic the pre-POSIX behavior
|
||||||
and remove the backslash/newline. */
|
and remove the backslash/newline. */
|
||||||
#if MK_OS_DOS || defined (__EMX__) || MK_OS_W32
|
#if MK_OS_DOS || MK_OS_OS2 || MK_OS_W32
|
||||||
# define PRESERVE_BSNL unixy_shell
|
# define PRESERVE_BSNL unixy_shell
|
||||||
#else
|
#else
|
||||||
# define PRESERVE_BSNL 1
|
# define PRESERVE_BSNL 1
|
||||||
@ -3516,7 +3516,7 @@ construct_command_argv_internal (char *line, char **restp, const char *shell,
|
|||||||
new_argv = construct_command_argv_internal (new_line, 0, 0, 0, 0,
|
new_argv = construct_command_argv_internal (new_line, 0, 0, 0, 0,
|
||||||
flags, 0);
|
flags, 0);
|
||||||
|
|
||||||
#ifdef __EMX__
|
#if MK_OS_OS2
|
||||||
else if (!unixy_shell)
|
else if (!unixy_shell)
|
||||||
{
|
{
|
||||||
/* new_line is local, must not be freed therefore
|
/* new_line is local, must not be freed therefore
|
||||||
@ -3649,7 +3649,7 @@ construct_command_argv (char *line, char **restp, struct file *file,
|
|||||||
strcpy (shell, p);
|
strcpy (shell, p);
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
#ifdef __EMX__
|
#if MK_OS_OS2
|
||||||
{
|
{
|
||||||
static const char *unixroot = NULL;
|
static const char *unixroot = NULL;
|
||||||
static const char *last_shell = "";
|
static const char *last_shell = "";
|
||||||
@ -3691,7 +3691,7 @@ construct_command_argv (char *line, char **restp, struct file *file,
|
|||||||
free (buf);
|
free (buf);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#endif /* __EMX__ */
|
#endif /* MK_OS_OS2 */
|
||||||
|
|
||||||
var = lookup_variable_for_file (STRING_SIZE_TUPLE (".SHELLFLAGS"), file);
|
var = lookup_variable_for_file (STRING_SIZE_TUPLE (".SHELLFLAGS"), file);
|
||||||
if (!var)
|
if (!var)
|
||||||
|
18
src/main.c
18
src/main.c
@ -34,7 +34,7 @@ this program. If not, see <https://www.gnu.org/licenses/>. */
|
|||||||
# include "sub_proc.h"
|
# include "sub_proc.h"
|
||||||
# include "w32err.h"
|
# include "w32err.h"
|
||||||
#endif
|
#endif
|
||||||
#ifdef __EMX__
|
#if MK_OS_OS2
|
||||||
# include <sys/types.h>
|
# include <sys/types.h>
|
||||||
# include <sys/wait.h>
|
# include <sys/wait.h>
|
||||||
#endif
|
#endif
|
||||||
@ -1694,7 +1694,7 @@ main (int argc, char **argv, char **envp)
|
|||||||
|| strneq (argv[0], "//", 2))
|
|| strneq (argv[0], "//", 2))
|
||||||
argv[0] = xstrdup (w32ify (argv[0], 1));
|
argv[0] = xstrdup (w32ify (argv[0], 1));
|
||||||
#else /* MK_OS_W32 */
|
#else /* MK_OS_W32 */
|
||||||
#if MK_OS_DOS || defined (__EMX__)
|
#if MK_OS_DOS || MK_OS_OS2
|
||||||
if (strchr (argv[0], '\\'))
|
if (strchr (argv[0], '\\'))
|
||||||
{
|
{
|
||||||
char *p;
|
char *p;
|
||||||
@ -1710,7 +1710,7 @@ main (int argc, char **argv, char **envp)
|
|||||||
if (current_directory[0] != '\0'
|
if (current_directory[0] != '\0'
|
||||||
&& argv[0] != 0
|
&& argv[0] != 0
|
||||||
&& (argv[0][0] != '/' && (argv[0][0] == '\0' || argv[0][1] != ':'))
|
&& (argv[0][0] != '/' && (argv[0][0] == '\0' || argv[0][1] != ':'))
|
||||||
# ifdef __EMX__
|
# if MK_OS_OS2
|
||||||
/* do not prepend cwd if argv[0] contains no '/', e.g. "make" */
|
/* do not prepend cwd if argv[0] contains no '/', e.g. "make" */
|
||||||
&& (strchr (argv[0], '/') != 0 || strchr (argv[0], '\\') != 0)
|
&& (strchr (argv[0], '/') != 0 || strchr (argv[0], '\\') != 0)
|
||||||
# endif
|
# endif
|
||||||
@ -1946,7 +1946,7 @@ main (int argc, char **argv, char **envp)
|
|||||||
f->last_mtime = f->mtime_before_update = f_mtime (f, 0);
|
f->last_mtime = f->mtime_before_update = f_mtime (f, 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifndef __EMX__ /* Don't use a SIGCHLD handler for OS/2 */
|
#if !MK_OS_OS2 /* Don't use a SIGCHLD handler for OS/2 */
|
||||||
#if !defined(HAVE_WAIT_NOHANG) || defined(MAKE_JOBSERVER)
|
#if !defined(HAVE_WAIT_NOHANG) || defined(MAKE_JOBSERVER)
|
||||||
/* Set up to handle children dying. This must be done before
|
/* Set up to handle children dying. This must be done before
|
||||||
reading in the makefiles so that 'shell' function calls will work.
|
reading in the makefiles so that 'shell' function calls will work.
|
||||||
@ -2110,7 +2110,7 @@ main (int argc, char **argv, char **envp)
|
|||||||
no_default_sh_exe = !find_and_set_default_shell (NULL);
|
no_default_sh_exe = !find_and_set_default_shell (NULL);
|
||||||
#endif /* MK_OS_W32 */
|
#endif /* MK_OS_W32 */
|
||||||
|
|
||||||
#if MK_OS_DOS || defined (__EMX__) || MK_OS_VMS
|
#if MK_OS_DOS || MK_OS_OS2 || MK_OS_VMS
|
||||||
/* We need to know what kind of shell we will be using. */
|
/* We need to know what kind of shell we will be using. */
|
||||||
{
|
{
|
||||||
extern int _is_unixy_shell (const char *_path);
|
extern int _is_unixy_shell (const char *_path);
|
||||||
@ -2130,7 +2130,7 @@ main (int argc, char **argv, char **envp)
|
|||||||
default_shell = shell_path;
|
default_shell = shell_path;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#endif /* MK_OS_DOS || __EMX__ */
|
#endif /* MK_OS_DOS || MK_OS_OS2 */
|
||||||
|
|
||||||
/* Final jobserver configuration.
|
/* Final jobserver configuration.
|
||||||
|
|
||||||
@ -2155,9 +2155,9 @@ main (int argc, char **argv, char **envp)
|
|||||||
else
|
else
|
||||||
job_slots = arg_job_slots;
|
job_slots = arg_job_slots;
|
||||||
|
|
||||||
#if MK_OS_DOS || defined (__EMX__) || MK_OS_VMS
|
#if MK_OS_DOS || MK_OS_OS2 || MK_OS_VMS
|
||||||
if (job_slots != 1
|
if (job_slots != 1
|
||||||
# ifdef __EMX__
|
# if MK_OS_OS2
|
||||||
&& _osmode != OS2_MODE /* turn off -j if we are in DOS mode */
|
&& _osmode != OS2_MODE /* turn off -j if we are in DOS mode */
|
||||||
# endif
|
# endif
|
||||||
)
|
)
|
||||||
@ -2731,7 +2731,7 @@ main (int argc, char **argv, char **envp)
|
|||||||
/* The exec'd "child" will be another make, of course. */
|
/* The exec'd "child" will be another make, of course. */
|
||||||
jobserver_pre_child(1);
|
jobserver_pre_child(1);
|
||||||
|
|
||||||
#if defined (__EMX__)
|
#if MK_OS_OS2
|
||||||
{
|
{
|
||||||
/* It is not possible to use execve() here because this
|
/* It is not possible to use execve() here because this
|
||||||
would cause the parent process to be terminated with
|
would cause the parent process to be terminated with
|
||||||
|
@ -93,6 +93,10 @@ extern int errno;
|
|||||||
# define MK_OS_ZOS 1
|
# define MK_OS_ZOS 1
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#if defined(__EMX__)
|
||||||
|
# define MK_OS_OS2 1
|
||||||
|
#endif
|
||||||
|
|
||||||
#ifdef __VMS
|
#ifdef __VMS
|
||||||
# define MK_OS_VMS 1
|
# define MK_OS_VMS 1
|
||||||
/* In strict ANSI mode, VMS compilers should not be defining the
|
/* In strict ANSI mode, VMS compilers should not be defining the
|
||||||
@ -834,7 +838,7 @@ extern volatile sig_atomic_t handling_fatal_signal;
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifndef initialize_main
|
#ifndef initialize_main
|
||||||
# ifdef __EMX__
|
# if MK_OS_OS2
|
||||||
# define initialize_main(pargc, pargv) \
|
# define initialize_main(pargc, pargv) \
|
||||||
{ _wildcard(pargc, pargv); _response(pargc, pargv); }
|
{ _wildcard(pargc, pargv); _response(pargc, pargv); }
|
||||||
# else
|
# else
|
||||||
@ -842,7 +846,7 @@ extern volatile sig_atomic_t handling_fatal_signal;
|
|||||||
# endif
|
# endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef __EMX__
|
#if MK_OS_OS2
|
||||||
# if !defined chdir
|
# if !defined chdir
|
||||||
# define chdir _chdir2
|
# define chdir _chdir2
|
||||||
# endif
|
# endif
|
||||||
|
@ -28,7 +28,7 @@ this program. If not, see <https://www.gnu.org/licenses/>. */
|
|||||||
# include <io.h>
|
# include <io.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef __EMX__
|
#if MK_OS_OS2
|
||||||
# define INCL_DOS
|
# define INCL_DOS
|
||||||
# include <os2.h>
|
# include <os2.h>
|
||||||
#endif
|
#endif
|
||||||
@ -585,7 +585,7 @@ get_tmpdir ()
|
|||||||
|
|
||||||
if (!tmpdir)
|
if (!tmpdir)
|
||||||
{
|
{
|
||||||
#if MK_OS_DOS || MK_OS_W32 || defined (__EMX__)
|
#if MK_OS_DOS || MK_OS_W32 || MK_OS_OS2
|
||||||
# define TMP_EXTRAS "TMP", "TEMP",
|
# define TMP_EXTRAS "TMP", "TEMP",
|
||||||
#else
|
#else
|
||||||
# define TMP_EXTRAS
|
# define TMP_EXTRAS
|
||||||
@ -786,7 +786,7 @@ get_tmpfile (char **name)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
#if HAVE_TTYNAME && defined(__EMX__)
|
#if HAVE_TTYNAME && MK_OS_OS2
|
||||||
/* OS/2 kLIBC has a declaration for ttyname(), so configure finds it.
|
/* OS/2 kLIBC has a declaration for ttyname(), so configure finds it.
|
||||||
But, it is not implemented! Roll our own. */
|
But, it is not implemented! Roll our own. */
|
||||||
char *ttyname (int fd)
|
char *ttyname (int fd)
|
||||||
|
@ -557,7 +557,7 @@ set_child_handler_action_flags (int set_handler, int set_alarm)
|
|||||||
{
|
{
|
||||||
struct sigaction sa;
|
struct sigaction sa;
|
||||||
|
|
||||||
#ifdef __EMX__
|
#if MK_OS_OS2
|
||||||
/* The child handler must be turned off here. */
|
/* The child handler must be turned off here. */
|
||||||
signal (SIGCHLD, SIG_DFL);
|
signal (SIGCHLD, SIG_DFL);
|
||||||
#endif
|
#endif
|
||||||
|
@ -1895,7 +1895,7 @@ check_specials (struct nameseq *files, int set_default)
|
|||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
#if !MK_OS_DOS && !defined (__EMX__)
|
#if !MK_OS_DOS && !MK_OS_OS2
|
||||||
if (!one_shell && streq (nm, ".ONESHELL"))
|
if (!one_shell && streq (nm, ".ONESHELL"))
|
||||||
{
|
{
|
||||||
one_shell = 1;
|
one_shell = 1;
|
||||||
@ -2673,7 +2673,7 @@ readline (struct ebuffer *ebuf)
|
|||||||
/* We got a newline, so add one to the count of lines. */
|
/* We got a newline, so add one to the count of lines. */
|
||||||
++nlines;
|
++nlines;
|
||||||
|
|
||||||
#if !MK_OS_W32 && !MK_OS_DOS && !defined(__EMX__)
|
#if !MK_OS_W32 && !MK_OS_DOS && !MK_OS_OS2
|
||||||
/* Check to see if the line was really ended with CRLF; if so ignore
|
/* Check to see if the line was really ended with CRLF; if so ignore
|
||||||
the CR. */
|
the CR. */
|
||||||
if ((p - start) > 1 && p[-2] == '\r')
|
if ((p - start) > 1 && p[-2] == '\r')
|
||||||
|
@ -893,7 +893,7 @@ define_automatic_variables (void)
|
|||||||
(void) define_variable (shell_str, shlen, comp->value, o_env, 0);
|
(void) define_variable (shell_str, shlen, comp->value, o_env, 0);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#elif defined(__EMX__)
|
#elif MK_OS_OS2
|
||||||
{
|
{
|
||||||
static char shell_str[] = "SHELL";
|
static char shell_str[] = "SHELL";
|
||||||
const int shlen = sizeof (shell_str) - 1;
|
const int shlen = sizeof (shell_str) - 1;
|
||||||
@ -954,7 +954,7 @@ define_automatic_variables (void)
|
|||||||
environment variable on MSDOS, so whoever sets it, does that on purpose.
|
environment variable on MSDOS, so whoever sets it, does that on purpose.
|
||||||
On OS/2 we do not use SHELL from environment but we have already handled
|
On OS/2 we do not use SHELL from environment but we have already handled
|
||||||
that problem above. */
|
that problem above. */
|
||||||
#if !MK_OS_DOS && !defined(__EMX__)
|
#if !MK_OS_DOS && !MK_OS_OS2
|
||||||
/* Don't let SHELL come from the environment. */
|
/* Don't let SHELL come from the environment. */
|
||||||
if (*v->value == '\0' || v->origin == o_env || v->origin == o_env_override)
|
if (*v->value == '\0' || v->origin == o_env || v->origin == o_env_override)
|
||||||
{
|
{
|
||||||
|
@ -231,7 +231,7 @@ construct_vpath_list (char *pattern, char *dirpath)
|
|||||||
len = p - v;
|
len = p - v;
|
||||||
/* Make sure there's no trailing slash,
|
/* Make sure there's no trailing slash,
|
||||||
but still allow "/" as a directory. */
|
but still allow "/" as a directory. */
|
||||||
#if MK_OS_DOS || defined(__EMX__) || defined(HAVE_DOS_PATHS)
|
#if MK_OS_DOS || MK_OS_OS2 || defined(HAVE_DOS_PATHS)
|
||||||
/* We need also to leave alone a trailing slash in "d:/". */
|
/* We need also to leave alone a trailing slash in "d:/". */
|
||||||
if (len > 3 || (len > 1 && v[1] != ':'))
|
if (len > 3 || (len > 1 && v[1] != ':'))
|
||||||
#endif
|
#endif
|
||||||
|
Loading…
Reference in New Issue
Block a user