VirtualBox

Changeset 900 in kBuild for vendor/gnumake/current/make.h


Ignore:
Timestamp:
May 23, 2007 3:13:11 AM (17 years ago)
Author:
bird
Message:

Load /home/bird/src/Gnu/make/2007-05-23 into vendor/gnumake/current.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • vendor/gnumake/current/make.h

    r501 r900  
    3939#endif
    4040
    41 
    42 /* Use prototypes if available.  */
    43 #if defined (__cplusplus) || defined (__STDC__)
    44 # undef  PARAMS
    45 # define PARAMS(protos)  protos
    46 #else /* Not C++ or ANSI C.  */
    47 # undef  PARAMS
    48 # define PARAMS(protos)  ()
    49 #endif /* C++ or ANSI C.  */
    5041
    5142/* Specify we want GNU source code.  This must be defined before any
     
    151142# define NEED_GET_PATH_MAX 1
    152143# 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)
     145unsigned int get_path_max (void);
    155146#endif
    156147
     
    228219#  include <stdlib.h>
    229220# 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));
     221void *malloc (int);
     222void *realloc (void *, int);
     223void free (void *);
     224
     225void abort (void) __attribute__ ((noreturn));
     226void exit (int) __attribute__ ((noreturn));
    236227# endif /* HAVE_STDLIB_H.  */
    237228
     
    243234#endif
    244235#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
    276240
    277241/* SCO Xenix has a buggy macro definition in <string.h>.  */
    278242#undef  strerror
    279243#if !defined(__DECC)
    280 extern char *strerror PARAMS ((int errnum));
     244char *strerror (int errnum);
    281245#endif
    282246
     
    290254
    291255#if !defined(HAVE_STRSIGNAL)
    292 extern char *strsignal PARAMS ((int signum));
     256char *strsignal (int signum);
    293257#endif
    294258
     
    309273    (*(a) == *(b) && (*(a) == '\0' || !strcmp ((a) + 1, (b) + 1))))
    310274# ifdef HAVE_CASE_INSENSITIVE_FS
    311 /* This is only used on Windows/DOS platforms, so we assume strcmpi().  */
    312275#  define strieq(a, b) \
    313276    ((a) == (b) \
    314277     || (tolower((unsigned char)*(a)) == tolower((unsigned char)*(b)) \
    315          && (*(a) == '\0' || !strcmpi ((a) + 1, (b) + 1))))
     278         && (*(a) == '\0' || !strcasecmp ((a) + 1, (b) + 1))))
    316279# else
    317280#  define strieq(a, b) streq(a, b)
     
    323286#endif
    324287#define strneq(a, b, l) (strncmp ((a), (b), (l)) == 0)
    325 #ifdef  VMS
    326 extern int strcmpi (const char *,const char *);
    327 #endif
    328288
    329289#if defined(__GNUC__) || defined(ENUM_BITFIELDS)
     
    348308
    349309/* 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)
    360322# include <direct.h>
    361323#endif
     
    364326# include <fcntl.h>
    365327# 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
     331void sync_Path_environment (void);
     332int kill (int pid, int sig);
     333char *end_of_token_w32 (const char *s, char stopchar);
     334int find_and_set_default_shell (const char *token);
    373335
    374336/* indicates whether or not we have Bourne shell */
     
    400362
    401363#if HAVE_ANSI_COMPILER && USE_VARIADIC && HAVE_STDARG_H
    402 extern void message (int prefix, const char *fmt, ...)
    403                      __attribute__ ((__format__ (__printf__, 2, 3)));
    404 extern void error (const struct floc *flocp, const char *fmt, ...)
    405                    __attribute__ ((__format__ (__printf__, 2, 3)));
    406 extern void fatal (const struct floc *flocp, const char *fmt, ...)
     364void message (int prefix, const char *fmt, ...)
     365              __attribute__ ((__format__ (__printf__, 2, 3)));
     366void error (const struct floc *flocp, const char *fmt, ...)
     367            __attribute__ ((__format__ (__printf__, 2, 3)));
     368void fatal (const struct floc *flocp, const char *fmt, ...)
    407369                   __attribute__ ((noreturn, __format__ (__printf__, 2, 3)));
    408370#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 *));
     371void message ();
     372void error ();
     373void fatal ();
     374#endif
     375
     376void die (int) __attribute__ ((noreturn));
     377void log_working_directory (int);
     378void pfatal_with_name (const char *) __attribute__ ((noreturn));
     379void perror_with_name (const char *, const char *);
     380char *savestring (const char *, unsigned int);
     381char *concat (const char *, const char *, const char *);
     382void *xmalloc (unsigned int);
     383void *xrealloc (void *, unsigned int);
     384char *xstrdup (const char *);
     385char *find_next_token (const char **, unsigned int *);
     386char *next_token (const char *);
     387char *end_of_token (const char *);
     388void collapse_continuations (char *);
     389char *lindex (const char *, const char *, int);
     390int alpha_compare (const void *, const void *);
     391void print_spaces (unsigned int);
     392char *find_percent (char *);
     393const char *find_percent_cached (const char **);
     394FILE *open_tmpfile (char **, const char *);
    432395
    433396#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));
     397int ar_name (const char *);
     398void ar_parse_name (const char *, char **, char **);
     399int ar_touch (const char *);
     400time_t ar_member_date (const char *);
     401
     402typedef 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
     407long int ar_scan (const char *archive, ar_member_func_t function, const void *arg);
     408int ar_name_equal (const char *name, const char *mem, int truncated);
     409#ifndef VMS
     410int ar_member_touch (const char *arname, const char *memname);
     411#endif
     412#endif
     413
     414int dir_file_exists_p (const char *, const char *);
     415int file_exists_p (const char *);
     416int file_impossible_p (const char *);
     417void file_impossible (const char *);
     418const char *dir_name (const char *);
     419void hash_init_directories (void);
     420
     421void define_default_variables (void);
     422void set_default_suffixes (void);
     423void install_default_suffix_rules (void);
     424void install_default_implicit_rules (void);
     425
     426void build_vpath_lists (void);
     427void construct_vpath_list (char *pattern, char *dirpath);
     428const char *vpath_search (const char *file, FILE_TIMESTAMP *mtime_ptr);
     429int gpath_search (const char *file, unsigned int len);
     430
     431void construct_include_path (const char **arg_dirs);
     432
     433void user_access (void);
     434void make_access (void);
     435void child_access (void);
     436
     437void close_stdout (void);
     438
     439char *strip_whitespace (const char **begpp, const char **endpp);
    466440
    467441/* 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));
     442void strcache_init (void);
     443void strcache_print_stats (const char *prefix);
     444int strcache_iscached (const char *str);
     445const char *strcache_add (const char *str);
     446const char *strcache_add_len (const char *str, int len);
     447int strcache_setbufsize (int size);
    474448
    475449#ifdef  HAVE_VFORK_H
     
    482456#if !defined (__GNU_LIBRARY__) && !defined (POSIX) && !defined (_POSIX_VERSION) && !defined(WINDOWS32)
    483457
    484 extern long int atol ();
     458long int atol ();
    485459# ifndef VMS
    486 extern long int lseek ();
     460long int lseek ();
    487461# endif
    488462
     
    491465#ifdef  HAVE_GETCWD
    492466# if !defined(VMS) && !defined(__DECC)
    493 extern char *getcwd ();
    494 # endif
    495 #else
    496 extern char *getwd ();
     467char *getcwd ();
     468# endif
     469#else
     470char *getwd ();
    497471# 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 */
     481int strcasecmp (const char *s1, const char *s2);
     482# endif
    498483#endif
    499484
     
    513498extern int batch_mode_shell;
    514499
     500extern char cmd_prefix;
     501
    515502extern unsigned int job_slots;
    516503extern int job_fds[2];
     
    564551#endif
    565552
    566 
    567553#ifdef __EMX__
    568 # if !HAVE_STRCASECMP
    569 #  define strcasecmp stricmp
    570 # endif
    571 
    572554# if !defined chdir
    573555#  define chdir _chdir2
     
    608590   to do it ourselves here.  */
    609591
    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.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette