27 #define HAVE_CONFIG_H 1 41 # if !defined(__GNUC__) && !defined(WINDOWS32) 53 # define signal bsdsignal 57 #if defined(HAVE_DMALLOC_H) && defined(__GNUC__) 58 # define __NO_STRING_INLINES 61 #include <sys/types.h> 66 #ifdef HAVE_SYS_TIMEB_H 70 # include <sys/timeb.h> 73 #if TIME_WITH_SYS_TIME 74 # include <sys/time.h> 78 # include <sys/time.h> 91 # define isblank(c) ((c) == ' ' || (c) == '\t') 98 # if defined (_POSIX_VERSION) && !defined (ultrix) && !defined (VMS) 104 #if (defined (butterfly) || defined (__arm) || (defined (__mips) && defined (_SYSTYPE_SVR3)) || (defined (sequent) && defined (i386))) 108 #if !defined (POSIX) && defined (_AIX) && defined (_POSIX_SOURCE) 113 # define RETSIGTYPE void 117 # define sigmask(sig) (1 << ((sig) - 1)) 120 #ifndef HAVE_SA_RESTART 121 # define SA_RESTART 0 127 #ifdef HAVE_SYS_PARAM_H 128 # include <sys/param.h> 133 # define PATH_MAX MAXPATHLEN 137 # define MAXPATHLEN 1024 141 # define GET_PATH_MAX PATH_MAX 144 # define NEED_GET_PATH_MAX 1 145 # define GET_PATH_MAX (get_path_max ()) 147 unsigned int get_path_max (
void);
156 #define INTEGER_TYPE_MINIMUM(t) \ 157 (! INTEGER_TYPE_SIGNED (t) ? (t) 0 : ~ (t) 0 << (sizeof (t) * CHAR_BIT - 1)) 158 #define INTEGER_TYPE_MAXIMUM(t) (~ (t) 0 - INTEGER_TYPE_MINIMUM (t)) 161 # define CHAR_MAX INTEGER_TYPE_MAXIMUM (char) 164 #ifdef STAT_MACROS_BROKEN 174 # define S_ISREG(mode) (((mode) & S_IFMT) == S_IFREG) 177 # define S_ISDIR(mode) (((mode) & S_IFMT) == S_IFDIR) 182 # include <unixlib.h> 186 # include <builtins.h> 189 #ifndef __attribute__ 191 # if __GNUC__ < 2 || (__GNUC__ == 2 && __GNUC_MINOR__ < 5) || __STRICT_ANSI__ 192 # define __attribute__(x) 196 # if __GNUC__ < 2 || (__GNUC__ == 2 && __GNUC_MINOR__ < 7) 197 # define __format__ format 198 # define __printf__ printf 203 #if defined (STDC_HEADERS) || defined (__GNU_LIBRARY__) 206 # define ANSI_STRING 1 208 # ifdef HAVE_STRING_H 210 # define ANSI_STRING 1 212 # include <strings.h> 214 # ifdef HAVE_MEMORY_H 217 # ifdef HAVE_STDLIB_H 221 void *realloc (
void *,
int);
232 # define EXIT_SUCCESS 0 235 # define EXIT_FAILURE 1 243 char *strerror (
int errnum);
250 # include <inttypes.h> 252 #define FILE_TIMESTAMP uintmax_t 254 #if !defined(HAVE_STRSIGNAL) 255 char *strsignal (
int signum);
259 #define streq(a, b) \ 261 (*(a) == *(b) && (*(a) == '\0' || !strcmp ((a) + 1, (b) + 1)))) 266 #ifdef HAVE_CASE_INSENSITIVE_FS 267 # define patheq(a, b) \ 269 || (tolower((unsigned char)*(a)) == tolower((unsigned char)*(b)) \ 270 && (*(a) == '\0' || !strcasecmp ((a) + 1, (b) + 1)))) 272 # define patheq(a, b) streq(a, b) 275 #define strneq(a, b, l) (strncmp ((a), (b), (l)) == 0) 277 #if defined(__GNUC__) || defined(ENUM_BITFIELDS) 278 # define ENUM_BITFIELD(bits) :bits 280 # define ENUM_BITFIELD(bits) 288 # define setlocale(category, locale) 293 #define _(msgid) gettext (msgid) 294 #define N_(msgid) gettext_noop (msgid) 295 #define S_(msg1,msg2,num) ngettext (msg1,msg2,num) 298 #ifndef PATH_SEPARATOR_CHAR 299 # if defined(HAVE_DOS_PATHS) 300 # define PATH_SEPARATOR_CHAR ';' 302 # define PATH_SEPARATOR_CHAR ',' 304 # define PATH_SEPARATOR_CHAR ':' 309 #if defined(HAVE_DIRECT_H) 316 # define pipe(_p) _pipe((_p), 512, O_BINARY) 317 # define kill(_pid,_sig) w32_kill((_pid),(_sig)) 319 void sync_Path_environment (
void);
320 int w32_kill (pid_t pid,
int sig);
321 char *end_of_token_w32 (
const char *s,
char stopchar);
322 int find_and_set_default_shell (
const char *token);
325 extern int no_default_sh_exe;
331 #if defined(HAVE_SYS_RESOURCE_H) && defined(HAVE_GETRLIMIT) && defined(HAVE_SETRLIMIT) 332 # define SET_STACK_SIZE 334 #ifdef SET_STACK_SIZE 335 # include <sys/resource.h> 342 #if HAVE_STDARG_H || HAVE_VARARGS_H 343 # if HAVE_VPRINTF || HAVE_DOPRNT 344 # define USE_VARIADIC 1 355 char *
xstrndup (
const char *,
size_t);
360 char *
lindex (
const char *,
const char *,
int);
380 const char *
dir_name (
const char *);
391 unsigned int* vpath_index,
unsigned int* path_index);
418 #if !defined (__GNU_LIBRARY__) && !defined (POSIX) && !defined (_POSIX_VERSION) && !defined(WINDOWS32) 428 # if !defined(VMS) && !defined(__DECC) 433 # define getcwd(buf, len) getwd (buf) 438 # define strcasecmp stricmp 440 # define strcasecmp strcmpi 443 int strcasecmp (
const char *s1,
const char *s2);
447 #if !HAVE_STRNCASECMP 449 # define strncasecmp strnicmp 451 # define strncasecmp strncmpi 454 int strncasecmp (
const char *s1,
const char *s2,
int n);
472 #define RECIPEPREFIX_NAME ".RECIPEPREFIX" 473 #define RECIPEPREFIX_DEFAULT '\t' 507 #define MIN(_a,_b) ((_a)<(_b)?(_a):(_b)) 510 #define MAX(_a,_b) ((_a)>(_b)?(_a):(_b)) 515 #ifdef HAVE_DMALLOC_H 519 #ifndef initialize_main 521 # define initialize_main(pargc, pargv) \ 522 { _wildcard(pargc, pargv); _response(pargc, pargv); } 524 # define initialize_main(pargc, pargv) 530 # define chdir _chdir2 533 # define getcwd _getcwd2 540 # warning NO_CHDIR2: usage of drive letters restricted 546 #ifndef initialize_main 547 # define initialize_main(pargc, pargv) 558 #define EINTRLOOP(_v,_c) while (((_v)=_c)==-1 && errno==EINTR) int strcache_iscached(const char *str)
FILE * open_tmpfile(char **, const char *)
int alpha_compare(const void *, const void *)
char * xstrndup(const char *, size_t)
char * next_token(const char *)
void ar_parse_name(const char *, char **, char **)
char * find_percent(char *)
int handling_fatal_signal
int no_builtin_variables_flag
char * xstrdup(const char *)
void print_spaces(unsigned int)
char * starting_directory
int no_builtin_rules_flag
const char * find_percent_cached(const char **)
const char * strcache_add(const char *str)
void perror_with_name(const char *, const char *)
int ar_member_date(const char *, time_t *)
const char *const * global_argv
void install_default_suffix_rules(void)
void define_default_variables(void)
struct rlimit stack_limit
Definition: make.h:336
int file_impossible_p(const char *)
char * strip_whitespace(const char **begpp, const char **endpp)
int file_exists_p(const char *)
void file_impossible(const char *)
char * directory_before_chdir
void pfatal_with_name(const char *)
void hash_init_directories(void)
const char * vpath_search(const char *file, FILE_TIMESTAMP *mtime_ptr, unsigned int *vpath_index, unsigned int *path_index)
void build_vpath_lists(void)
int ar_touch(const char *)
void construct_include_path(const char **arg_dirs)
void construct_vpath_list(char *pattern, char *dirpath)
int warn_undefined_variables_flag
void set_default_suffixes(void)
void install_default_implicit_rules(void)
unsigned int commands_started
char * lindex(const char *, const char *, int)
#define __attribute__(x)
Definition: make.h:192
int gpath_search(const char *file, size_t len)
void collapse_continuations(char *)
int ar_name(const char *)
const char * dir_name(const char *)
char * end_of_token(const char *)
int dir_file_exists_p(const char *, const char *)
char * remote_description
void strcache_print_stats(const char *prefix)
#define FILE_TIMESTAMP
Definition: make.h:252
void * xrealloc(void *, size_t)