Changeset 900 in kBuild for vendor/gnumake/current/make.h
- Timestamp:
- May 23, 2007 3:13:11 AM (17 years ago)
- File:
-
- 1 edited
-
vendor/gnumake/current/make.h (modified) (15 diffs)
Legend:
- Unmodified
- Added
- Removed
-
vendor/gnumake/current/make.h
r501 r900 39 39 #endif 40 40 41 42 /* Use prototypes if available. */43 #if defined (__cplusplus) || defined (__STDC__)44 # undef PARAMS45 # define PARAMS(protos) protos46 #else /* Not C++ or ANSI C. */47 # undef PARAMS48 # define PARAMS(protos) ()49 #endif /* C++ or ANSI C. */50 41 51 42 /* Specify we want GNU source code. This must be defined before any … … 151 142 # define NEED_GET_PATH_MAX 1 152 143 # define GET_PATH_MAX (get_path_max ()) 153 # define PATH_VAR(var) char *var = (char *)alloca (GET_PATH_MAX)154 extern unsigned int get_path_max PARAMS ((void));144 # define PATH_VAR(var) char *var = alloca (GET_PATH_MAX) 145 unsigned int get_path_max (void); 155 146 #endif 156 147 … … 228 219 # include <stdlib.h> 229 220 # else 230 extern char *malloc PARAMS ((int));231 extern char *realloc PARAMS ((char *, int));232 extern void free PARAMS ((char *));233 234 extern void abort PARAMS ((void)) __attribute__ ((noreturn));235 extern void exit PARAMS ((int)) __attribute__ ((noreturn));221 void *malloc (int); 222 void *realloc (void *, int); 223 void free (void *); 224 225 void abort (void) __attribute__ ((noreturn)); 226 void exit (int) __attribute__ ((noreturn)); 236 227 # endif /* HAVE_STDLIB_H. */ 237 228 … … 243 234 #endif 244 235 #ifndef EXIT_FAILURE 245 # define EXIT_FAILURE 0 246 #endif 247 248 #ifdef ANSI_STRING 249 250 # ifndef bcmp 251 # define bcmp(s1, s2, n) memcmp ((s1), (s2), (n)) 252 # endif 253 # ifndef bzero 254 # define bzero(s, n) memset ((s), 0, (n)) 255 # endif 256 # if defined(HAVE_MEMMOVE) && !defined(bcopy) 257 # define bcopy(s, d, n) memmove ((d), (s), (n)) 258 # endif 259 260 #else /* Not ANSI_STRING. */ 261 262 # ifndef HAVE_STRCHR 263 # define strchr(s, c) index((s), (c)) 264 # define strrchr(s, c) rindex((s), (c)) 265 # endif 266 267 # ifndef bcmp 268 extern int bcmp PARAMS ((const char *, const char *, int)); 269 # endif 270 # ifndef bzero 271 extern void bzero PARAMS ((char *, int)); 272 #endif 273 # ifndef bcopy 274 extern void bcopy PARAMS ((const char *b1, char *b2, int)); 275 # endif 236 # define EXIT_FAILURE 1 237 #endif 238 239 #ifndef ANSI_STRING 276 240 277 241 /* SCO Xenix has a buggy macro definition in <string.h>. */ 278 242 #undef strerror 279 243 #if !defined(__DECC) 280 extern char *strerror PARAMS ((int errnum));244 char *strerror (int errnum); 281 245 #endif 282 246 … … 290 254 291 255 #if !defined(HAVE_STRSIGNAL) 292 extern char *strsignal PARAMS ((int signum));256 char *strsignal (int signum); 293 257 #endif 294 258 … … 309 273 (*(a) == *(b) && (*(a) == '\0' || !strcmp ((a) + 1, (b) + 1)))) 310 274 # ifdef HAVE_CASE_INSENSITIVE_FS 311 /* This is only used on Windows/DOS platforms, so we assume strcmpi(). */312 275 # define strieq(a, b) \ 313 276 ((a) == (b) \ 314 277 || (tolower((unsigned char)*(a)) == tolower((unsigned char)*(b)) \ 315 && (*(a) == '\0' || !strc mpi((a) + 1, (b) + 1))))278 && (*(a) == '\0' || !strcasecmp ((a) + 1, (b) + 1)))) 316 279 # else 317 280 # define strieq(a, b) streq(a, b) … … 323 286 #endif 324 287 #define strneq(a, b, l) (strncmp ((a), (b), (l)) == 0) 325 #ifdef VMS326 extern int strcmpi (const char *,const char *);327 #endif328 288 329 289 #if defined(__GNUC__) || defined(ENUM_BITFIELDS) … … 348 308 349 309 /* Handle other OSs. */ 350 #if defined(HAVE_DOS_PATHS) 351 # define PATH_SEPARATOR_CHAR ';' 352 #elif defined(VMS) 353 # define PATH_SEPARATOR_CHAR ',' 354 #else 355 # define PATH_SEPARATOR_CHAR ':' 356 #endif 357 358 /* This is needed for getcwd() and chdir(). */ 359 #if defined(_MSC_VER) || defined(__BORLANDC__) 310 #ifndef PATH_SEPARATOR_CHAR 311 # if defined(HAVE_DOS_PATHS) 312 # define PATH_SEPARATOR_CHAR ';' 313 # elif defined(VMS) 314 # define PATH_SEPARATOR_CHAR ',' 315 # else 316 # define PATH_SEPARATOR_CHAR ':' 317 # endif 318 #endif 319 320 /* This is needed for getcwd() and chdir(), on some W32 systems. */ 321 #if defined(HAVE_DIRECT_H) 360 322 # include <direct.h> 361 323 #endif … … 364 326 # include <fcntl.h> 365 327 # include <malloc.h> 366 # define pipe( p) _pipe(p, 512, O_BINARY)367 # define kill( pid,sig) w32_kill(pid,sig)368 369 extern void sync_Path_environment(void);370 extern int kill(int pid, int sig);371 extern char *end_of_token_w32(char *s, char stopchar);372 extern int find_and_set_default_shell(char *token);328 # define pipe(_p) _pipe((_p), 512, O_BINARY) 329 # define kill(_pid,_sig) w32_kill((_pid),(_sig)) 330 331 void sync_Path_environment (void); 332 int kill (int pid, int sig); 333 char *end_of_token_w32 (const char *s, char stopchar); 334 int find_and_set_default_shell (const char *token); 373 335 374 336 /* indicates whether or not we have Bourne shell */ … … 400 362 401 363 #if HAVE_ANSI_COMPILER && USE_VARIADIC && HAVE_STDARG_H 402 externvoid message (int prefix, const char *fmt, ...)403 __attribute__ ((__format__ (__printf__, 2, 3)));404 externvoid error (const struct floc *flocp, const char *fmt, ...)405 __attribute__ ((__format__ (__printf__, 2, 3)));406 externvoid fatal (const struct floc *flocp, const char *fmt, ...)364 void message (int prefix, const char *fmt, ...) 365 __attribute__ ((__format__ (__printf__, 2, 3))); 366 void error (const struct floc *flocp, const char *fmt, ...) 367 __attribute__ ((__format__ (__printf__, 2, 3))); 368 void fatal (const struct floc *flocp, const char *fmt, ...) 407 369 __attribute__ ((noreturn, __format__ (__printf__, 2, 3))); 408 370 #else 409 extern void message (); 410 extern void error (); 411 extern void fatal (); 412 #endif 413 414 extern void die PARAMS ((int)) __attribute__ ((noreturn)); 415 extern void log_working_directory PARAMS ((int)); 416 extern void pfatal_with_name PARAMS ((const char *)) __attribute__ ((noreturn)); 417 extern void perror_with_name PARAMS ((const char *, const char *)); 418 extern char *savestring PARAMS ((const char *, unsigned int)); 419 extern char *concat PARAMS ((const char *, const char *, const char *)); 420 extern char *xmalloc PARAMS ((unsigned int)); 421 extern char *xrealloc PARAMS ((char *, unsigned int)); 422 extern char *xstrdup PARAMS ((const char *)); 423 extern char *find_next_token PARAMS ((char **, unsigned int *)); 424 extern char *next_token PARAMS ((const char *)); 425 extern char *end_of_token PARAMS ((const char *)); 426 extern void collapse_continuations PARAMS ((char *)); 427 extern char *lindex PARAMS ((const char *, const char *, int)); 428 extern int alpha_compare PARAMS ((const void *, const void *)); 429 extern void print_spaces PARAMS ((unsigned int)); 430 extern char *find_percent PARAMS ((char *)); 431 extern FILE *open_tmpfile PARAMS ((char **, const char *)); 371 void message (); 372 void error (); 373 void fatal (); 374 #endif 375 376 void die (int) __attribute__ ((noreturn)); 377 void log_working_directory (int); 378 void pfatal_with_name (const char *) __attribute__ ((noreturn)); 379 void perror_with_name (const char *, const char *); 380 char *savestring (const char *, unsigned int); 381 char *concat (const char *, const char *, const char *); 382 void *xmalloc (unsigned int); 383 void *xrealloc (void *, unsigned int); 384 char *xstrdup (const char *); 385 char *find_next_token (const char **, unsigned int *); 386 char *next_token (const char *); 387 char *end_of_token (const char *); 388 void collapse_continuations (char *); 389 char *lindex (const char *, const char *, int); 390 int alpha_compare (const void *, const void *); 391 void print_spaces (unsigned int); 392 char *find_percent (char *); 393 const char *find_percent_cached (const char **); 394 FILE *open_tmpfile (char **, const char *); 432 395 433 396 #ifndef NO_ARCHIVES 434 extern int ar_name PARAMS ((char *)); 435 extern void ar_parse_name PARAMS ((char *, char **, char **)); 436 extern int ar_touch PARAMS ((char *)); 437 extern time_t ar_member_date PARAMS ((char *)); 438 #endif 439 440 extern int dir_file_exists_p PARAMS ((char *, char *)); 441 extern int file_exists_p PARAMS ((char *)); 442 extern int file_impossible_p PARAMS ((char *)); 443 extern void file_impossible PARAMS ((char *)); 444 extern char *dir_name PARAMS ((char *)); 445 extern void hash_init_directories PARAMS ((void)); 446 447 extern void define_default_variables PARAMS ((void)); 448 extern void set_default_suffixes PARAMS ((void)); 449 extern void install_default_suffix_rules PARAMS ((void)); 450 extern void install_default_implicit_rules PARAMS ((void)); 451 452 extern void build_vpath_lists PARAMS ((void)); 453 extern void construct_vpath_list PARAMS ((char *pattern, char *dirpath)); 454 extern int vpath_search PARAMS ((char **file, FILE_TIMESTAMP *mtime_ptr)); 455 extern int gpath_search PARAMS ((char *file, unsigned int len)); 456 457 extern void construct_include_path PARAMS ((char **arg_dirs)); 458 459 extern void user_access PARAMS ((void)); 460 extern void make_access PARAMS ((void)); 461 extern void child_access PARAMS ((void)); 462 463 extern void close_stdout PARAMS ((void)); 464 465 extern char *strip_whitespace PARAMS ((const char **begpp, const char **endpp)); 397 int ar_name (const char *); 398 void ar_parse_name (const char *, char **, char **); 399 int ar_touch (const char *); 400 time_t ar_member_date (const char *); 401 402 typedef long int (*ar_member_func_t) (int desc, const char *mem, int truncated, 403 long int hdrpos, long int datapos, 404 long int size, long int date, int uid, 405 int gid, int mode, const void *arg); 406 407 long int ar_scan (const char *archive, ar_member_func_t function, const void *arg); 408 int ar_name_equal (const char *name, const char *mem, int truncated); 409 #ifndef VMS 410 int ar_member_touch (const char *arname, const char *memname); 411 #endif 412 #endif 413 414 int dir_file_exists_p (const char *, const char *); 415 int file_exists_p (const char *); 416 int file_impossible_p (const char *); 417 void file_impossible (const char *); 418 const char *dir_name (const char *); 419 void hash_init_directories (void); 420 421 void define_default_variables (void); 422 void set_default_suffixes (void); 423 void install_default_suffix_rules (void); 424 void install_default_implicit_rules (void); 425 426 void build_vpath_lists (void); 427 void construct_vpath_list (char *pattern, char *dirpath); 428 const char *vpath_search (const char *file, FILE_TIMESTAMP *mtime_ptr); 429 int gpath_search (const char *file, unsigned int len); 430 431 void construct_include_path (const char **arg_dirs); 432 433 void user_access (void); 434 void make_access (void); 435 void child_access (void); 436 437 void close_stdout (void); 438 439 char *strip_whitespace (const char **begpp, const char **endpp); 466 440 467 441 /* String caching */ 468 extern void strcache_init PARAMS ((void));469 extern void strcache_print_stats PARAMS ((const char *prefix));470 extern int strcache_iscached PARAMS ((const char *str));471 extern const char *strcache_add PARAMS ((const char *str));472 extern const char *strcache_add_len PARAMS ((const char *str, int len));473 extern int strcache_setbufsize PARAMS ((int size));442 void strcache_init (void); 443 void strcache_print_stats (const char *prefix); 444 int strcache_iscached (const char *str); 445 const char *strcache_add (const char *str); 446 const char *strcache_add_len (const char *str, int len); 447 int strcache_setbufsize (int size); 474 448 475 449 #ifdef HAVE_VFORK_H … … 482 456 #if !defined (__GNU_LIBRARY__) && !defined (POSIX) && !defined (_POSIX_VERSION) && !defined(WINDOWS32) 483 457 484 externlong int atol ();458 long int atol (); 485 459 # ifndef VMS 486 externlong int lseek ();460 long int lseek (); 487 461 # endif 488 462 … … 491 465 #ifdef HAVE_GETCWD 492 466 # if !defined(VMS) && !defined(__DECC) 493 externchar *getcwd ();494 # endif 495 #else 496 externchar *getwd ();467 char *getcwd (); 468 # endif 469 #else 470 char *getwd (); 497 471 # define getcwd(buf, len) getwd (buf) 472 #endif 473 474 #if !HAVE_STRCASECMP 475 # if HAVE_STRICMP 476 # define strcasecmp stricmp 477 # elif HAVE_STRCMPI 478 # define strcasecmp strcmpi 479 # else 480 /* Create our own, in misc.c */ 481 int strcasecmp (const char *s1, const char *s2); 482 # endif 498 483 #endif 499 484 … … 513 498 extern int batch_mode_shell; 514 499 500 extern char cmd_prefix; 501 515 502 extern unsigned int job_slots; 516 503 extern int job_fds[2]; … … 564 551 #endif 565 552 566 567 553 #ifdef __EMX__ 568 # if !HAVE_STRCASECMP569 # define strcasecmp stricmp570 # endif571 572 554 # if !defined chdir 573 555 # define chdir _chdir2 … … 608 590 to do it ourselves here. */ 609 591 610 #define ENULLLOOP(_v,_c) do{ errno = 0; \ 611 while (((_v)=_c)==0 && errno==EINTR); }while(0) 612 592 #define ENULLLOOP(_v,_c) do { errno = 0; (_v) = _c; } \ 593 while((_v)==0 && errno==EINTR)
Note:
See TracChangeset
for help on using the changeset viewer.

