Rename the make.h file to makeint.h for internal use only.
authorPaul Smith <psmith@gnu.org>
Sun, 20 Jan 2013 16:01:01 +0000 (11:01 -0500)
committerPaul Smith <psmith@gnu.org>
Sun, 20 Jan 2013 16:33:20 +0000 (11:33 -0500)
39 files changed:
ChangeLog
Makefile.am
Makefile.ami
SMakefile.template
amiga.c
ar.c
arscan.c
commands.c
config.h-vms.template
default.c
dir.c
expand.c
file.c
function.c
getloadavg.c
guile.c
hash.c
implicit.c
job.c
load.c
main.c
maintMakefile
make.h [deleted file]
make_msvc_net2003.vcproj
makeint.h [new file with mode: 0644]
misc.c
read.c
remake.c
remote-cstms.c
remote-stub.c
rule.c
signame.c
strcache.c
variable.c
version.c
vmsfunctions.c
vpath.c
w32/pathstuff.c
w32/subproc/w32err.c

index 48d4451b0377c90358b1193fa241f59b60c16ff1..92302a386b2d2b1dfa9bc38e15495ffb545bcd39 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2013-01-20  Paul Smith  <psmith@gnu.org>
+
+       * make.h: Rename to makeint.h.
+       * Many: Use the new name makeint.h.
+
 2013-01-19  Paul Smith  <psmith@gnu.org>
 
        * doc/make.texi (load Directive): Update to discuss location of
index c5ea81fd42e3d8b3794d0a52fa93cc2a63542292..5507750369b41880558f158081ad4032a6a0353a 100644 (file)
@@ -50,7 +50,7 @@ endif
 
 EXTRA_make_SOURCES = vmsjobs.c remote-stub.c remote-cstms.c
 
-noinst_HEADERS = commands.h dep.h filedef.h job.h make.h rule.h variable.h \
+noinst_HEADERS = commands.h dep.h filedef.h job.h makeint.h rule.h variable.h \
                debug.h getopt.h gettext.h hash.h
 
 make_LDADD =   @LIBOBJS@ @ALLOCA@ $(GLOBLIB) @GETLOADAVG_LIBS@ @LIBINTL@ \
index 3a0313d70e55b5ca9e03fe3d29e7f978ab568c26..1dc98c360f2aa3125489af0b2b2a38a9dc593c19 100644 (file)
@@ -134,7 +134,7 @@ srcs = $(srcdir)commands.c $(srcdir)job.c $(srcdir)dir.c             \
        $(srcdir)ar.c $(srcdir)arscan.c $(srcdir)strcache.c           \
        $(srcdir)signame.c $(srcdir)signame.h $(GETOPT_SRC)           \
        $(srcdir)commands.h $(srcdir)dep.h $(srcdir)filedep.h         \
-       $(srcdir)job.h $(srcdir)make.h $(srcdir)rule.h                \
+       $(srcdir)job.h $(srcdir)makeint.h $(srcdir)rule.h             \
        $(srcdir)variable.h $(ALLOCA_SRC) $(srcdir)config.h.in
 
 
@@ -273,36 +273,36 @@ $(objs): config.h
 # Automatically generated dependencies will be put at the end of the file.
 
 # Automatically generated dependencies.
-commands.o: commands.c make.h dep.h filedef.h variable.h job.h \
+commands.o: commands.c makeint.h dep.h filedef.h variable.h job.h \
  commands.h
-job.o: job.c make.h job.h filedef.h commands.h variable.h
-dir.o: dir.c make.h
-file.o: file.c make.h dep.h filedef.h job.h commands.h variable.h
-misc.o: misc.c make.h dep.h
-main.o: main.c make.h dep.h filedef.h variable.h job.h commands.h \
+job.o: job.c makeint.h job.h filedef.h commands.h variable.h
+dir.o: dir.c makeint.h
+file.o: file.c makeint.h dep.h filedef.h job.h commands.h variable.h
+misc.o: misc.c makeint.h dep.h
+main.o: main.c makeint.h dep.h filedef.h variable.h job.h commands.h \
  getopt.h
-guile.o: guile.c make.h dep.h debug.h variable.h gmk-default.h
-read.o: read.c make.h dep.h filedef.h job.h commands.h variable.h \
+guile.o: guile.c makeint.h dep.h debug.h variable.h gmk-default.h
+read.o: read.c makeint.h dep.h filedef.h job.h commands.h variable.h \
  glob/glob.h
-remake.o: remake.c make.h filedef.h job.h commands.h dep.h
-rule.o: rule.c make.h dep.h filedef.h job.h commands.h variable.h \
+remake.o: remake.c makeint.h filedef.h job.h commands.h dep.h
+rule.o: rule.c makeint.h dep.h filedef.h job.h commands.h variable.h \
  rule.h
-implicit.o: implicit.c make.h rule.h dep.h filedef.h
-default.o: default.c make.h rule.h dep.h filedef.h job.h commands.h \
+implicit.o: implicit.c makeint.h rule.h dep.h filedef.h
+default.o: default.c makeint.h rule.h dep.h filedef.h job.h commands.h \
  variable.h
-variable.o: variable.c make.h dep.h filedef.h job.h commands.h \
+variable.o: variable.c makeint.h dep.h filedef.h job.h commands.h \
  variable.h
-expand.o: expand.c make.h filedef.h job.h commands.h variable.h
-function.o: function.c make.h filedef.h variable.h dep.h job.h \
+expand.o: expand.c makeint.h filedef.h job.h commands.h variable.h
+function.o: function.c makeint.h filedef.h variable.h dep.h job.h \
  commands.h amiga.h
-vpath.o: vpath.c make.h filedef.h variable.h
-strcache.o: strcache.c make.h hash.h
+vpath.o: vpath.c makeint.h filedef.h variable.h
+strcache.o: strcache.c makeint.h hash.h
 version.o: version.c
-ar.o: ar.c make.h filedef.h dep.h
-arscan.o: arscan.c make.h
+ar.o: ar.c makeint.h filedef.h dep.h
+arscan.o: arscan.c makeint.h
 signame.o: signame.c signame.h
-remote-stub.o: remote-stub.c make.h filedef.h job.h commands.h
+remote-stub.o: remote-stub.c makeint.h filedef.h job.h commands.h
 getopt.o: getopt.c
 getopt1.o : getopt1.c getopt.h
 getloadavg.o: getloadavg.c
-amiga.o: amiga.c make.h variable.h amiga.h
+amiga.o: amiga.c makeint.h variable.h amiga.h
index ea737a4a0f4336565d5ed4cbbe6a32121437f30a..15c53747e6247adf62d7a0e1ad95bec2ea0b6b88 100644 (file)
@@ -140,7 +140,7 @@ srcs = $(srcdir)commands.c $(srcdir)job.c $(srcdir)dir.c             \
        $(srcdir)ar.c $(srcdir)arscan.c $(srcdir)strcache.c           \
        $(srcdir)signame.c $(srcdir)signame.h $(GETOPT_SRC)           \
        $(srcdir)commands.h $(srcdir)dep.h $(srcdir)file.h            \
-       $(srcdir)job.h $(srcdir)make.h $(srcdir)rule.h                \
+       $(srcdir)job.h $(srcdir)makeint.h $(srcdir)rule.h             \
        $(srcdir)variable.h $(ALLOCA_SRC) $(srcdir)config.h.in
 
 
diff --git a/amiga.c b/amiga.c
index 573220908334d70f242ff113511566b330377e1a..360d9f8591e2923ad1e840a01f555e7569e48506 100644 (file)
--- a/amiga.c
+++ b/amiga.c
@@ -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 <http://www.gnu.org/licenses/>.  */
 
-#include "make.h"
+#include "makeint.h"
 #include "variable.h"
 #include "amiga.h"
 #include <assert.h>
diff --git a/ar.c b/ar.c
index c57ed97ecf2d788a8519874a354f394c805dd599..8eb4e839262b3bfe53d6770f30bc955195a6a65f 100644 (file)
--- a/ar.c
+++ b/ar.c
@@ -15,7 +15,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 <http://www.gnu.org/licenses/>.  */
 
-#include "make.h"
+#include "makeint.h"
 
 #ifndef        NO_ARCHIVES
 
index 4fcf060ee473c0c6277489664784d93234caebf2..51c83b51b0417eab87019985bb3238f91767b580 100644 (file)
--- a/arscan.c
+++ b/arscan.c
@@ -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 <http://www.gnu.org/licenses/>.  */
 
-#include "make.h"
+#include "makeint.h"
 
 #ifdef HAVE_FCNTL_H
 #include <fcntl.h>
index 5e02ee72809116ccd681460406b6c331a92f7fe2..698816fab500c7b8ea10dac5afc4fdb951186127 100644 (file)
@@ -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 <http://www.gnu.org/licenses/>.  */
 
-#include "make.h"
+#include "makeint.h"
 #include "dep.h"
 #include "filedef.h"
 #include "variable.h"
index 1956cea97968d1860c504614a422030d8222b169..e5e623cf95b74aca149091a803f00bcc6ef135d7 100644 (file)
@@ -424,7 +424,7 @@ this program.  If not, see <http://www.gnu.org/licenses/>.  */
 
 /* Define if using alloca.c.  */
 /* #undef C_ALLOCA */
-/* maybe this should be placed into make.h */
+/* maybe this should be placed into makeint.h */
 #if    defined(__VAX) && defined(__DECC)
 #define alloca(n)      __ALLOCA(n)
 #endif
index 27718099b1d1f1b029e60a69fdb1ecaf1ff209e1..9f02dd40a5757e9287680e262bb3c459e6244b9c 100644 (file)
--- a/default.c
+++ b/default.c
@@ -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 <http://www.gnu.org/licenses/>.  */
 
-#include "make.h"
+#include "makeint.h"
 #include "filedef.h"
 #include "variable.h"
 #include "rule.h"
diff --git a/dir.c b/dir.c
index 7ab164f8c9964fc0a2211f6a0ff3907433a585e9..69eeb48179e32030eabd5ae59e0d73a32b8367e9 100644 (file)
--- a/dir.c
+++ b/dir.c
@@ -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 <http://www.gnu.org/licenses/>.  */
 
-#include "make.h"
+#include "makeint.h"
 #include "hash.h"
 
 #ifdef HAVE_DIRENT_H
index f3b316412f90e215333f8c2f73e0866e2157fb29..cce3bcde668888716d1ae0e9350b537845ba6f30 100644 (file)
--- a/expand.c
+++ b/expand.c
@@ -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 <http://www.gnu.org/licenses/>.  */
 
-#include "make.h"
+#include "makeint.h"
 
 #include <assert.h>
 
diff --git a/file.c b/file.c
index 896f7e223059902f82dae19d9fce42bfa5415cfa..b36edcb3a2689486b41928a58facdf38aa6c6166 100644 (file)
--- a/file.c
+++ b/file.c
@@ -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 <http://www.gnu.org/licenses/>.  */
 
-#include "make.h"
+#include "makeint.h"
 
 #include <assert.h>
 
index 325d9304387a64c38aeb84ca547e9f46a2cc94aa..d1b00ccca99daf4f33c77858627952ff7f061813 100644 (file)
@@ -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 <http://www.gnu.org/licenses/>.  */
 
-#include "make.h"
+#include "makeint.h"
 #include "filedef.h"
 #include "variable.h"
 #include "dep.h"
@@ -736,7 +736,7 @@ check_numeric (const char *s, const char *msg)
   strip_whitespace (&s, &end);
 
   for (; s <= end; ++s)
-    if (!ISDIGIT (*s))  /* ISDIGIT only evals its arg once: see make.h.  */
+    if (!ISDIGIT (*s))  /* ISDIGIT only evals its arg once: see makeint.h.  */
       break;
 
   if (s <= end || end - beg < 0)
index d8f2acd45c22f6dce29c95949f9c78866f6fae79..dfc2e4a0459afe96dabddcf81e1568975c54ed3e 100644 (file)
@@ -985,7 +985,7 @@ getloadavg (double loadavg[], int nelem)
 #endif /* ! HAVE_GETLOADAVG */
 \f
 #ifdef TEST
-#include "make.h"
+#include "makeint.h"
 
 int
 main (int argc, char **argv)
diff --git a/guile.c b/guile.c
index 9c9d958f0464f626155d9f80295e412e49dbcecf..5a652d9e2f0f01a4ff39879802ef9a3e2f375474 100644 (file)
--- a/guile.c
+++ b/guile.c
@@ -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 <http://www.gnu.org/licenses/>.  */
 
-#include "make.h"
+#include "makeint.h"
 #include "debug.h"
 #include "dep.h"
 #include "variable.h"
diff --git a/hash.c b/hash.c
index e04b1bbe22d72df215bf7f75436f818d244c1d17..d1c2facac8ff268d1f011c1fd13ac0fd4a2315e7 100644 (file)
--- a/hash.c
+++ b/hash.c
@@ -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 <http://www.gnu.org/licenses/>.  */
 
-#include "make.h"
+#include "makeint.h"
 #include "hash.h"
 
 #define        CALLOC(t, n) ((t *) calloc (sizeof (t), (n)))
index 060a80c525f9813561279e980963b3532608c458..fce9c89794fa27b4e2ba59ea4b4aaccf15d69451 100644 (file)
@@ -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 <http://www.gnu.org/licenses/>.  */
 
-#include "make.h"
+#include "makeint.h"
 #include "filedef.h"
 #include "rule.h"
 #include "dep.h"
diff --git a/job.c b/job.c
index 970a2fc2f43c61a0da2495dbad0d1500f2ea1fde..aa8748f99c71ec155b768641fbe448a8f5dce104 100644 (file)
--- a/job.c
+++ b/job.c
@@ -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 <http://www.gnu.org/licenses/>.  */
 
-#include "make.h"
+#include "makeint.h"
 
 #include <assert.h>
 
@@ -245,7 +245,7 @@ unsigned int jobserver_tokens = 0;
 \f
 #ifdef WINDOWS32
 /*
- * The macro which references this function is defined in make.h.
+ * The macro which references this function is defined in makeint.h.
  */
 int
 w32_kill(pid_t pid, int sig)
diff --git a/load.c b/load.c
index 26432b757637f2ca6e0ac5d7c25fda78fc9a7ca3..3e06982df52100e948f6a54d18ac4e354d8338b2 100644 (file)
--- a/load.c
+++ b/load.c
@@ -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 <http://www.gnu.org/licenses/>.  */
 
-#include "make.h"
+#include "makeint.h"
 
 #if MAKE_LOAD
 
diff --git a/main.c b/main.c
index 54b20617876be3ecfb08f8d0ebc6e98b5f8f7901..d06825e476a83aa82340b00ad49250ba095db0d2 100644 (file)
--- a/main.c
+++ b/main.c
@@ -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 <http://www.gnu.org/licenses/>.  */
 
-#include "make.h"
+#include "makeint.h"
 #include "dep.h"
 #include "filedef.h"
 #include "variable.h"
index a4fb2f14d4a1b005f71c17ce882aee45cb4d2340..bca38cec254e4ff8586ee8595aed684a84b41737 100644 (file)
@@ -203,11 +203,11 @@ changelog-check:
        fi
 
 # Verify that all source files using _() are listed in po/POTFILES.in.
-# Ignore make.h; it defines _().
+# Ignore makeint.h; it defines _().
 po-check:
        if test -f po/POTFILES.in; then \
          grep '^[^#]' po/POTFILES.in | sort > $@-1; \
-         $(PERL) -wn -e 'if (/\b_\(/) { $$ARGV eq "make.h" || print "$$ARGV\n" and close ARGV }' *.c *.h | sort > $@-2; \
+         $(PERL) -wn -e 'if (/\b_\(/) { $$ARGV eq "makeint.h" || print "$$ARGV\n" and close ARGV }' *.c *.h | sort > $@-2; \
          diff -u $@-1 $@-2 || exit 1; \
          rm -f $@-1 $@-2; \
        fi
diff --git a/make.h b/make.h
deleted file mode 100644 (file)
index 7bde58e..0000000
--- a/make.h
+++ /dev/null
@@ -1,642 +0,0 @@
-/* Miscellaneous global declarations and portability cruft for GNU Make.
-Copyright (C) 1988-2012 Free Software Foundation, Inc.
-This file is part of GNU Make.
-
-GNU Make is free software; you can redistribute it and/or modify it under the
-terms of the GNU General Public License as published by the Free Software
-Foundation; either version 3 of the License, or (at your option) any later
-version.
-
-GNU Make is distributed in the hope that it will be useful, but WITHOUT ANY
-WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
-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 <http://www.gnu.org/licenses/>.  */
-
-/* We use <config.h> instead of "config.h" so that a compilation
-   using -I. -I$srcdir will use ./config.h rather than $srcdir/config.h
-   (which it would do because make.h was found in $srcdir).  */
-#include <config.h>
-#undef  HAVE_CONFIG_H
-#define HAVE_CONFIG_H 1
-
-/* Specify we want GNU source code.  This must be defined before any
-   system headers are included.  */
-
-#define _GNU_SOURCE 1
-
-/* AIX requires this to be the first thing in the file.  */
-#if HAVE_ALLOCA_H
-# include <alloca.h>
-#else
-# ifdef _AIX
- #pragma alloca
-# else
-#  if !defined(__GNUC__) && !defined(WINDOWS32)
-#   ifndef alloca /* predefined by HP cc +Olibcalls */
-char *alloca ();
-#   endif
-#  endif
-# endif
-#endif
-
-/* Disable assert() unless we're a maintainer.
-   Some asserts are compute-intensive.  */
-#ifndef MAKE_MAINTAINER_MODE
-# define NDEBUG 1
-#endif
-
-
-#ifdef  CRAY
-/* This must happen before #include <signal.h> so
-   that the declaration therein is changed.  */
-# define signal bsdsignal
-#endif
-
-/* If we're compiling for the dmalloc debugger, turn off string inlining.  */
-#if defined(HAVE_DMALLOC_H) && defined(__GNUC__)
-# define __NO_STRING_INLINES
-#endif
-
-#include <sys/types.h>
-#include <sys/stat.h>
-#include <signal.h>
-#include <stdio.h>
-#include <ctype.h>
-
-#ifdef HAVE_SYS_TIMEB_H
-/* SCO 3.2 "devsys 4.2" has a prototype for 'ftime' in <time.h> that bombs
-   unless <sys/timeb.h> has been included first.  */
-# include <sys/timeb.h>
-#endif
-#if TIME_WITH_SYS_TIME
-# include <sys/time.h>
-# include <time.h>
-#else
-# if HAVE_SYS_TIME_H
-#  include <sys/time.h>
-# else
-#  include <time.h>
-# endif
-#endif
-
-#include <errno.h>
-
-#ifndef errno
-extern int errno;
-#endif
-
-#ifndef isblank
-# define isblank(c)     ((c) == ' ' || (c) == '\t')
-#endif
-
-#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!  */
-# if defined (_POSIX_VERSION) && !defined (ultrix) && !defined (VMS)
-#  define POSIX 1
-# endif
-#endif
-
-/* Some systems define _POSIX_VERSION but are not really POSIX.1.  */
-#if (defined (butterfly) || defined (__arm) || (defined (__mips) && defined (_SYSTYPE_SVR3)) || (defined (sequent) && defined (i386)))
-# undef POSIX
-#endif
-
-#if !defined (POSIX) && defined (_AIX) && defined (_POSIX_SOURCE)
-# define POSIX 1
-#endif
-
-#ifndef RETSIGTYPE
-# define RETSIGTYPE     void
-#endif
-
-#ifndef sigmask
-# define sigmask(sig)   (1 << ((sig) - 1))
-#endif
-
-#ifndef HAVE_SA_RESTART
-# define SA_RESTART 0
-#endif
-
-#ifdef  HAVE_LIMITS_H
-# include <limits.h>
-#endif
-#ifdef  HAVE_SYS_PARAM_H
-# include <sys/param.h>
-#endif
-
-#ifndef PATH_MAX
-# ifndef POSIX
-#  define PATH_MAX      MAXPATHLEN
-# endif
-#endif
-#ifndef MAXPATHLEN
-# define MAXPATHLEN 1024
-#endif
-
-#ifdef  PATH_MAX
-# define GET_PATH_MAX   PATH_MAX
-# define PATH_VAR(var)  char var[PATH_MAX]
-#else
-# define NEED_GET_PATH_MAX 1
-# define GET_PATH_MAX   (get_path_max ())
-# define PATH_VAR(var)  char *var = alloca (GET_PATH_MAX)
-unsigned int get_path_max (void);
-#endif
-
-#ifndef CHAR_BIT
-# define CHAR_BIT 8
-#endif
-
-#ifndef USHRT_MAX
-# define USHRT_MAX 65535
-#endif
-
-/* Nonzero if the integer type T is signed.
-   Use <= to avoid GCC warnings about always-false expressions.  */
-#define INTEGER_TYPE_SIGNED(t) ((t) -1 <= 0)
-
-/* The minimum and maximum values for the integer type T.
-   Use ~ (t) 0, not -1, for portability to 1's complement hosts.  */
-#define INTEGER_TYPE_MINIMUM(t) \
-  (! INTEGER_TYPE_SIGNED (t) ? (t) 0 : ~ (t) 0 << (sizeof (t) * CHAR_BIT - 1))
-#define INTEGER_TYPE_MAXIMUM(t) (~ (t) 0 - INTEGER_TYPE_MINIMUM (t))
-
-#ifndef CHAR_MAX
-# define CHAR_MAX INTEGER_TYPE_MAXIMUM (char)
-#endif
-
-#ifdef STAT_MACROS_BROKEN
-# ifdef S_ISREG
-#  undef S_ISREG
-# endif
-# ifdef S_ISDIR
-#  undef S_ISDIR
-# endif
-#endif  /* STAT_MACROS_BROKEN.  */
-
-#ifndef S_ISREG
-# define S_ISREG(mode)  (((mode) & S_IFMT) == S_IFREG)
-#endif
-#ifndef S_ISDIR
-# define S_ISDIR(mode)  (((mode) & S_IFMT) == S_IFDIR)
-#endif
-
-#ifdef VMS
-# include <types.h>
-# include <unixlib.h>
-# include <unixio.h>
-# include <perror.h>
-/* Needed to use alloca on VMS.  */
-# include <builtins.h>
-#endif
-
-#ifndef __attribute__
-/* This feature is available in gcc versions 2.5 and later.  */
-# if __GNUC__ < 2 || (__GNUC__ == 2 && __GNUC_MINOR__ < 5) || __STRICT_ANSI__
-#  define __attribute__(x)
-# endif
-/* The __-protected variants of 'format' and 'printf' attributes
-   are accepted by gcc versions 2.6.4 (effectively 2.7) and later.  */
-# if __GNUC__ < 2 || (__GNUC__ == 2 && __GNUC_MINOR__ < 7)
-#  define __format__ format
-#  define __printf__ printf
-# endif
-#endif
-#define UNUSED  __attribute__ ((unused))
-
-#if defined (STDC_HEADERS) || defined (__GNU_LIBRARY__)
-# include <stdlib.h>
-# include <string.h>
-# define ANSI_STRING 1
-#else   /* No standard headers.  */
-# ifdef HAVE_STRING_H
-#  include <string.h>
-#  define ANSI_STRING 1
-# else
-#  include <strings.h>
-# endif
-# ifdef HAVE_MEMORY_H
-#  include <memory.h>
-# endif
-# ifdef HAVE_STDLIB_H
-#  include <stdlib.h>
-# else
-void *malloc (int);
-void *realloc (void *, int);
-void free (void *);
-
-void abort (void) __attribute__ ((noreturn));
-void exit (int) __attribute__ ((noreturn));
-# endif /* HAVE_STDLIB_H.  */
-
-#endif /* Standard headers.  */
-
-/* These should be in stdlib.h.  Make sure we have them.  */
-#ifndef EXIT_SUCCESS
-# define EXIT_SUCCESS 0
-#endif
-#ifndef EXIT_FAILURE
-# define EXIT_FAILURE 1
-#endif
-
-#ifndef  ANSI_STRING
-
-/* SCO Xenix has a buggy macro definition in <string.h>.  */
-#undef  strerror
-#if !defined(__DECC)
-char *strerror (int errnum);
-#endif
-
-#endif  /* !ANSI_STRING.  */
-#undef  ANSI_STRING
-
-#if HAVE_INTTYPES_H
-# include <inttypes.h>
-#endif
-#if HAVE_STDINT_H
-# include <stdint.h>
-#endif
-#define FILE_TIMESTAMP uintmax_t
-
-#if !defined(HAVE_STRSIGNAL)
-char *strsignal (int signum);
-#endif
-
-/* ISDIGIT offers the following features:
-   - Its arg may be any int or unsigned int; it need not be an unsigned char.
-   - It's guaranteed to evaluate its argument exactly once.
-      NOTE!  Make relies on this behavior, don't change it!
-   - It's typically faster.
-   POSIX 1003.2-1992 section 2.5.2.1 page 50 lines 1556-1558 says that
-   only '0' through '9' are digits.  Prefer ISDIGIT to isdigit() unless
-   it's important to use the locale's definition of 'digit' even when the
-   host does not conform to POSIX.  */
-#define ISDIGIT(c) ((unsigned) (c) - '0' <= 9)
-
-/* Test if two strings are equal. Is this worthwhile?  Should be profiled.  */
-#define streq(a, b) \
-   ((a) == (b) || \
-    (*(a) == *(b) && (*(a) == '\0' || !strcmp ((a) + 1, (b) + 1))))
-
-/* Test if two strings are equal, but match case-insensitively on systems
-   which have case-insensitive filesystems.  Should only be used for
-   filenames!  */
-#ifdef HAVE_CASE_INSENSITIVE_FS
-# define patheq(a, b) \
-    ((a) == (b) \
-     || (tolower((unsigned char)*(a)) == tolower((unsigned char)*(b)) \
-         && (*(a) == '\0' || !strcasecmp ((a) + 1, (b) + 1))))
-#else
-# define patheq(a, b) streq(a, b)
-#endif
-
-#define strneq(a, b, l) (strncmp ((a), (b), (l)) == 0)
-
-#if defined(__GNUC__) || defined(ENUM_BITFIELDS)
-# define ENUM_BITFIELD(bits)    :bits
-#else
-# define ENUM_BITFIELD(bits)
-#endif
-
-/* Handle gettext and locales.  */
-
-#if HAVE_LOCALE_H
-# include <locale.h>
-#else
-# define setlocale(category, locale)
-#endif
-
-#include <gettext.h>
-
-#define _(msgid)            gettext (msgid)
-#define N_(msgid)           gettext_noop (msgid)
-#define S_(msg1,msg2,num)   ngettext (msg1,msg2,num)
-
-/* Handle other OSs.
-   To overcome an issue parsing paths in a DOS/Windows environment when
-   built in a unix based environment, override the PATH_SEPARATOR_CHAR
-   definition unless being built for Cygwin. */
-#if defined(HAVE_DOS_PATHS) && !defined(__CYGWIN__)
-# undef PATH_SEPARATOR_CHAR
-# define PATH_SEPARATOR_CHAR ';'
-#elif !defined(PATH_SEPARATOR_CHAR)
-# if defined (VMS)
-#  define PATH_SEPARATOR_CHAR ','
-# else
-#  define PATH_SEPARATOR_CHAR ':'
-# endif
-#endif
-
-/* This is needed for getcwd() and chdir(), on some W32 systems.  */
-#if defined(HAVE_DIRECT_H)
-# include <direct.h>
-#endif
-
-#ifdef WINDOWS32
-# include <fcntl.h>
-# include <malloc.h>
-# define pipe(_p)        _pipe((_p), 512, O_BINARY)
-# define kill(_pid,_sig) w32_kill((_pid),(_sig))
-
-void sync_Path_environment (void);
-int w32_kill (pid_t pid, int sig);
-char *end_of_token_w32 (const char *s, char stopchar);
-int find_and_set_default_shell (const char *token);
-
-/* indicates whether or not we have Bourne shell */
-extern int no_default_sh_exe;
-
-/* is default_shell unixy? */
-extern int unixy_shell;
-#endif  /* WINDOWS32 */
-
-#if defined(HAVE_SYS_RESOURCE_H) && defined(HAVE_GETRLIMIT) && defined(HAVE_SETRLIMIT)
-# define SET_STACK_SIZE
-#endif
-#ifdef SET_STACK_SIZE
-# include <sys/resource.h>
-extern struct rlimit stack_limit;
-#endif
-
-struct floc
-  {
-    const char *filenm;
-    unsigned long lineno;
-  };
-#define NILF ((struct floc *)0)
-
-#define CSTRLEN(_s) (sizeof (_s)-1)
-#define STRING_SIZE_TUPLE(_s) (_s), CSTRLEN(_s)
-
-\f
-/* We have to have stdarg.h or varargs.h AND v*printf or doprnt to use
-   variadic versions of these functions.  */
-
-#if HAVE_STDARG_H || HAVE_VARARGS_H
-# if HAVE_VPRINTF || HAVE_DOPRNT
-#  define USE_VARIADIC 1
-# endif
-#endif
-
-#if HAVE_ANSI_COMPILER && USE_VARIADIC && HAVE_STDARG_H
-const char *concat (unsigned int, ...);
-void message (int prefix, const char *fmt, ...)
-              __attribute__ ((__format__ (__printf__, 2, 3)));
-void error (const struct floc *flocp, const char *fmt, ...)
-            __attribute__ ((__format__ (__printf__, 2, 3)));
-void fatal (const struct floc *flocp, const char *fmt, ...)
-                   __attribute__ ((noreturn, __format__ (__printf__, 2, 3)));
-#else
-const char *concat ();
-void message ();
-void error ();
-void fatal ();
-#endif
-
-void die (int) __attribute__ ((noreturn));
-void log_working_directory (int);
-void pfatal_with_name (const char *) __attribute__ ((noreturn));
-void perror_with_name (const char *, const char *);
-void *xmalloc (unsigned int);
-void *xcalloc (unsigned int);
-void *xrealloc (void *, unsigned int);
-char *xstrdup (const char *);
-char *xstrndup (const char *, unsigned int);
-char *find_next_token (const char **, unsigned int *);
-char *next_token (const char *);
-char *end_of_token (const char *);
-void collapse_continuations (char *);
-char *lindex (const char *, const char *, int);
-int alpha_compare (const void *, const void *);
-void print_spaces (unsigned int);
-char *find_percent (char *);
-const char *find_percent_cached (const char **);
-FILE *open_tmpfile (char **, const char *);
-
-#ifndef NO_ARCHIVES
-int ar_name (const char *);
-void ar_parse_name (const char *, char **, char **);
-int ar_touch (const char *);
-time_t ar_member_date (const char *);
-
-typedef long int (*ar_member_func_t) (int desc, const char *mem, int truncated,
-                                     long int hdrpos, long int datapos,
-                                     long int size, long int date, int uid,
-                                     int gid, int mode, const void *arg);
-
-long int ar_scan (const char *archive, ar_member_func_t function, const void *arg);
-int ar_name_equal (const char *name, const char *mem, int truncated);
-#ifndef VMS
-int ar_member_touch (const char *arname, const char *memname);
-#endif
-#endif
-
-int dir_file_exists_p (const char *, const char *);
-int file_exists_p (const char *);
-int file_impossible_p (const char *);
-void file_impossible (const char *);
-const char *dir_name (const char *);
-void hash_init_directories (void);
-
-void define_default_variables (void);
-void set_default_suffixes (void);
-void install_default_suffix_rules (void);
-void install_default_implicit_rules (void);
-
-void build_vpath_lists (void);
-void construct_vpath_list (char *pattern, char *dirpath);
-const char *vpath_search (const char *file, FILE_TIMESTAMP *mtime_ptr,
-                          unsigned int* vpath_index, unsigned int* path_index);
-int gpath_search (const char *file, unsigned int len);
-
-void construct_include_path (const char **arg_dirs);
-
-void user_access (void);
-void make_access (void);
-void child_access (void);
-
-void close_stdout (void);
-
-char *strip_whitespace (const char **begpp, const char **endpp);
-
-/* String caching  */
-void strcache_init (void);
-void strcache_print_stats (const char *prefix);
-int strcache_iscached (const char *str);
-const char *strcache_add (const char *str);
-const char *strcache_add_len (const char *str, unsigned int len);
-int strcache_setbufsize (unsigned int size);
-
-/* Guile support  */
-#ifdef HAVE_GUILE
-int guile_gmake_setup (const struct floc *flocp);
-#endif
-
-/* Loadable object support.  Sets to the strcached name of the loaded file.  */
-typedef int (*load_func_t)(const struct floc *flocp);
-int load_file (const struct floc *flocp, const char **filename, int noerror);
-
-#ifdef  HAVE_VFORK_H
-# include <vfork.h>
-#endif
-
-/* We omit these declarations on non-POSIX systems which define _POSIX_VERSION,
-   because such systems often declare them in header files anyway.  */
-
-#if !defined (__GNU_LIBRARY__) && !defined (POSIX) && !defined (_POSIX_VERSION) && !defined(WINDOWS32)
-
-long int atol ();
-# ifndef VMS
-long int lseek ();
-# endif
-
-#endif  /* Not GNU C library or POSIX.  */
-
-#ifdef  HAVE_GETCWD
-# if !defined(VMS) && !defined(__DECC)
-char *getcwd ();
-# endif
-#else
-char *getwd ();
-# define getcwd(buf, len)       getwd (buf)
-#endif
-
-#if !HAVE_STRCASECMP
-# if HAVE_STRICMP
-#  define strcasecmp stricmp
-# elif HAVE_STRCMPI
-#  define strcasecmp strcmpi
-# else
-/* Create our own, in misc.c */
-int strcasecmp (const char *s1, const char *s2);
-# endif
-#endif
-
-#if !HAVE_STRNCASECMP
-# if HAVE_STRNICMP
-#  define strncasecmp strnicmp
-# elif HAVE_STRNCMPI
-#  define strncasecmp strncmpi
-# else
-/* Create our own, in misc.c */
-int strncasecmp (const char *s1, const char *s2, int n);
-# endif
-#endif
-
-extern const struct floc *reading_file;
-extern const struct floc **expanding_var;
-
-extern char **environ;
-
-extern int just_print_flag, silent_flag, ignore_errors_flag, keep_going_flag;
-extern int print_data_base_flag, question_flag, touch_flag, always_make_flag;
-extern int env_overrides, no_builtin_rules_flag, no_builtin_variables_flag;
-extern int print_version_flag, print_directory_flag, check_symlink_flag;
-extern int warn_undefined_variables_flag, trace_flag, posix_pedantic;
-extern int not_parallel, second_expansion, clock_skew_detected;
-extern int rebuilding_makefiles, one_shell;
-
-/* can we run commands via 'sh -c xxx' or must we use batch files? */
-extern int batch_mode_shell;
-
-/* Resetting the command script introduction prefix character.  */
-#define RECIPEPREFIX_NAME          ".RECIPEPREFIX"
-#define RECIPEPREFIX_DEFAULT       '\t'
-extern char cmd_prefix;
-
-extern unsigned int job_slots;
-extern int job_fds[2];
-extern int job_rfd;
-#ifndef NO_FLOAT
-extern double max_load_average;
-#else
-extern int max_load_average;
-#endif
-
-extern char *program;
-extern char *starting_directory;
-extern unsigned int makelevel;
-extern char *version_string, *remote_description, *make_host;
-
-extern unsigned int commands_started;
-
-extern int handling_fatal_signal;
-
-
-#ifndef MIN
-#define MIN(_a,_b) ((_a)<(_b)?(_a):(_b))
-#endif
-#ifndef MAX
-#define MAX(_a,_b) ((_a)>(_b)?(_a):(_b))
-#endif
-
-#ifdef VMS
-#  define MAKE_SUCCESS 1
-#  define MAKE_TROUBLE 2
-#  define MAKE_FAILURE 3
-#else
-#  define MAKE_SUCCESS 0
-#  define MAKE_TROUBLE 1
-#  define MAKE_FAILURE 2
-#endif
-
-/* Set up heap debugging library dmalloc.  */
-
-#ifdef HAVE_DMALLOC_H
-#include <dmalloc.h>
-#endif
-
-#ifndef initialize_main
-# ifdef __EMX__
-#  define initialize_main(pargc, pargv) \
-                          { _wildcard(pargc, pargv); _response(pargc, pargv); }
-# else
-#  define initialize_main(pargc, pargv)
-# endif
-#endif
-
-#ifdef __EMX__
-# if !defined chdir
-#  define chdir _chdir2
-# endif
-# if !defined getcwd
-#  define getcwd _getcwd2
-# endif
-
-/* NO_CHDIR2 causes make not to use _chdir2() and _getcwd2() instead of
-   chdir() and getcwd(). This avoids some error messages for the
-   make testsuite but restricts the drive letter support. */
-# ifdef NO_CHDIR2
-#  warning NO_CHDIR2: usage of drive letters restricted
-#  undef chdir
-#  undef getcwd
-# endif
-#endif
-
-#ifndef initialize_main
-# define initialize_main(pargc, pargv)
-#endif
-
-
-/* Some systems (like Solaris, PTX, etc.) do not support the SA_RESTART flag
-   properly according to POSIX.  So, we try to wrap common system calls with
-   checks for EINTR.  Note that there are still plenty of system calls that
-   can fail with EINTR but this, reportedly, gets the vast majority of
-   failure cases.  If you still experience failures you'll need to either get
-   a system where SA_RESTART works, or you need to avoid -j.  */
-
-#define EINTRLOOP(_v,_c)   while (((_v)=_c)==-1 && errno==EINTR)
-
-/* While system calls that return integers are pretty consistent about
-   returning -1 on failure and setting errno in that case, functions that
-   return pointers are not always so well behaved.  Sometimes they return
-   NULL for expected behavior: one good example is readdir() which returns
-   NULL at the end of the directory--and _doesn't_ reset errno.  So, we have
-   to do it ourselves here.  */
-
-#define ENULLLOOP(_v,_c)   do { errno = 0; (_v) = _c; } \
-                           while((_v)==0 && errno==EINTR)
index cfb0debdd8f3591168628431e5f983def5389d3e..50492ad085b919259147a4404553a14a2feb7583 100644 (file)
                                RelativePath=".\job.h">\r
                        </File>\r
                        <File\r
-                               RelativePath=".\make.h">\r
+                               RelativePath=".\makeint.h">\r
                        </File>\r
                        <File\r
                                RelativePath=".\rule.h">\r
diff --git a/makeint.h b/makeint.h
new file mode 100644 (file)
index 0000000..60ffb4c
--- /dev/null
+++ b/makeint.h
@@ -0,0 +1,642 @@
+/* Miscellaneous global declarations and portability cruft for GNU Make.
+Copyright (C) 1988-2012 Free Software Foundation, Inc.
+This file is part of GNU Make.
+
+GNU Make is free software; you can redistribute it and/or modify it under the
+terms of the GNU General Public License as published by the Free Software
+Foundation; either version 3 of the License, or (at your option) any later
+version.
+
+GNU Make is distributed in the hope that it will be useful, but WITHOUT ANY
+WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
+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 <http://www.gnu.org/licenses/>.  */
+
+/* We use <config.h> instead of "config.h" so that a compilation
+   using -I. -I$srcdir will use ./config.h rather than $srcdir/config.h
+   (which it would do because makeint.h was found in $srcdir).  */
+#include <config.h>
+#undef  HAVE_CONFIG_H
+#define HAVE_CONFIG_H 1
+
+/* Specify we want GNU source code.  This must be defined before any
+   system headers are included.  */
+
+#define _GNU_SOURCE 1
+
+/* AIX requires this to be the first thing in the file.  */
+#if HAVE_ALLOCA_H
+# include <alloca.h>
+#else
+# ifdef _AIX
+ #pragma alloca
+# else
+#  if !defined(__GNUC__) && !defined(WINDOWS32)
+#   ifndef alloca /* predefined by HP cc +Olibcalls */
+char *alloca ();
+#   endif
+#  endif
+# endif
+#endif
+
+/* Disable assert() unless we're a maintainer.
+   Some asserts are compute-intensive.  */
+#ifndef MAKE_MAINTAINER_MODE
+# define NDEBUG 1
+#endif
+
+
+#ifdef  CRAY
+/* This must happen before #include <signal.h> so
+   that the declaration therein is changed.  */
+# define signal bsdsignal
+#endif
+
+/* If we're compiling for the dmalloc debugger, turn off string inlining.  */
+#if defined(HAVE_DMALLOC_H) && defined(__GNUC__)
+# define __NO_STRING_INLINES
+#endif
+
+#include <sys/types.h>
+#include <sys/stat.h>
+#include <signal.h>
+#include <stdio.h>
+#include <ctype.h>
+
+#ifdef HAVE_SYS_TIMEB_H
+/* SCO 3.2 "devsys 4.2" has a prototype for 'ftime' in <time.h> that bombs
+   unless <sys/timeb.h> has been included first.  */
+# include <sys/timeb.h>
+#endif
+#if TIME_WITH_SYS_TIME
+# include <sys/time.h>
+# include <time.h>
+#else
+# if HAVE_SYS_TIME_H
+#  include <sys/time.h>
+# else
+#  include <time.h>
+# endif
+#endif
+
+#include <errno.h>
+
+#ifndef errno
+extern int errno;
+#endif
+
+#ifndef isblank
+# define isblank(c)     ((c) == ' ' || (c) == '\t')
+#endif
+
+#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!  */
+# if defined (_POSIX_VERSION) && !defined (ultrix) && !defined (VMS)
+#  define POSIX 1
+# endif
+#endif
+
+/* Some systems define _POSIX_VERSION but are not really POSIX.1.  */
+#if (defined (butterfly) || defined (__arm) || (defined (__mips) && defined (_SYSTYPE_SVR3)) || (defined (sequent) && defined (i386)))
+# undef POSIX
+#endif
+
+#if !defined (POSIX) && defined (_AIX) && defined (_POSIX_SOURCE)
+# define POSIX 1
+#endif
+
+#ifndef RETSIGTYPE
+# define RETSIGTYPE     void
+#endif
+
+#ifndef sigmask
+# define sigmask(sig)   (1 << ((sig) - 1))
+#endif
+
+#ifndef HAVE_SA_RESTART
+# define SA_RESTART 0
+#endif
+
+#ifdef  HAVE_LIMITS_H
+# include <limits.h>
+#endif
+#ifdef  HAVE_SYS_PARAM_H
+# include <sys/param.h>
+#endif
+
+#ifndef PATH_MAX
+# ifndef POSIX
+#  define PATH_MAX      MAXPATHLEN
+# endif
+#endif
+#ifndef MAXPATHLEN
+# define MAXPATHLEN 1024
+#endif
+
+#ifdef  PATH_MAX
+# define GET_PATH_MAX   PATH_MAX
+# define PATH_VAR(var)  char var[PATH_MAX]
+#else
+# define NEED_GET_PATH_MAX 1
+# define GET_PATH_MAX   (get_path_max ())
+# define PATH_VAR(var)  char *var = alloca (GET_PATH_MAX)
+unsigned int get_path_max (void);
+#endif
+
+#ifndef CHAR_BIT
+# define CHAR_BIT 8
+#endif
+
+#ifndef USHRT_MAX
+# define USHRT_MAX 65535
+#endif
+
+/* Nonzero if the integer type T is signed.
+   Use <= to avoid GCC warnings about always-false expressions.  */
+#define INTEGER_TYPE_SIGNED(t) ((t) -1 <= 0)
+
+/* The minimum and maximum values for the integer type T.
+   Use ~ (t) 0, not -1, for portability to 1's complement hosts.  */
+#define INTEGER_TYPE_MINIMUM(t) \
+  (! INTEGER_TYPE_SIGNED (t) ? (t) 0 : ~ (t) 0 << (sizeof (t) * CHAR_BIT - 1))
+#define INTEGER_TYPE_MAXIMUM(t) (~ (t) 0 - INTEGER_TYPE_MINIMUM (t))
+
+#ifndef CHAR_MAX
+# define CHAR_MAX INTEGER_TYPE_MAXIMUM (char)
+#endif
+
+#ifdef STAT_MACROS_BROKEN
+# ifdef S_ISREG
+#  undef S_ISREG
+# endif
+# ifdef S_ISDIR
+#  undef S_ISDIR
+# endif
+#endif  /* STAT_MACROS_BROKEN.  */
+
+#ifndef S_ISREG
+# define S_ISREG(mode)  (((mode) & S_IFMT) == S_IFREG)
+#endif
+#ifndef S_ISDIR
+# define S_ISDIR(mode)  (((mode) & S_IFMT) == S_IFDIR)
+#endif
+
+#ifdef VMS
+# include <types.h>
+# include <unixlib.h>
+# include <unixio.h>
+# include <perror.h>
+/* Needed to use alloca on VMS.  */
+# include <builtins.h>
+#endif
+
+#ifndef __attribute__
+/* This feature is available in gcc versions 2.5 and later.  */
+# if __GNUC__ < 2 || (__GNUC__ == 2 && __GNUC_MINOR__ < 5) || __STRICT_ANSI__
+#  define __attribute__(x)
+# endif
+/* The __-protected variants of 'format' and 'printf' attributes
+   are accepted by gcc versions 2.6.4 (effectively 2.7) and later.  */
+# if __GNUC__ < 2 || (__GNUC__ == 2 && __GNUC_MINOR__ < 7)
+#  define __format__ format
+#  define __printf__ printf
+# endif
+#endif
+#define UNUSED  __attribute__ ((unused))
+
+#if defined (STDC_HEADERS) || defined (__GNU_LIBRARY__)
+# include <stdlib.h>
+# include <string.h>
+# define ANSI_STRING 1
+#else   /* No standard headers.  */
+# ifdef HAVE_STRING_H
+#  include <string.h>
+#  define ANSI_STRING 1
+# else
+#  include <strings.h>
+# endif
+# ifdef HAVE_MEMORY_H
+#  include <memory.h>
+# endif
+# ifdef HAVE_STDLIB_H
+#  include <stdlib.h>
+# else
+void *malloc (int);
+void *realloc (void *, int);
+void free (void *);
+
+void abort (void) __attribute__ ((noreturn));
+void exit (int) __attribute__ ((noreturn));
+# endif /* HAVE_STDLIB_H.  */
+
+#endif /* Standard headers.  */
+
+/* These should be in stdlib.h.  Make sure we have them.  */
+#ifndef EXIT_SUCCESS
+# define EXIT_SUCCESS 0
+#endif
+#ifndef EXIT_FAILURE
+# define EXIT_FAILURE 1
+#endif
+
+#ifndef  ANSI_STRING
+
+/* SCO Xenix has a buggy macro definition in <string.h>.  */
+#undef  strerror
+#if !defined(__DECC)
+char *strerror (int errnum);
+#endif
+
+#endif  /* !ANSI_STRING.  */
+#undef  ANSI_STRING
+
+#if HAVE_INTTYPES_H
+# include <inttypes.h>
+#endif
+#if HAVE_STDINT_H
+# include <stdint.h>
+#endif
+#define FILE_TIMESTAMP uintmax_t
+
+#if !defined(HAVE_STRSIGNAL)
+char *strsignal (int signum);
+#endif
+
+/* ISDIGIT offers the following features:
+   - Its arg may be any int or unsigned int; it need not be an unsigned char.
+   - It's guaranteed to evaluate its argument exactly once.
+      NOTE!  Make relies on this behavior, don't change it!
+   - It's typically faster.
+   POSIX 1003.2-1992 section 2.5.2.1 page 50 lines 1556-1558 says that
+   only '0' through '9' are digits.  Prefer ISDIGIT to isdigit() unless
+   it's important to use the locale's definition of 'digit' even when the
+   host does not conform to POSIX.  */
+#define ISDIGIT(c) ((unsigned) (c) - '0' <= 9)
+
+/* Test if two strings are equal. Is this worthwhile?  Should be profiled.  */
+#define streq(a, b) \
+   ((a) == (b) || \
+    (*(a) == *(b) && (*(a) == '\0' || !strcmp ((a) + 1, (b) + 1))))
+
+/* Test if two strings are equal, but match case-insensitively on systems
+   which have case-insensitive filesystems.  Should only be used for
+   filenames!  */
+#ifdef HAVE_CASE_INSENSITIVE_FS
+# define patheq(a, b) \
+    ((a) == (b) \
+     || (tolower((unsigned char)*(a)) == tolower((unsigned char)*(b)) \
+         && (*(a) == '\0' || !strcasecmp ((a) + 1, (b) + 1))))
+#else
+# define patheq(a, b) streq(a, b)
+#endif
+
+#define strneq(a, b, l) (strncmp ((a), (b), (l)) == 0)
+
+#if defined(__GNUC__) || defined(ENUM_BITFIELDS)
+# define ENUM_BITFIELD(bits)    :bits
+#else
+# define ENUM_BITFIELD(bits)
+#endif
+
+/* Handle gettext and locales.  */
+
+#if HAVE_LOCALE_H
+# include <locale.h>
+#else
+# define setlocale(category, locale)
+#endif
+
+#include <gettext.h>
+
+#define _(msgid)            gettext (msgid)
+#define N_(msgid)           gettext_noop (msgid)
+#define S_(msg1,msg2,num)   ngettext (msg1,msg2,num)
+
+/* Handle other OSs.
+   To overcome an issue parsing paths in a DOS/Windows environment when
+   built in a unix based environment, override the PATH_SEPARATOR_CHAR
+   definition unless being built for Cygwin. */
+#if defined(HAVE_DOS_PATHS) && !defined(__CYGWIN__)
+# undef PATH_SEPARATOR_CHAR
+# define PATH_SEPARATOR_CHAR ';'
+#elif !defined(PATH_SEPARATOR_CHAR)
+# if defined (VMS)
+#  define PATH_SEPARATOR_CHAR ','
+# else
+#  define PATH_SEPARATOR_CHAR ':'
+# endif
+#endif
+
+/* This is needed for getcwd() and chdir(), on some W32 systems.  */
+#if defined(HAVE_DIRECT_H)
+# include <direct.h>
+#endif
+
+#ifdef WINDOWS32
+# include <fcntl.h>
+# include <malloc.h>
+# define pipe(_p)        _pipe((_p), 512, O_BINARY)
+# define kill(_pid,_sig) w32_kill((_pid),(_sig))
+
+void sync_Path_environment (void);
+int w32_kill (pid_t pid, int sig);
+char *end_of_token_w32 (const char *s, char stopchar);
+int find_and_set_default_shell (const char *token);
+
+/* indicates whether or not we have Bourne shell */
+extern int no_default_sh_exe;
+
+/* is default_shell unixy? */
+extern int unixy_shell;
+#endif  /* WINDOWS32 */
+
+#if defined(HAVE_SYS_RESOURCE_H) && defined(HAVE_GETRLIMIT) && defined(HAVE_SETRLIMIT)
+# define SET_STACK_SIZE
+#endif
+#ifdef SET_STACK_SIZE
+# include <sys/resource.h>
+extern struct rlimit stack_limit;
+#endif
+
+struct floc
+  {
+    const char *filenm;
+    unsigned long lineno;
+  };
+#define NILF ((struct floc *)0)
+
+#define CSTRLEN(_s) (sizeof (_s)-1)
+#define STRING_SIZE_TUPLE(_s) (_s), CSTRLEN(_s)
+
+\f
+/* We have to have stdarg.h or varargs.h AND v*printf or doprnt to use
+   variadic versions of these functions.  */
+
+#if HAVE_STDARG_H || HAVE_VARARGS_H
+# if HAVE_VPRINTF || HAVE_DOPRNT
+#  define USE_VARIADIC 1
+# endif
+#endif
+
+#if HAVE_ANSI_COMPILER && USE_VARIADIC && HAVE_STDARG_H
+const char *concat (unsigned int, ...);
+void message (int prefix, const char *fmt, ...)
+              __attribute__ ((__format__ (__printf__, 2, 3)));
+void error (const struct floc *flocp, const char *fmt, ...)
+            __attribute__ ((__format__ (__printf__, 2, 3)));
+void fatal (const struct floc *flocp, const char *fmt, ...)
+                   __attribute__ ((noreturn, __format__ (__printf__, 2, 3)));
+#else
+const char *concat ();
+void message ();
+void error ();
+void fatal ();
+#endif
+
+void die (int) __attribute__ ((noreturn));
+void log_working_directory (int);
+void pfatal_with_name (const char *) __attribute__ ((noreturn));
+void perror_with_name (const char *, const char *);
+void *xmalloc (unsigned int);
+void *xcalloc (unsigned int);
+void *xrealloc (void *, unsigned int);
+char *xstrdup (const char *);
+char *xstrndup (const char *, unsigned int);
+char *find_next_token (const char **, unsigned int *);
+char *next_token (const char *);
+char *end_of_token (const char *);
+void collapse_continuations (char *);
+char *lindex (const char *, const char *, int);
+int alpha_compare (const void *, const void *);
+void print_spaces (unsigned int);
+char *find_percent (char *);
+const char *find_percent_cached (const char **);
+FILE *open_tmpfile (char **, const char *);
+
+#ifndef NO_ARCHIVES
+int ar_name (const char *);
+void ar_parse_name (const char *, char **, char **);
+int ar_touch (const char *);
+time_t ar_member_date (const char *);
+
+typedef long int (*ar_member_func_t) (int desc, const char *mem, int truncated,
+                                     long int hdrpos, long int datapos,
+                                     long int size, long int date, int uid,
+                                     int gid, int mode, const void *arg);
+
+long int ar_scan (const char *archive, ar_member_func_t function, const void *arg);
+int ar_name_equal (const char *name, const char *mem, int truncated);
+#ifndef VMS
+int ar_member_touch (const char *arname, const char *memname);
+#endif
+#endif
+
+int dir_file_exists_p (const char *, const char *);
+int file_exists_p (const char *);
+int file_impossible_p (const char *);
+void file_impossible (const char *);
+const char *dir_name (const char *);
+void hash_init_directories (void);
+
+void define_default_variables (void);
+void set_default_suffixes (void);
+void install_default_suffix_rules (void);
+void install_default_implicit_rules (void);
+
+void build_vpath_lists (void);
+void construct_vpath_list (char *pattern, char *dirpath);
+const char *vpath_search (const char *file, FILE_TIMESTAMP *mtime_ptr,
+                          unsigned int* vpath_index, unsigned int* path_index);
+int gpath_search (const char *file, unsigned int len);
+
+void construct_include_path (const char **arg_dirs);
+
+void user_access (void);
+void make_access (void);
+void child_access (void);
+
+void close_stdout (void);
+
+char *strip_whitespace (const char **begpp, const char **endpp);
+
+/* String caching  */
+void strcache_init (void);
+void strcache_print_stats (const char *prefix);
+int strcache_iscached (const char *str);
+const char *strcache_add (const char *str);
+const char *strcache_add_len (const char *str, unsigned int len);
+int strcache_setbufsize (unsigned int size);
+
+/* Guile support  */
+#ifdef HAVE_GUILE
+int guile_gmake_setup (const struct floc *flocp);
+#endif
+
+/* Loadable object support.  Sets to the strcached name of the loaded file.  */
+typedef int (*load_func_t)(const struct floc *flocp);
+int load_file (const struct floc *flocp, const char **filename, int noerror);
+
+#ifdef  HAVE_VFORK_H
+# include <vfork.h>
+#endif
+
+/* We omit these declarations on non-POSIX systems which define _POSIX_VERSION,
+   because such systems often declare them in header files anyway.  */
+
+#if !defined (__GNU_LIBRARY__) && !defined (POSIX) && !defined (_POSIX_VERSION) && !defined(WINDOWS32)
+
+long int atol ();
+# ifndef VMS
+long int lseek ();
+# endif
+
+#endif  /* Not GNU C library or POSIX.  */
+
+#ifdef  HAVE_GETCWD
+# if !defined(VMS) && !defined(__DECC)
+char *getcwd ();
+# endif
+#else
+char *getwd ();
+# define getcwd(buf, len)       getwd (buf)
+#endif
+
+#if !HAVE_STRCASECMP
+# if HAVE_STRICMP
+#  define strcasecmp stricmp
+# elif HAVE_STRCMPI
+#  define strcasecmp strcmpi
+# else
+/* Create our own, in misc.c */
+int strcasecmp (const char *s1, const char *s2);
+# endif
+#endif
+
+#if !HAVE_STRNCASECMP
+# if HAVE_STRNICMP
+#  define strncasecmp strnicmp
+# elif HAVE_STRNCMPI
+#  define strncasecmp strncmpi
+# else
+/* Create our own, in misc.c */
+int strncasecmp (const char *s1, const char *s2, int n);
+# endif
+#endif
+
+extern const struct floc *reading_file;
+extern const struct floc **expanding_var;
+
+extern char **environ;
+
+extern int just_print_flag, silent_flag, ignore_errors_flag, keep_going_flag;
+extern int print_data_base_flag, question_flag, touch_flag, always_make_flag;
+extern int env_overrides, no_builtin_rules_flag, no_builtin_variables_flag;
+extern int print_version_flag, print_directory_flag, check_symlink_flag;
+extern int warn_undefined_variables_flag, trace_flag, posix_pedantic;
+extern int not_parallel, second_expansion, clock_skew_detected;
+extern int rebuilding_makefiles, one_shell;
+
+/* can we run commands via 'sh -c xxx' or must we use batch files? */
+extern int batch_mode_shell;
+
+/* Resetting the command script introduction prefix character.  */
+#define RECIPEPREFIX_NAME          ".RECIPEPREFIX"
+#define RECIPEPREFIX_DEFAULT       '\t'
+extern char cmd_prefix;
+
+extern unsigned int job_slots;
+extern int job_fds[2];
+extern int job_rfd;
+#ifndef NO_FLOAT
+extern double max_load_average;
+#else
+extern int max_load_average;
+#endif
+
+extern char *program;
+extern char *starting_directory;
+extern unsigned int makelevel;
+extern char *version_string, *remote_description, *make_host;
+
+extern unsigned int commands_started;
+
+extern int handling_fatal_signal;
+
+
+#ifndef MIN
+#define MIN(_a,_b) ((_a)<(_b)?(_a):(_b))
+#endif
+#ifndef MAX
+#define MAX(_a,_b) ((_a)>(_b)?(_a):(_b))
+#endif
+
+#ifdef VMS
+#  define MAKE_SUCCESS 1
+#  define MAKE_TROUBLE 2
+#  define MAKE_FAILURE 3
+#else
+#  define MAKE_SUCCESS 0
+#  define MAKE_TROUBLE 1
+#  define MAKE_FAILURE 2
+#endif
+
+/* Set up heap debugging library dmalloc.  */
+
+#ifdef HAVE_DMALLOC_H
+#include <dmalloc.h>
+#endif
+
+#ifndef initialize_main
+# ifdef __EMX__
+#  define initialize_main(pargc, pargv) \
+                          { _wildcard(pargc, pargv); _response(pargc, pargv); }
+# else
+#  define initialize_main(pargc, pargv)
+# endif
+#endif
+
+#ifdef __EMX__
+# if !defined chdir
+#  define chdir _chdir2
+# endif
+# if !defined getcwd
+#  define getcwd _getcwd2
+# endif
+
+/* NO_CHDIR2 causes make not to use _chdir2() and _getcwd2() instead of
+   chdir() and getcwd(). This avoids some error messages for the
+   make testsuite but restricts the drive letter support. */
+# ifdef NO_CHDIR2
+#  warning NO_CHDIR2: usage of drive letters restricted
+#  undef chdir
+#  undef getcwd
+# endif
+#endif
+
+#ifndef initialize_main
+# define initialize_main(pargc, pargv)
+#endif
+
+
+/* Some systems (like Solaris, PTX, etc.) do not support the SA_RESTART flag
+   properly according to POSIX.  So, we try to wrap common system calls with
+   checks for EINTR.  Note that there are still plenty of system calls that
+   can fail with EINTR but this, reportedly, gets the vast majority of
+   failure cases.  If you still experience failures you'll need to either get
+   a system where SA_RESTART works, or you need to avoid -j.  */
+
+#define EINTRLOOP(_v,_c)   while (((_v)=_c)==-1 && errno==EINTR)
+
+/* While system calls that return integers are pretty consistent about
+   returning -1 on failure and setting errno in that case, functions that
+   return pointers are not always so well behaved.  Sometimes they return
+   NULL for expected behavior: one good example is readdir() which returns
+   NULL at the end of the directory--and _doesn't_ reset errno.  So, we have
+   to do it ourselves here.  */
+
+#define ENULLLOOP(_v,_c)   do { errno = 0; (_v) = _c; } \
+                           while((_v)==0 && errno==EINTR)
diff --git a/misc.c b/misc.c
index cf371bed9330684fc398a7effc6955601d0cd5a3..e6151512c6b760d9ef5b8aa7e4026d4a75dd7d89 100644 (file)
--- a/misc.c
+++ b/misc.c
@@ -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 <http://www.gnu.org/licenses/>.  */
 
-#include "make.h"
+#include "makeint.h"
 #include "dep.h"
 #include "debug.h"
 
diff --git a/read.c b/read.c
index 98361c880d29e41671bf916fffa1d66aa5eb96f7..0c682ad354a85d77a400af16f55db517c1fb9075 100644 (file)
--- a/read.c
+++ b/read.c
@@ -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 <http://www.gnu.org/licenses/>.  */
 
-#include "make.h"
+#include "makeint.h"
 
 #include <assert.h>
 
index b1ddd239bb3aaf3978dad1a7a923e4107c9edfcd..85102648cdda35d7f4242de92eb757bd711199ff 100644 (file)
--- a/remake.c
+++ b/remake.c
@@ -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 <http://www.gnu.org/licenses/>.  */
 
-#include "make.h"
+#include "makeint.h"
 #include "filedef.h"
 #include "job.h"
 #include "commands.h"
index 155c516eb54b2dc07a96e2ba4e28eb165d79a2a5..713b89a6b1fb3d05457042d2dd1949c1e187e832 100644 (file)
@@ -18,7 +18,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 <http://www.gnu.org/licenses/>.  */
 
-#include "make.h"
+#include "makeint.h"
 #include "job.h"
 #include "filedef.h"
 #include "commands.h"
index b02c9d9365874ec73ec2c6774697d9ceda52fe2b..13c6273d29e60af79dafc5e57f98e1de894bf035 100644 (file)
@@ -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 <http://www.gnu.org/licenses/>.  */
 
-#include "make.h"
+#include "makeint.h"
 #include "filedef.h"
 #include "job.h"
 #include "commands.h"
diff --git a/rule.c b/rule.c
index 36eb308a28103577830364930337cf5e1adf958c..7627225f2fcd2e7188fe0f9274ce1cb337dfa226 100644 (file)
--- a/rule.c
+++ b/rule.c
@@ -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 <http://www.gnu.org/licenses/>.  */
 
-#include "make.h"
+#include "makeint.h"
 
 #include <assert.h>
 
index 43f84e3576232f8b10b9243c65dc0d0bd0ca3794..c54a8ea608b2849f4b2e7398b4b6861dc3c8aa77 100644 (file)
--- a/signame.c
+++ b/signame.c
@@ -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 <http://www.gnu.org/licenses/>.  */
 
-#include "make.h"
+#include "makeint.h"
 
 /* If the system provides strsignal, we don't need it. */
 
index 3e8d5d870be47e6204e68128a1d9be622a627290..beb2b044306e007b2c2995d9594210561efa591c 100644 (file)
@@ -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 <http://www.gnu.org/licenses/>.  */
 
-#include "make.h"
+#include "makeint.h"
 
 #include <stddef.h>
 #include <assert.h>
index 8576d6a8c45fd601c81dc2be4a19bf95dff93f6b..0a544ad7302f1acc6fbf57e782c68075f81393c7 100644 (file)
@@ -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 <http://www.gnu.org/licenses/>.  */
 
-#include "make.h"
+#include "makeint.h"
 
 #include <assert.h>
 
index 20eb417451f51513d169de5321d56931b4d7610e..32167ed8d618dd538a9a5c33f2497305905b6637 100644 (file)
--- a/version.c
+++ b/version.c
@@ -16,7 +16,7 @@ this program.  If not, see <http://www.gnu.org/licenses/>.  */
 
 /* We use <config.h> instead of "config.h" so that a compilation
    using -I. -I$srcdir will use ./config.h rather than $srcdir/config.h
-   (which it would do because make.h was found in $srcdir).  */
+   (which it would do because makeint.h was found in $srcdir).  */
 #include <config.h>
 
 #ifndef MAKE_HOST
index 8cae17fed2d3803f2116c1797a0cd3f3f914ecf0..6b3ecd4fa315350c25b36cd55b952aab569ed8c5 100644 (file)
@@ -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 <http://www.gnu.org/licenses/>.  */
 
-#include "make.h"
+#include "makeint.h"
 #include "debug.h"
 #include "job.h"
 
diff --git a/vpath.c b/vpath.c
index 35664e6747879f588136d4405fa171da85f29d52..33191f2465974d639a843be3dc325bd73a25b155 100644 (file)
--- a/vpath.c
+++ b/vpath.c
@@ -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 <http://www.gnu.org/licenses/>.  */
 
-#include "make.h"
+#include "makeint.h"
 #include "filedef.h"
 #include "variable.h"
 #ifdef WINDOWS32
@@ -146,7 +146,7 @@ build_vpath_lists ()
    If DIRPATH is nil, remove all previous listings with the same
    pattern.  If PATTERN is nil, remove all VPATH listings.  Existing
    and readable directories that are not "." given in the DIRPATH
-   separated by the path element separator (defined in make.h) are
+   separated by the path element separator (defined in makeint.h) are
    loaded into the directory hash table if they are not there already
    and put in the VPATH searchpath for the given pattern with trailing
    slashes stripped off if present (and if the directory is not the
index a2532d092ae94c4e6fa947d5c7a08d0cc4bc7deb..5e0f52c2529066cc30f8247e01ddd0e0dfa91610 100644 (file)
@@ -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 <http://www.gnu.org/licenses/>.  */
 
-#include "make.h"
+#include "makeint.h"
 #include <string.h>
 #include <stdlib.h>
 #include "pathstuff.h"
index 1cb14d4903103546742776c7b9f11e0923e29c0c..74b48abb724be76a20909eca335f86b6829a5a45 100644 (file)
@@ -16,7 +16,7 @@ this program.  If not, see <http://www.gnu.org/licenses/>.  */
 
 #include <stdlib.h>
 #include <windows.h>
-#include "make.h"
+#include "makeint.h"
 #include "w32err.h"
 
 /*