mirror of
https://github.com/mirror/make.git
synced 2025-01-30 22:30:23 +08:00
Clean up some preprocessor operations
This commit is contained in:
parent
9b9f3351d1
commit
8285852e55
@ -292,8 +292,8 @@ ar_scan (const char *archive, ar_member_func_t function, const void *varg)
|
||||
#else /* !MK_OS_VMS */
|
||||
|
||||
/* SCO Unix's compiler defines both of these. */
|
||||
#ifdef M_UNIX
|
||||
#undef M_XENIX
|
||||
#ifdef M_UNIX
|
||||
#undef M_XENIX
|
||||
#endif
|
||||
|
||||
/* On the sun386i and in System V rel 3, ar.h defines two different archive
|
||||
@ -302,7 +302,7 @@ ar_scan (const char *archive, ar_member_func_t function, const void *varg)
|
||||
to have a nonzero value. */
|
||||
|
||||
#if (!defined (PORTAR) || PORTAR == 0) && (!defined (PORT5AR) || PORT5AR == 0)
|
||||
#undef PORTAR
|
||||
#undef PORTAR
|
||||
#ifdef M_XENIX
|
||||
/* According to Jim Sievert <jas1@rsvl.unisys.com>, for SCO XENIX defining
|
||||
PORTAR to 1 gets the wrong archive format, and defining it to 0 gets the
|
||||
|
@ -313,7 +313,7 @@ set_file_variables (struct file *file, const char *stem)
|
||||
DEFINE_VARIABLE ("|", 1, bar_value);
|
||||
}
|
||||
|
||||
#undef DEFINE_VARIABLE
|
||||
#undef DEFINE_VARIABLE
|
||||
}
|
||||
|
||||
/* Chop CMDS up into individual command lines if necessary.
|
||||
|
@ -552,17 +552,17 @@ static const char *default_variables[] =
|
||||
"COFLAGS", "",
|
||||
|
||||
"CPP", "$(CC) -E",
|
||||
#ifdef CRAY
|
||||
#ifdef CRAY
|
||||
"CF77PPFLAGS", "-P",
|
||||
"CF77PP", "/lib/cpp",
|
||||
"CFT", "cft77",
|
||||
"CF", "cf77",
|
||||
"FC", "$(CF)",
|
||||
#else /* Not CRAY. */
|
||||
#ifdef _IBMR2
|
||||
#else /* Not CRAY. */
|
||||
#ifdef _IBMR2
|
||||
"FC", "xlf",
|
||||
#else
|
||||
#ifdef __convex__
|
||||
#ifdef __convex__
|
||||
"FC", "fc",
|
||||
#else
|
||||
"FC", "f77",
|
||||
@ -582,10 +582,10 @@ static const char *default_variables[] =
|
||||
#endif
|
||||
"LINT", "lint",
|
||||
"M2C", "m2c",
|
||||
#ifdef pyr
|
||||
#ifdef pyr
|
||||
"PC", "pascal",
|
||||
#else
|
||||
#ifdef CRAY
|
||||
#ifdef CRAY
|
||||
"PC", "PASCAL",
|
||||
"SEGLDR", "segldr",
|
||||
#else
|
||||
@ -656,7 +656,7 @@ static const char *default_variables[] =
|
||||
"OUTPUT_OPTION", "-o $@",
|
||||
#endif
|
||||
|
||||
#ifdef SCCS_GET_MINUS_G
|
||||
#ifdef SCCS_GET_MINUS_G
|
||||
"SCCS_OUTPUT_OPTION", "-G$@",
|
||||
#endif
|
||||
|
||||
|
@ -20,7 +20,7 @@ this program. If not, see <https://www.gnu.org/licenses/>. */
|
||||
#include "dep.h"
|
||||
#include "debug.h"
|
||||
|
||||
#ifdef HAVE_DIRENT_H
|
||||
#ifdef HAVE_DIRENT_H
|
||||
# include <dirent.h>
|
||||
# define NAMLEN(dirent) strlen((dirent)->d_name)
|
||||
# if MK_OS_VMS
|
||||
|
18
src/main.c
18
src/main.c
@ -1241,11 +1241,11 @@ main (int argc, char **argv, char **envp)
|
||||
(void)bindtextdomain (PACKAGE, LOCALEDIR);
|
||||
(void)textdomain (PACKAGE);
|
||||
|
||||
#ifdef POSIX
|
||||
#ifdef POSIX
|
||||
sigemptyset (&fatal_signal_set);
|
||||
#define ADD_SIG(sig) sigaddset (&fatal_signal_set, sig)
|
||||
#else
|
||||
#ifdef HAVE_SIGSETMASK
|
||||
#ifdef HAVE_SIGSETMASK
|
||||
fatal_signal_mask = 0;
|
||||
#define ADD_SIG(sig) fatal_signal_mask |= sigmask (sig)
|
||||
#else
|
||||
@ -1278,7 +1278,7 @@ main (int argc, char **argv, char **envp)
|
||||
FATAL_SIG (SIGFPE);
|
||||
#endif
|
||||
|
||||
#ifdef SIGDANGER
|
||||
#ifdef SIGDANGER
|
||||
FATAL_SIG (SIGDANGER);
|
||||
#endif
|
||||
#ifdef SIGXCPU
|
||||
@ -1288,7 +1288,7 @@ main (int argc, char **argv, char **envp)
|
||||
FATAL_SIG (SIGXFSZ);
|
||||
#endif
|
||||
|
||||
#undef FATAL_SIG
|
||||
#undef FATAL_SIG
|
||||
|
||||
/* Do not ignore the child-death signal. This must be done before
|
||||
any children could possibly be created; otherwise, the wait
|
||||
@ -1405,7 +1405,7 @@ main (int argc, char **argv, char **envp)
|
||||
if (getcwd (current_directory, GET_PATH_MAX) == 0)
|
||||
#endif
|
||||
{
|
||||
#ifdef HAVE_GETCWD
|
||||
#ifdef HAVE_GETCWD
|
||||
perror_with_name ("getcwd", "");
|
||||
#else
|
||||
OS (error, NILF, "getwd: %s", current_directory);
|
||||
@ -1693,8 +1693,7 @@ main (int argc, char **argv, char **envp)
|
||||
if (strpbrk (argv[0], "/:\\") || strstr (argv[0], "..")
|
||||
|| strneq (argv[0], "//", 2))
|
||||
argv[0] = xstrdup (w32ify (argv[0], 1));
|
||||
#else /* MK_OS_W32 */
|
||||
#if MK_OS_DOS || MK_OS_OS2
|
||||
#elif MK_OS_DOS || MK_OS_OS2
|
||||
if (strchr (argv[0], '\\'))
|
||||
{
|
||||
char *p;
|
||||
@ -1727,7 +1726,6 @@ main (int argc, char **argv, char **envp)
|
||||
argv[0] = xstrdup (concat (3, current_directory, "/", argv[0]));
|
||||
#endif /* !MK_OS_DOS */
|
||||
#endif /* MK_OS_W32 */
|
||||
#endif
|
||||
|
||||
/* We may move, but until we do, here we are. */
|
||||
starting_directory = current_directory;
|
||||
@ -1776,7 +1774,7 @@ main (int argc, char **argv, char **envp)
|
||||
if (getcwd (current_directory, GET_PATH_MAX) == 0)
|
||||
#endif
|
||||
{
|
||||
#ifdef HAVE_GETCWD
|
||||
#ifdef HAVE_GETCWD
|
||||
perror_with_name ("getcwd", "");
|
||||
#else
|
||||
OS (error, NILF, "getwd: %s", current_directory);
|
||||
@ -3531,7 +3529,7 @@ define_makeflags (int makefile)
|
||||
abort ();
|
||||
}
|
||||
|
||||
#undef ADD_FLAG
|
||||
#undef ADD_FLAG
|
||||
|
||||
/* Four more for the possible " -- ", plus variable references. */
|
||||
flagslen += 4 + CSTRLEN (posixref) + 4 + CSTRLEN (evalref) + 4;
|
||||
|
@ -49,7 +49,7 @@ this program. If not, see <https://www.gnu.org/licenses/>. */
|
||||
#endif
|
||||
#include "gnumake.h"
|
||||
|
||||
#ifdef CRAY
|
||||
#ifdef CRAY
|
||||
/* This must happen before #include <signal.h> so
|
||||
that the declaration therein is changed. */
|
||||
# define signal bsdsignal
|
||||
@ -107,7 +107,7 @@ extern int errno;
|
||||
# endif
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_UNISTD_H
|
||||
#ifdef HAVE_UNISTD_H
|
||||
# include <unistd.h>
|
||||
/* Ultrix's unistd.h always defines _POSIX_VERSION, but you only get
|
||||
POSIX.1 behavior with 'cc -YPOSIX', which predefines POSIX itself! */
|
||||
@ -137,10 +137,10 @@ extern int errno;
|
||||
# include <vfork.h>
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_LIMITS_H
|
||||
#ifdef HAVE_LIMITS_H
|
||||
# include <limits.h>
|
||||
#endif
|
||||
#ifdef HAVE_SYS_PARAM_H
|
||||
#ifdef HAVE_SYS_PARAM_H
|
||||
# include <sys/param.h>
|
||||
#endif
|
||||
|
||||
@ -154,7 +154,7 @@ extern int errno;
|
||||
# endif
|
||||
#endif
|
||||
|
||||
#ifdef PATH_MAX
|
||||
#ifdef PATH_MAX
|
||||
# define GET_PATH_MAX PATH_MAX
|
||||
# define PATH_VAR(var) char var[PATH_MAX+1]
|
||||
#else
|
||||
@ -269,16 +269,16 @@ void exit (int) NORETURN;
|
||||
# define EXIT_FAILURE 1
|
||||
#endif
|
||||
|
||||
#ifndef ANSI_STRING
|
||||
#ifndef ANSI_STRING
|
||||
|
||||
/* SCO Xenix has a buggy macro definition in <string.h>. */
|
||||
#undef strerror
|
||||
#undef strerror
|
||||
#if !defined(__DECC)
|
||||
char *strerror (int errnum);
|
||||
#endif
|
||||
|
||||
#endif /* !ANSI_STRING. */
|
||||
#undef ANSI_STRING
|
||||
#undef ANSI_STRING
|
||||
|
||||
#if HAVE_INTTYPES_H
|
||||
# include <inttypes.h>
|
||||
@ -691,7 +691,7 @@ void dbg (const char *fmt, ...);
|
||||
long int lseek ();
|
||||
# endif
|
||||
|
||||
# ifdef HAVE_GETCWD
|
||||
# ifdef HAVE_GETCWD
|
||||
# if !MK_OS_VMS && !defined(__DECC)
|
||||
char *getcwd (void);
|
||||
# endif
|
||||
|
@ -14,7 +14,7 @@ A PARTICULAR PURPOSE. See the GNU General Public License for more details.
|
||||
You should have received a copy of the GNU General Public License along with
|
||||
this program. If not, see <https://www.gnu.org/licenses/>. */
|
||||
|
||||
#ifndef _PROC_H
|
||||
#ifndef _PROC_H
|
||||
#define _PROC_H
|
||||
|
||||
typedef int bool_t;
|
||||
|
Loading…
Reference in New Issue
Block a user