Ignore:
Timestamp:
Mar 14, 2018, 10:28:10 PM (7 years ago)
Author:
bird
Message:

kmk: Merged in changes from GNU make 4.2.1 (2e55f5e4abdc0e38c1d64be703b446695e70b3b6 / https://git.savannah.gnu.org/git/make.git).

Location:
trunk/src/kmk
Files:
1 edited
1 moved

Legend:

Unmodified
Added
Removed
  • trunk/src/kmk

  • trunk/src/kmk/makeint.h

    r3139 r3140  
    11/* Miscellaneous global declarations and portability cruft for GNU Make.
    2 Copyright (C) 1988, 1989, 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997,
    3 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009,
    4 2010 Free Software Foundation, Inc.
     2Copyright (C) 1988-2016 Free Software Foundation, Inc.
    53This file is part of GNU Make.
    64
     
    1917/* We use <config.h> instead of "config.h" so that a compilation
    2018   using -I. -I$srcdir will use ./config.h rather than $srcdir/config.h
    21    (which it would do because make.h was found in $srcdir).  */
     19   (which it would do because makeint.h was found in $srcdir).  */
    2220#include <config.h>
    2321#undef  HAVE_CONFIG_H
    2422#define HAVE_CONFIG_H 1
     23
     24#include <k/kDefs.h> /* bird */
    2525
    2626/* Specify we want GNU source code.  This must be defined before any
     
    4444#endif
    4545
     46/* Disable assert() unless we're a maintainer.
     47   Some asserts are compute-intensive.  */
     48#ifndef MAKE_MAINTAINER_MODE
     49# define NDEBUG 1
     50#endif
     51
     52/* Include the externally-visible content.
     53   Be sure to use the local one, and not one installed on the system.
     54   Define GMK_BUILDING_MAKE for proper selection of dllexport/dllimport
     55   declarations for MS-Windows.  */
     56#ifdef WINDOWS32
     57# define GMK_BUILDING_MAKE
     58#endif
     59#include "gnumake.h"
    4660
    4761#ifdef  CRAY
     
    6175#include <stdio.h>
    6276#include <ctype.h>
     77
    6378#ifdef HAVE_SYS_TIMEB_H
    64 /* SCO 3.2 "devsys 4.2" has a prototype for `ftime' in <time.h> that bombs
    65    unless <sys/timeb.h> has been included first.  Does every system have a
    66    <sys/timeb.h>?  If any does not, configure should check for it.  */
     79/* SCO 3.2 "devsys 4.2" has a prototype for 'ftime' in <time.h> that bombs
     80   unless <sys/timeb.h> has been included first.  */
    6781# include <sys/timeb.h>
    6882#endif
    69 
    7083#if TIME_WITH_SYS_TIME
    7184# include <sys/time.h>
     
    8598#endif
    8699
    87 #ifndef isblank
    88 # define isblank(c)     ((c) == ' ' || (c) == '\t')
     100#ifdef __VMS
     101/* In strict ANSI mode, VMS compilers should not be defining the
     102   VMS macro.  Define it here instead of a bulk edit for the correct code.
     103 */
     104# ifndef VMS
     105#  define VMS
     106# endif
    89107#endif
    90108
     
    92110# include <unistd.h>
    93111/* Ultrix's unistd.h always defines _POSIX_VERSION, but you only get
    94    POSIX.1 behavior with `cc -YPOSIX', which predefines POSIX itself!  */
     112   POSIX.1 behavior with 'cc -YPOSIX', which predefines POSIX itself!  */
    95113# if defined (_POSIX_VERSION) && !defined (ultrix) && !defined (VMS)
    96114#  define POSIX 1
     
    117135#ifndef HAVE_SA_RESTART
    118136# define SA_RESTART 0
     137#endif
     138
     139#ifdef HAVE_VFORK_H
     140# include <vfork.h>
    119141#endif
    120142
     
    187209
    188210#ifdef KMK
    189 # include <ctype.h>
    190 # if 1 /* See if this speeds things up (Windows is doing this anyway, so,
     211/** @todo measure performance diff here!   */
     212# if 0 /* See if this speeds things up (Windows is doing this anyway, so,
    191213          we might as well try be consistent in speed + features).  */
    192 #  if 1
    193 #   define MY_IS_BLANK(ch)          ((ch) == ' ' || (ch) == '\t')
    194 #   define MY_IS_BLANK_OR_EOS(ch)   ((ch) == ' ' || (ch) == '\t' || (ch) == '\0')
    195 #  else
    196 #   define MY_IS_BLANK(ch)          (((ch) == ' ') | ((ch) == '\t'))
    197 #   define MY_IS_BLANK_OR_EOS(ch)   (((ch) == ' ') | ((ch) == '\t') | ((ch) == '\0'))
    198 #  endif
    199 #  undef isblank
    200 #  define isblank(ch)               MY_IS_BLANK(ch)
    201 # else
    202 #  define MY_IS_BLANK(ch)           isblank ((unsigned char)(ch))
    203 #  define MY_IS_BLANK_OR_EOS(ch)    (isblank ((unsigned char)(ch)) || (ch) == '\0')
     214#  define MY_IS_BLANK(ch)           ((ch) == ' ' || (ch) == '\t')
     215#  define MY_IS_BLANK_OR_EOS(ch)    ((ch) == ' ' || (ch) == '\t' || (ch) == '\0')
     216# else
     217#  define MY_IS_BLANK(ch)           ISBLANK ((ch))
     218#  define MY_IS_BLANK_OR_EOS(ch)    (ISBLANK ((ch)) || (ch) == '\0')
    204219# endif
    205220#endif
     
    277292#endif
    278293
    279 /* Nonzero if the integer type T is signed.  */
    280 #define INTEGER_TYPE_SIGNED(t) ((t) -1 < 0)
     294#ifndef USHRT_MAX
     295# define USHRT_MAX 65535
     296#endif
     297
     298/* Nonzero if the integer type T is signed.
     299   Use <= to avoid GCC warnings about always-false expressions.  */
     300#define INTEGER_TYPE_SIGNED(t) ((t) -1 <= 0)
    281301
    282302/* The minimum and maximum values for the integer type T.
     
    307327
    308328#ifdef VMS
     329# include <fcntl.h>
    309330# include <types.h>
    310331# include <unixlib.h>
     
    313334/* Needed to use alloca on VMS.  */
    314335# include <builtins.h>
     336
     337extern int vms_use_mcr_command;
     338extern int vms_always_use_cmd_file;
     339extern int vms_gnv_shell;
     340extern int vms_comma_separator;
     341extern int vms_legacy_behavior;
     342extern int vms_unix_simulation;
    315343#endif
    316344
     
    320348#  define __attribute__(x)
    321349# endif
    322 /* The __-protected variants of `format' and `printf' attributes
     350/* The __-protected variants of 'format' and 'printf' attributes
    323351   are accepted by gcc versions 2.6.4 (effectively 2.7) and later.  */
    324352# if __GNUC__ < 2 || (__GNUC__ == 2 && __GNUC_MINOR__ < 7)
     
    378406# include <inttypes.h>
    379407#endif
     408#if HAVE_STDINT_H
     409# include <stdint.h>
     410#endif
    380411#define FILE_TIMESTAMP uintmax_t
    381412
     
    391422   POSIX 1003.2-1992 section 2.5.2.1 page 50 lines 1556-1558 says that
    392423   only '0' through '9' are digits.  Prefer ISDIGIT to isdigit() unless
    393    it's important to use the locale's definition of `digit' even when the
     424   it's important to use the locale's definition of 'digit' even when the
    394425   host does not conform to POSIX.  */
    395426#define ISDIGIT(c) ((unsigned) (c) - '0' <= 9)
     
    414445#define strneq(a, b, l) (strncmp ((a), (b), (l)) == 0)
    415446
    416 #if (defined(__GNUC__) || defined(ENUM_BITFIELDS)) && !defined(NO_ENUM_BITFIELDS)
     447#if (defined(__GNUC__) || defined(ENUM_BITFIELDS)) && !defined(NO_ENUM_BITFIELDS) /* bird: NO_ENUM_BITFIELDS */
    417448# define ENUM_BITFIELD(bits)    :bits
    418449#else
     
    433464#define N_(msgid)           gettext_noop (msgid)
    434465#define S_(msg1,msg2,num)   ngettext (msg1,msg2,num)
    435 
    436 /* Handle other OSs.  */
    437 #ifndef PATH_SEPARATOR_CHAR
    438 # if defined(HAVE_DOS_PATHS)
    439 #  define PATH_SEPARATOR_CHAR ';'
    440 # elif defined(VMS)
    441 #  define PATH_SEPARATOR_CHAR ','
    442 # else
    443 #  define PATH_SEPARATOR_CHAR ':'
    444 # endif
    445 #endif
    446466
    447467/* This is needed for getcwd() and chdir(), on some W32 systems.  */
     
    455475# define pipe(_p)        _pipe((_p), 512, O_BINARY)
    456476# define kill(_pid,_sig) w32_kill((_pid),(_sig))
     477/* MSVC and Watcom C don't have ftruncate.  */
     478# if defined(_MSC_VER) || defined(__WATCOMC__)
     479#  define ftruncate(_fd,_len) _chsize(_fd,_len)
     480# endif
     481/* MinGW64 doesn't have _S_ISDIR.  */
     482# ifndef _S_ISDIR
     483#  define _S_ISDIR(m)  S_ISDIR(m)
     484# endif
    457485
    458486void sync_Path_environment (void);
    459487int w32_kill (pid_t pid, int sig);
    460 char *end_of_token_w32 (const char *s, char stopchar);
    461488int find_and_set_default_shell (const char *token);
    462489
     
    466493/* is default_shell unixy? */
    467494extern int unixy_shell;
     495
     496/* We don't have a preferred fixed value for LOCALEDIR.  */
     497# ifndef LOCALEDIR
     498#  define LOCALEDIR NULL
     499# endif
     500
     501/* Include only the minimal stuff from windows.h.   */
     502# define WIN32_LEAN_AND_MEAN
    468503#endif  /* WINDOWS32 */
     504
     505#define ANY_SET(_v,_m)  (((_v)&(_m)) != 0)
     506#define NONE_SET(_v,_m) (! ANY_SET ((_v),(_m)))
     507
     508#define MAP_NUL         0x0001
     509#define MAP_BLANK       0x0002
     510#define MAP_NEWLINE     0x0004
     511#define MAP_COMMENT     0x0008
     512#define MAP_SEMI        0x0010
     513#define MAP_EQUALS      0x0020
     514#define MAP_COLON       0x0040
     515#define MAP_PERCENT     0x0080
     516#define MAP_PIPE        0x0100
     517#define MAP_DOT         0x0200
     518#define MAP_COMMA       0x0400
     519
     520/* These are the valid characters for a user-defined function.  */
     521#define MAP_USERFUNC    0x2000
     522/* This means not only a '$', but skip the variable reference.  */
     523#define MAP_VARIABLE    0x4000
     524/* The set of characters which are directory separators is OS-specific.  */
     525#define MAP_DIRSEP      0x8000
     526
     527#ifdef VMS
     528# define MAP_VMSCOMMA   MAP_COMMA
     529#else
     530# define MAP_VMSCOMMA   0x0000
     531#endif
     532
     533#define MAP_SPACE       (MAP_BLANK|MAP_NEWLINE)
     534
     535/* Handle other OSs.
     536   To overcome an issue parsing paths in a DOS/Windows environment when
     537   built in a unix based environment, override the PATH_SEPARATOR_CHAR
     538   definition unless being built for Cygwin. */
     539#if defined(HAVE_DOS_PATHS) && !defined(__CYGWIN__)
     540# undef PATH_SEPARATOR_CHAR
     541# define PATH_SEPARATOR_CHAR ';'
     542# define MAP_PATHSEP    MAP_SEMI
     543#elif !defined(PATH_SEPARATOR_CHAR)
     544# if defined (VMS)
     545#  define PATH_SEPARATOR_CHAR (vms_comma_separator ? ',' : ':')
     546#  define MAP_PATHSEP    (vms_comma_separator ? MAP_COMMA : MAP_SEMI)
     547# else
     548#  define PATH_SEPARATOR_CHAR ':'
     549#  define MAP_PATHSEP    MAP_COLON
     550# endif
     551#elif PATH_SEPARATOR_CHAR == ':'
     552# define MAP_PATHSEP     MAP_COLON
     553#elif PATH_SEPARATOR_CHAR == ';'
     554# define MAP_PATHSEP     MAP_SEMI
     555#elif PATH_SEPARATOR_CHAR == ','
     556# define MAP_PATHSEP     MAP_COMMA
     557#else
     558# error "Unknown PATH_SEPARATOR_CHAR"
     559#endif
     560
     561#define STOP_SET(_v,_m) ANY_SET(stopchar_map[(unsigned char)(_v)],(_m))
     562
     563#define ISBLANK(c)      STOP_SET((c),MAP_BLANK)
     564#define ISSPACE(c)      STOP_SET((c),MAP_SPACE)
     565#define NEXT_TOKEN(s)   while (ISSPACE (*(s))) ++(s)
     566#define END_OF_TOKEN(s) while (! STOP_SET (*(s), MAP_SPACE|MAP_NUL)) ++(s)
    469567
    470568#if defined(HAVE_SYS_RESOURCE_H) && defined(HAVE_GETRLIMIT) && defined(HAVE_SETRLIMIT)
     
    473571#ifdef SET_STACK_SIZE
    474572# include <sys/resource.h>
    475 struct rlimit stack_limit;
    476 #endif
    477 
    478 struct floc
     573extern struct rlimit stack_limit;
     574#endif
     575
     576#include "glob.h" /* bird double quotes */
     577
     578#define NILF ((floc *)0)
     579
     580#define CSTRLEN(_s)           (sizeof (_s)-1)
     581#define STRING_SIZE_TUPLE(_s) (_s), CSTRLEN(_s) /* The number of bytes needed to represent the largest integer as a string.  */
     582#define INTSTR_LENGTH         CSTRLEN ("18446744073709551616")
     583
     584#define DEFAULT_TTYNAME "true"
     585#ifdef HAVE_TTYNAME
     586#  define TTYNAME(_f) ttyname (_f)
     587#else
     588#  define TTYNAME(_f) DEFAULT_TTYNAME
     589#endif
     590
     591
     592
     593
     594/* Specify the location of elements read from makefiles.  */
     595typedef struct
    479596  {
    480597    const char *filenm;
    481598    unsigned long lineno;
    482   };
    483 #define NILF ((struct floc *)0)
    484 
    485 #define STRING_SIZE_TUPLE(_s) (_s), (sizeof (_s)-1)
    486 
    487 #if defined (CONFIG_WITH_MATH) \
     599    unsigned long offset;
     600  } floc;
     601
     602#if defined (CONFIG_WITH_MATH) /* bird start */ \
    488603 || defined (CONFIG_WITH_NANOTS) \
    489604 || defined (CONFIG_WITH_FILE_SIZE) \
    490  || defined (CONFIG_WITH_PRINT_TIME_SWITCH) /* bird */
     605 || defined (CONFIG_WITH_PRINT_TIME_SWITCH)
    491606# ifdef _MSC_VER
    492607typedef __int64 big_int;
     
    501616#  define BIG_UINT_C(c)     UINT64_C(c)
    502617# endif
    503 #endif
    504 
    505 
    506 
    507 /* We have to have stdarg.h or varargs.h AND v*printf or doprnt to use
    508    variadic versions of these functions.  */
    509 
    510 #if HAVE_STDARG_H || HAVE_VARARGS_H
    511 # if HAVE_VPRINTF || HAVE_DOPRNT
    512 #  define USE_VARIADIC 1
    513 # endif
    514 #endif
    515 
    516 #if HAVE_ANSI_COMPILER && USE_VARIADIC && HAVE_STDARG_H
     618#endif /* bird end */
     619
    517620const char *concat (unsigned int, ...);
    518 void message (int prefix, const char *fmt, ...)
    519               __attribute__ ((__format__ (__printf__, 2, 3)));
    520 void error (const struct floc *flocp, const char *fmt, ...)
    521             __attribute__ ((__format__ (__printf__, 2, 3)));
    522 void fatal (const struct floc *flocp, const char *fmt, ...)
    523                    __attribute__ ((noreturn, __format__ (__printf__, 2, 3)));
    524 #else
    525 const char *concat ();
    526 void message ();
    527 void error ();
    528 void fatal ();
    529 #endif
     621void message (int prefix, size_t length, const char *fmt, ...)
     622              __attribute__ ((__format__ (__printf__, 3, 4)));
     623void error (const floc *flocp, size_t length, const char *fmt, ...)
     624            __attribute__ ((__format__ (__printf__, 3, 4)));
     625void fatal (const floc *flocp, size_t length, const char *fmt, ...)
     626            __attribute__ ((noreturn, __format__ (__printf__, 3, 4)));
     627
     628#define O(_t,_a,_f)           _t((_a), 0, (_f))
     629#define OS(_t,_a,_f,_s)       _t((_a), strlen (_s), (_f), (_s))
     630#define OSS(_t,_a,_f,_s1,_s2) _t((_a), strlen (_s1) + strlen (_s2), \
     631                                 (_f), (_s1), (_s2))
     632#define OSSS(_t,_a,_f,_s1,_s2,_s3) _t((_a), strlen (_s1) + strlen (_s2) + strlen (_s3), \
     633                                      (_f), (_s1), (_s2), (_s3))
     634#define ON(_t,_a,_f,_n)       _t((_a), INTSTR_LENGTH, (_f), (_n))
     635#define ONN(_t,_a,_f,_n1,_n2) _t((_a), INTSTR_LENGTH*2, (_f), (_n1), (_n2))
     636
     637#define OSN(_t,_a,_f,_s,_n)   _t((_a), strlen (_s) + INTSTR_LENGTH, \
     638                                 (_f), (_s), (_n))
     639#define ONS(_t,_a,_f,_n,_s)   _t((_a), INTSTR_LENGTH + strlen (_s), \
     640                                 (_f), (_n), (_s))
     641
     642/* bird: more wrappers */
     643#define OSNN(_t,_a,_f,_s,_n1,_n2)   _t((_a), strlen (_s) + INTSTR_LENGTH + INTSTR_LENGTH, \
     644                                       (_f), (_s), (_n1), (_n2))                    /* bird */
     645#define OSNS(_t,_a,_f,_s1,_n,_s2)   _t((_a), strlen (_s1) + strlen (_s2) + INTSTR_LENGTH, \
     646                                      (_f), (_s1), (_n), (_s2))                     /* bird */
     647#define OSSSS(_t,_a,_f,_s1,_s2,_s3,_s4) _t((_a), strlen (_s1) + strlen (_s2) + strlen (_s3) + strlen (_s4), \
     648                                           (_f), (_s1), (_s2), (_s3), (_s4))        /* bird */
     649#define OSSNS(_t,_a,_f,_s1,_s2,_n,_s3) _t((_a), strlen (_s1) + strlen (_s2) + strlen (_s3) + INTSTR_LENGTH, \
     650                                          (_f), (_s1), (_s2), (_n), (_s3))          /* bird */
     651
     652#define OUT_OF_MEM() O (fatal, NILF, _("virtual memory exhausted"))
    530653
    531654void die (int) __attribute__ ((noreturn));
    532 void log_working_directory (int);
    533655void pfatal_with_name (const char *) __attribute__ ((noreturn));
    534656void perror_with_name (const char *, const char *);
     657#define xstrlen(_s) ((_s)==NULL ? 0 : strlen (_s))
    535658void *xmalloc (unsigned int);
    536659void *xcalloc (unsigned int);
     
    561684char *find_percent (char *);
    562685const char *find_percent_cached (const char **);
    563 FILE *open_tmpfile (char **, const char *);
    564686
    565687#ifndef NO_ARCHIVES
     
    570692
    571693typedef long int (*ar_member_func_t) (int desc, const char *mem, int truncated,
    572                                       long int hdrpos, long int datapos,
    573                                       long int size, long int date, int uid,
    574                                       int gid, int mode, const void *arg);
     694                                      long int hdrpos, long int datapos,
     695                                      long int size, long int date, int uid,
     696                                      int gid, unsigned int mode,
     697                                      const void *arg);
    575698
    576699long int ar_scan (const char *archive, ar_member_func_t function, const void *arg);
     
    586709void file_impossible (const char *);
    587710const char *dir_name (const char *);
     711void print_dir_data_base (void);
     712void dir_setup_glob (glob_t *);
    588713void hash_init_directories (void);
    589714
    590715void define_default_variables (void);
     716void undefine_default_variables (void);
    591717void set_default_suffixes (void);
    592718void install_default_suffix_rules (void);
     
    605731void child_access (void);
    606732
    607 void close_stdout (void);
    608 
    609733char *strip_whitespace (const char **begpp, const char **endpp);
    610734
    611 #ifdef CONFIG_WITH_ALLOC_CACHES
     735void show_goal_error (void);
     736
     737
     738#ifdef CONFIG_WITH_ALLOC_CACHES /* bird start */
    612739/* alloccache (misc.c) */
    613740
     
    675802/* the alloc caches */
    676803extern struct alloccache dep_cache;
     804extern struct alloccache goaldep_cache;
     805extern struct alloccache nameseq_cache;
    677806extern struct alloccache file_cache;
    678807extern struct alloccache commands_cache;
    679 extern struct alloccache nameseq_cache;
    680808extern struct alloccache variable_cache;
    681809extern struct alloccache variable_set_cache;
    682810extern struct alloccache variable_set_list_cache;
    683811
    684 #endif /* CONFIG_WITH_ALLOC_CACHES */
     812#endif /* CONFIG_WITH_ALLOC_CACHES - bird end*/
    685813
    686814
     
    688816void strcache_init (void);
    689817void strcache_print_stats (const char *prefix);
    690 #ifndef CONFIG_WITH_STRCACHE2
     818#ifndef CONFIG_WITH_STRCACHE2 /* bird */
    691819int strcache_iscached (const char *str);
    692820const char *strcache_add (const char *str);
    693 const char *strcache_add_len (const char *str, int len);
    694 int strcache_setbufsize (int size);
     821const char *strcache_add_len (const char *str, unsigned int len);
    695822#else  /* CONFIG_WITH_STRCACHE2 */
    696823
     
    706833#endif /* CONFIG_WITH_STRCACHE2 */
    707834
    708 #ifdef  HAVE_VFORK_H
    709 # include <vfork.h>
    710 #endif
     835/* Guile support  */
     836int guile_gmake_setup (const floc *flocp);
     837
     838/* Loadable object support.  Sets to the strcached name of the loaded file.  */
     839typedef int (*load_func_t)(const floc *flocp);
     840int load_file (const floc *flocp, const char **filename, int noerror);
     841void unload_file (const char *name);
    711842
    712843/* We omit these declarations on non-POSIX systems which define _POSIX_VERSION,
     
    720851# endif
    721852
     853# ifdef  HAVE_GETCWD
     854#  if !defined(VMS) && !defined(__DECC) && !defined(_MSC_VER) /* bird: MSC */
     855char *getcwd ();
     856#  endif
     857# else
     858char *getwd ();
     859#  define getcwd(buf, len)       getwd (buf)
     860# endif
     861
    722862#endif  /* Not GNU C library or POSIX.  */
    723 
    724 #ifdef  HAVE_GETCWD
    725 # if !defined(VMS) && !defined(__DECC) && !defined(_MSC_VER) /* bird: MSC */
    726 char *getcwd ();
    727 # endif
    728 #else
    729 char *getwd ();
    730 # define getcwd(buf, len)       getwd (buf)
    731 #endif
    732863
    733864#if !HAVE_STRCASECMP
     
    753884#endif
    754885
    755 extern const struct floc *reading_file;
    756 extern const struct floc **expanding_var;
     886#define OUTPUT_SYNC_NONE    0
     887#define OUTPUT_SYNC_LINE    1
     888#define OUTPUT_SYNC_TARGET  2
     889#define OUTPUT_SYNC_RECURSE 3
    757890
    758891#if !defined(_MSC_VER) /* bird */
     892/* Non-GNU systems may not declare this in unistd.h.  */
    759893extern char **environ;
    760894#endif
     895
     896extern const floc *reading_file;
     897extern const floc **expanding_var;
     898
     899extern unsigned short stopchar_map[];
    761900
    762901extern int just_print_flag, silent_flag, ignore_errors_flag, keep_going_flag;
     
    764903extern int env_overrides, no_builtin_rules_flag, no_builtin_variables_flag;
    765904extern int print_version_flag, print_directory_flag, check_symlink_flag;
    766 extern int warn_undefined_variables_flag, posix_pedantic, not_parallel;
    767 extern int second_expansion, clock_skew_detected, rebuilding_makefiles;
    768 extern int one_shell;
    769 
    770 #ifdef CONFIG_WITH_2ND_TARGET_EXPANSION
     905extern int warn_undefined_variables_flag, trace_flag, posix_pedantic;
     906extern int not_parallel, second_expansion, clock_skew_detected;
     907extern int rebuilding_makefiles, one_shell, output_sync, verify_flag;
     908
     909#ifdef CONFIG_WITH_2ND_TARGET_EXPANSION /* bird start */
    771910extern int second_target_expansion;
    772911#endif
     
    779918#if defined (CONFIG_WITH_MAKE_STATS) || defined (CONFIG_WITH_MINIMAL_STATS)
    780919extern int make_expensive_statistics;
    781 #endif
    782 
     920#endif                                  /* bird end */
     921
     922extern const char *default_shell;
    783923
    784924/* can we run commands via 'sh -c xxx' or must we use batch files? */
     
    791931
    792932extern unsigned int job_slots;
    793 extern int job_fds[2];
    794 extern int job_rfd;
    795933#ifndef NO_FLOAT
    796934extern double max_load_average;
     
    799937#endif
    800938
     939#ifdef WINDOWS32
    801940extern char *program;
     941#else
     942extern const char *program;
     943#endif
     944
     945#ifdef VMS
     946const char *vms_command (const char *argv0);
     947const char *vms_progname (const char *argv0);
     948
     949void vms_exit (int);
     950# define _exit(foo) vms_exit(foo)
     951# define exit(foo) vms_exit(foo)
     952
     953extern char *program_name;
     954
     955void
     956set_program_name (const char *arv0);
     957
     958int
     959need_vms_symbol (void);
     960
     961int
     962create_foreign_command (const char *command, const char *image);
     963
     964int
     965vms_export_dcl_symbol (const char *name, const char *value);
     966
     967int
     968vms_putenv_symbol (const char *string);
     969
     970void
     971vms_restore_symbol (const char *string);
     972
     973#endif
     974
     975void remote_setup (void);
     976void remote_cleanup (void);
     977int start_remote_job_p (int);
     978int start_remote_job (char **, char **, int, int *, int *, int *);
     979int remote_status (int *, int *, int *, int);
     980void block_remote_children (void);
     981void unblock_remote_children (void);
     982int remote_kill (int id, int sig);
     983void print_variable_data_base (void);
     984void print_vpath_data_base (void);
     985
    802986extern char *starting_directory;
    803987extern unsigned int makelevel;
     
    8161000#endif
    8171001
    818 #ifdef VMS
    819 #  define MAKE_SUCCESS 1
    820 #  define MAKE_TROUBLE 2
    821 #  define MAKE_FAILURE 3
    822 #else
    823 #  define MAKE_SUCCESS 0
    824 #  define MAKE_TROUBLE 1
    825 #  define MAKE_FAILURE 2
    826 #endif
     1002
     1003#define MAKE_SUCCESS 0
     1004#define MAKE_TROUBLE 1
     1005#define MAKE_FAILURE 2
    8271006
    8281007/* Set up heap debugging library dmalloc.  */
     
    9731152
    9741153#ifdef CONFIG_WITH_IF_CONDITIONALS
    975 extern int expr_eval_if_conditionals(const char *line, const struct floc *flocp);
     1154extern int expr_eval_if_conditionals(const char *line, const floc *flocp);
    9761155extern char *expr_eval_to_string(char *o, const char *expr);
    9771156#endif
Note: See TracChangeset for help on using the changeset viewer.