1 /* $NetBSD: make.h,v 1.179 2020/11/01 17:47:26 rillig Exp $ */
4 * Copyright (c) 1988, 1989, 1990, 1993
5 * The Regents of the University of California. All rights reserved.
7 * This code is derived from software contributed to Berkeley by
10 * Redistribution and use in source and binary forms, with or without
11 * modification, are permitted provided that the following conditions
13 * 1. Redistributions of source code must retain the above copyright
14 * notice, this list of conditions and the following disclaimer.
15 * 2. Redistributions in binary form must reproduce the above copyright
16 * notice, this list of conditions and the following disclaimer in the
17 * documentation and/or other materials provided with the distribution.
18 * 3. Neither the name of the University nor the names of its contributors
19 * may be used to endorse or promote products derived from this software
20 * without specific prior written permission.
22 * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
23 * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
24 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
25 * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
26 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
27 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
28 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
29 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
30 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
31 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
34 * from: @(#)make.h 8.3 (Berkeley) 6/13/95
38 * Copyright (c) 1989 by Berkeley Softworks
39 * All rights reserved.
41 * This code is derived from software contributed to Berkeley by
44 * Redistribution and use in source and binary forms, with or without
45 * modification, are permitted provided that the following conditions
47 * 1. Redistributions of source code must retain the above copyright
48 * notice, this list of conditions and the following disclaimer.
49 * 2. Redistributions in binary form must reproduce the above copyright
50 * notice, this list of conditions and the following disclaimer in the
51 * documentation and/or other materials provided with the distribution.
52 * 3. All advertising materials mentioning features or use of this software
53 * must display the following acknowledgement:
54 * This product includes software developed by the University of
55 * California, Berkeley and its contributors.
56 * 4. Neither the name of the University nor the names of its contributors
57 * may be used to endorse or promote products derived from this software
58 * without specific prior written permission.
60 * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
61 * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
62 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
63 * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
64 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
65 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
66 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
67 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
68 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
69 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
72 * from: @(#)make.h 8.3 (Berkeley) 6/13/95
77 * The global definitions for pmake
87 #include <sys/types.h>
88 #include <sys/param.h>
103 #include <sys/cdefs.h>
109 #if defined(__GNUC__)
110 #define MAKE_GNUC_PREREQ(x, y) \
111 ((__GNUC__ == (x) && __GNUC_MINOR__ >= (y)) || \
113 #else /* defined(__GNUC__) */
114 #define MAKE_GNUC_PREREQ(x, y) 0
115 #endif /* defined(__GNUC__) */
117 #if MAKE_GNUC_PREREQ(2, 7)
118 #define MAKE_ATTR_UNUSED __attribute__((__unused__))
120 #define MAKE_ATTR_UNUSED /* delete */
123 #if MAKE_GNUC_PREREQ(2, 5)
124 #define MAKE_ATTR_DEAD __attribute__((__noreturn__))
125 #elif defined(__GNUC__)
126 #define MAKE_ATTR_DEAD __volatile
128 #define MAKE_ATTR_DEAD /* delete */
131 #if MAKE_GNUC_PREREQ(2, 7)
132 #define MAKE_ATTR_PRINTFLIKE(fmtarg, firstvararg) \
133 __attribute__((__format__ (__printf__, fmtarg, firstvararg)))
135 #define MAKE_ATTR_PRINTFLIKE(fmtarg, firstvararg) /* delete */
139 * A boolean type is defined as an integer, not an enum, for historic reasons.
140 * The only allowed values are the constants TRUE and FALSE (1 and 0).
143 #ifdef USE_DOUBLE_BOOLEAN
144 /* During development, to find type mismatches in function declarations. */
145 typedef double Boolean;
148 #elif defined(USE_UCHAR_BOOLEAN)
149 /* During development, to find code that depends on the exact value of TRUE or
150 * that stores other values in Boolean variables. */
151 typedef unsigned char Boolean;
152 #define TRUE ((unsigned char)0xFF)
153 #define FALSE ((unsigned char)0x00)
154 #elif defined(USE_CHAR_BOOLEAN)
155 /* During development, to find code that uses a boolean as array index, via
156 * -Wchar-subscripts. */
157 typedef char Boolean;
158 #define TRUE ((char)-1)
159 #define FALSE ((char)0x00)
160 #elif defined(USE_ENUM_BOOLEAN)
161 typedef enum Boolean { FALSE, TRUE } Boolean;
175 #include "make-conf.h"
177 #include "make_malloc.h"
180 * some vendors don't have this --sjg
182 #if defined(S_IFDIR) && !defined(S_ISDIR)
183 # define S_ISDIR(m) (((m) & S_IFMT) == S_IFDIR)
186 #if defined(sun) && (defined(__svr4__) || defined(__SVR4))
187 #define POSIX_SIGNALS
191 UNMADE, /* Not examined yet */
192 DEFERRED, /* Examined once (building child) */
193 REQUESTED, /* on toBeMade list */
194 BEINGMADE, /* Target is already being made.
195 * Indicates a cycle in the graph. */
196 MADE, /* Was out-of-date and has been made */
197 UPTODATE, /* Was already up-to-date */
198 ERROR, /* An error occurred while it was being
199 * made (used only in compat mode) */
200 ABORTED /* The target was aborted due to an error
201 * making an inferior (compat). */
204 /* The OP_ constants are used when parsing a dependency line as a way of
205 * communicating to other parts of the program the way in which a target
208 * Some of the OP_ constants can be combined, others cannot. */
209 typedef enum GNodeType {
210 /* The dependency operator ':' is the most common one. The commands of
211 * this node are executed if any child is out-of-date. */
213 /* The dependency operator '!' always executes its commands, even if
214 * its children are up-to-date. */
216 /* The dependency operator '::' behaves like ':', except that it allows
217 * multiple dependency groups to be defined. Each of these groups is
218 * executed on its own, independently from the others. */
219 OP_DOUBLEDEP = 1 << 2,
221 /* Matches the dependency operators ':', '!' and '::'. */
222 OP_OPMASK = OP_DEPENDS|OP_FORCE|OP_DOUBLEDEP,
224 /* Don't care if the target doesn't exist and can't be created */
225 OP_OPTIONAL = 1 << 3,
226 /* Use associated commands for parents */
228 /* Target is never out of date, but always execute commands anyway.
229 * Its time doesn't matter, so it has none...sort of */
231 /* Ignore non-zero exit status from shell commands when creating the node */
233 /* Don't remove the target when interrupted */
234 OP_PRECIOUS = 1 << 7,
235 /* Don't echo commands when executed */
237 /* Target is a recursive make so its commands should always be executed
238 * when it is out of date, regardless of the state of the -n or -t flags */
240 /* Target is out-of-date only if any of its children was out-of-date */
242 /* Assume the children of the node have been already made */
244 /* Special .BEGIN, .END, .INTERRUPT */
245 OP_SPECIAL = 1 << 12,
246 /* Like .USE, only prepend commands */
247 OP_USEBEFORE = 1 << 13,
248 /* The node is invisible to its parents. I.e. it doesn't show up in the
249 * parents' local variables. */
250 OP_INVISIBLE = 1 << 14,
251 /* The node is exempt from normal 'main target' processing in parse.c */
252 OP_NOTMAIN = 1 << 15,
253 /* Not a file target; run always */
255 /* Don't search for file in the path */
257 /* .WAIT phony node */
259 /* .NOMETA do not create a .meta file */
261 /* .META we _do_ want a .meta file */
263 /* Do not compare commands in .meta file */
264 OP_NOMETA_CMP = 1 << 21,
265 /* Possibly a submake node */
266 OP_SUBMAKE = 1 << 22,
268 /* Attributes applied by PMake */
270 /* The node is a transformation rule */
271 OP_TRANSFORM = 1 << 31,
272 /* Target is a member of an archive */
273 /* XXX: How does this differ from OP_ARCHV? */
275 /* The node is a library,
276 * its name has the form "-l<libname>" */
278 /* The node is an archive member,
279 * its name has the form "archive(member)" */
280 /* XXX: How does this differ from OP_MEMBER? */
282 /* Target has all the commands it should. Used when parsing to catch
283 * multiple command groups for a target. Only applies to the dependency
284 * operators ':' and '!', but not to '::'. */
285 OP_HAS_COMMANDS = 1 << 27,
286 /* The special command "..." has been seen. All further commands from
287 * this node will be saved on the .END node instead, to be executed at
289 OP_SAVE_CMDS = 1 << 26,
290 /* Already processed by Suff_FindDeps */
291 OP_DEPS_FOUND = 1 << 25,
292 /* Node found while expanding .ALLSRC */
295 OP_NOTARGET = OP_NOTMAIN | OP_USE | OP_EXEC | OP_TRANSFORM
298 typedef enum GNodeFlags {
299 REMAKE = 0x0001, /* this target needs to be (re)made */
300 CHILDMADE = 0x0002, /* children of this target were made */
301 FORCE = 0x0004, /* children don't exist, and we pretend made */
302 DONE_WAIT = 0x0008, /* Set by Make_ProcessWait() */
303 DONE_ORDER = 0x0010, /* Build requested by .ORDER processing */
304 FROM_DEPEND = 0x0020, /* Node created from .depend */
305 DONE_ALLSRC = 0x0040, /* We do it once only */
306 CYCLE = 0x1000, /* Used by MakePrintStatus */
307 DONECYCLE = 0x2000, /* Used by MakePrintStatus */
308 INTERNAL = 0x4000 /* Internal use only */
311 typedef struct List StringList;
312 typedef struct ListNode StringListNode;
314 typedef struct List GNodeList;
315 typedef struct ListNode GNodeListNode;
317 typedef struct List /* of CachedDir */ SearchPath;
319 /* A graph node represents a target that can possibly be made, including its
320 * relation to other targets and a lot of other details. */
321 typedef struct GNode {
322 /* The target's name, such as "clean" or "make.c" */
324 /* The unexpanded name of a .USE node */
326 /* The full pathname of the file belonging to the target.
327 * XXX: What about .PHONY targets? These don't have an associated path. */
330 /* The type of operator used to define the sources (see the OP flags below).
331 * XXX: This looks like a wild mixture of type and flags. */
335 /* The state of processing on this node */
337 int unmade; /* The number of unmade children */
339 /* The modification time; 0 means the node does not have a corresponding
340 * file; see Make_OODate. */
342 struct GNode *youngestChild;
344 /* The GNodes for which this node is an implied source. May be empty.
345 * For example, when there is an inference rule for .c.o, the node for
346 * file.c has the node for file.o in this list. */
347 GNodeList *implicitParents;
349 /* Other nodes of the same name, for the '::' operator. */
352 /* The nodes that depend on this one, or in other words, the nodes for
353 * which this is a source. */
355 /* The nodes on which this one depends. */
358 /* .ORDER nodes we need made. The nodes that must be made (if they're
359 * made) before this node can be made, but that do not enter into the
360 * datedness of this node. */
361 GNodeList *order_pred;
362 /* .ORDER nodes who need us. The nodes that must be made (if they're made
363 * at all) after this node is made, but that do not depend on this node,
364 * in the normal sense. */
365 GNodeList *order_succ;
367 /* The "#n" suffix for this cohort, or "" for other nodes */
369 /* The number of unmade instances on the cohorts list */
371 /* Pointer to the first instance of a '::' node; only set when on a
373 struct GNode *centurion;
375 /* Last time (sequence number) we tried to make this node */
376 unsigned int checked_seqno;
378 /* The "local" variables that are specific to this target and this target
379 * only, such as $@, $<, $?.
381 * Also used for the global variable scopes VAR_GLOBAL, VAR_CMDLINE,
382 * VAR_INTERNAL, which contain variables with arbitrary names. */
383 HashTable /* of Var pointer */ context;
385 /* The commands to be given to a shell to create this target. */
386 StringList *commands;
388 /* Suffix for the node (determined by Suff_FindDeps and opaque to everyone
389 * but the Suff module) */
392 /* filename where the GNode got defined */
394 /* line number where the GNode got defined */
399 * Error levels for parsing. PARSE_FATAL means the process cannot continue
400 * once the top-level makefile has been parsed. PARSE_WARNING and PARSE_INFO
403 typedef enum ParseErrorLevel {
410 * Values returned by Cond_EvalLine and Cond_EvalCondition.
412 typedef enum CondEvalResult {
413 COND_PARSE, /* Parse the next lines */
414 COND_SKIP, /* Skip the next lines */
415 COND_INVALID /* Not a conditional statement */
419 * Definitions for the "local" variables. Used only for clarity.
421 #define TARGET "@" /* Target of dependency */
422 #define OODATE "?" /* All out-of-date sources */
423 #define ALLSRC ">" /* All sources */
424 #define IMPSRC "<" /* Source implied by transformation */
425 #define PREFIX "*" /* Common prefix */
426 #define ARCHIVE "!" /* Archive in "archive(member)" syntax */
427 #define MEMBER "%" /* Member in "archive(member)" syntax */
429 #define FTARGET "@F" /* file part of TARGET */
430 #define DTARGET "@D" /* directory part of TARGET */
431 #define FIMPSRC "<F" /* file part of IMPSRC */
432 #define DIMPSRC "<D" /* directory part of IMPSRC */
433 #define FPREFIX "*F" /* file part of PREFIX */
434 #define DPREFIX "*D" /* directory part of PREFIX */
439 extern SearchPath *dirSearchPath;
440 /* The list of directories to search when
441 * looking for targets */
442 extern Boolean allPrecious; /* True if every target is precious */
443 extern Boolean deleteOnError; /* True if failed targets should be deleted */
444 extern Boolean doing_depend; /* TRUE if processing .depend */
446 extern GNode *DEFAULT; /* .DEFAULT rule */
448 extern GNode *VAR_INTERNAL; /* Variables defined internally by make
449 * which should not override those set by
452 extern GNode *VAR_GLOBAL; /* Variables defined in a global context, e.g
453 * in the Makefile itself */
454 extern GNode *VAR_CMDLINE; /* Variables defined on the command line */
455 extern char var_Error[]; /* Value returned by Var_Parse when an error
456 * is encountered. It actually points to
457 * an empty string, so naive callers needn't
460 extern time_t now; /* The time at the start of this whole
463 extern Boolean oldVars; /* Do old-style variable substitution */
465 extern SearchPath *sysIncPath; /* The system include path. */
466 extern SearchPath *defSysIncPath; /* The default system include path. */
468 extern char curdir[]; /* Startup directory */
469 extern char *progname; /* The program name */
470 extern char *makeDependfile; /* .depend */
471 extern char **savedEnv; /* if we replaced environ this will be non-NULL */
473 extern int makelevel;
476 * We cannot vfork() in a child of vfork().
477 * Most systems do not enforce this but some do.
479 #define vFork() ((getpid() == myPid) ? vfork() : fork())
482 #define MAKEFLAGS ".MAKEFLAGS"
483 #define MAKEOVERRIDES ".MAKEOVERRIDES"
484 #define MAKE_JOB_PREFIX ".MAKE.JOB.PREFIX" /* prefix for job target output */
485 #define MAKE_EXPORTED ".MAKE.EXPORTED" /* variables we export */
486 #define MAKE_MAKEFILES ".MAKE.MAKEFILES" /* all makefiles already loaded */
487 #define MAKE_LEVEL ".MAKE.LEVEL" /* recursion level */
488 #define MAKEFILE_PREFERENCE ".MAKE.MAKEFILE_PREFERENCE"
489 #define MAKE_DEPENDFILE ".MAKE.DEPENDFILE" /* .depend */
490 #define MAKE_MODE ".MAKE.MODE"
491 #ifndef MAKE_LEVEL_ENV
492 # define MAKE_LEVEL_ENV "MAKELEVEL"
495 typedef enum DebugFlags {
499 DEBUG_GRAPH1 = 1 << 3,
500 DEBUG_GRAPH2 = 1 << 4,
507 DEBUG_SHELL = 1 << 11,
508 DEBUG_ERROR = 1 << 12,
509 DEBUG_LOUD = 1 << 13,
510 DEBUG_META = 1 << 14,
511 DEBUG_HASH = 1 << 15,
513 DEBUG_GRAPH3 = 1 << 16,
514 DEBUG_SCRIPT = 1 << 17,
515 DEBUG_PARSE = 1 << 18,
521 #define CONCAT(a,b) a##b
523 #define DEBUG(module) (opts.debug & CONCAT(DEBUG_,module))
525 void debug_printf(const char *, ...) MAKE_ATTR_PRINTFLIKE(1, 2);
527 #define DEBUG0(module, text) \
528 if (!DEBUG(module)) (void)0; \
529 else debug_printf("%s", text)
531 #define DEBUG1(module, fmt, arg1) \
532 if (!DEBUG(module)) (void)0; \
533 else debug_printf(fmt, arg1)
535 #define DEBUG2(module, fmt, arg1, arg2) \
536 if (!DEBUG(module)) (void)0; \
537 else debug_printf(fmt, arg1, arg2)
539 #define DEBUG3(module, fmt, arg1, arg2, arg3) \
540 if (!DEBUG(module)) (void)0; \
541 else debug_printf(fmt, arg1, arg2, arg3)
543 #define DEBUG4(module, fmt, arg1, arg2, arg3, arg4) \
544 if (!DEBUG(module)) (void)0; \
545 else debug_printf(fmt, arg1, arg2, arg3, arg4)
547 #define DEBUG5(module, fmt, arg1, arg2, arg3, arg4, arg5) \
548 if (!DEBUG(module)) (void)0; \
549 else debug_printf(fmt, arg1, arg2, arg3, arg4, arg5)
551 typedef enum PrintVarsMode {
556 /* Command line options */
557 typedef struct CmdOpts {
558 /* -B: whether we are make compatible */
561 /* -d: debug control: There is one bit per module. It is up to the
562 * module what debug information to print. */
565 /* -df: debug output is written here - default stderr */
568 /* -dV: for the -V option, print unexpanded variable values */
571 /* -e: check environment variables before global variables */
572 Boolean checkEnvFirst;
574 /* -f: the makefiles to read */
575 StringList *makefiles;
577 /* -i: if true, ignore all errors from shell commands */
578 Boolean ignoreErrors;
580 /* -j: the maximum number of jobs that can run in parallel;
581 * this is coordinated with the submakes */
584 /* -k: if true, continue on unaffected portions of the graph when an
585 * error occurs in one portion */
588 /* -N: execute no commands from the targets */
589 Boolean noRecursiveExecute;
591 /* -n: execute almost no commands from the targets */
594 /* -q: if true, we aren't supposed to really make anything, just see if
595 * the targets are out-of-date */
598 /* -r: raw mode, without loading the builtin rules. */
601 /* -s: don't echo the shell commands before executing them */
604 /* -t: touch the targets if they are out-of-date, but don't actually
608 /* -[Vv]: print expanded or unexpanded selected variables */
609 PrintVarsMode printVars;
610 /* -[Vv]: the variables to print */
611 StringList *variables;
613 /* -W: if true, makefile parsing warnings are treated as errors */
614 Boolean parseWarnFatal;
616 /* -w: print Entering and Leaving for submakes */
619 /* -X: if true, do not export variables set on the command line to the
621 Boolean varNoExportEnv;
623 /* The target names specified on the command line.
624 * Used to resolve .if make(...) statements. */
633 void Make_TimeStamp(GNode *, GNode *);
634 Boolean Make_OODate(GNode *);
635 void Make_ExpandUse(GNodeList *);
636 time_t Make_Recheck(GNode *);
637 void Make_HandleUse(GNode *, GNode *);
638 void Make_Update(GNode *);
639 void Make_DoAllVar(GNode *);
640 Boolean Make_Run(GNodeList *);
641 int dieQuietly(GNode *, int);
642 void PrintOnError(GNode *, const char *);
643 void Main_ExportMAKEFLAGS(Boolean);
644 Boolean Main_SetObjdir(const char *, ...) MAKE_ATTR_PRINTFLIKE(1, 2);
645 int mkTempFile(const char *, char **);
646 int str2Lst_Append(StringList *, char *, const char *);
647 void GNode_FprintDetails(FILE *, const char *, const GNode *, const char *);
648 Boolean GNode_ShouldExecute(GNode *gn);
650 /* See if the node was seen on the left-hand side of a dependency operator. */
651 static MAKE_ATTR_UNUSED Boolean
652 GNode_IsTarget(const GNode *gn)
654 return (gn->type & OP_OPMASK) != 0;
657 static MAKE_ATTR_UNUSED const char *
658 GNode_Path(const GNode *gn)
660 return gn->path != NULL ? gn->path : gn->name;
663 static MAKE_ATTR_UNUSED const char *
664 GNode_VarTarget(GNode *gn) { return Var_ValueDirect(TARGET, gn); }
665 static MAKE_ATTR_UNUSED const char *
666 GNode_VarOodate(GNode *gn) { return Var_ValueDirect(OODATE, gn); }
667 static MAKE_ATTR_UNUSED const char *
668 GNode_VarAllsrc(GNode *gn) { return Var_ValueDirect(ALLSRC, gn); }
669 static MAKE_ATTR_UNUSED const char *
670 GNode_VarImpsrc(GNode *gn) { return Var_ValueDirect(IMPSRC, gn); }
671 static MAKE_ATTR_UNUSED const char *
672 GNode_VarPrefix(GNode *gn) { return Var_ValueDirect(PREFIX, gn); }
673 static MAKE_ATTR_UNUSED const char *
674 GNode_VarArchive(GNode *gn) { return Var_ValueDirect(ARCHIVE, gn); }
675 static MAKE_ATTR_UNUSED const char *
676 GNode_VarMember(GNode *gn) { return Var_ValueDirect(MEMBER, gn); }
679 #define UNCONST(ptr) ({ \
684 __d.__cp = ptr, __d.__p; })
686 #define UNCONST(ptr) (void *)(ptr)
689 /* At least GNU/Hurd systems lack hardcoded MAXPATHLEN/PATH_MAX */
694 #define MAXPATHLEN BMAKE_PATH_MAX
697 #define PATH_MAX MAXPATHLEN
701 #define KILLPG(pid, sig) kill(-(pid), (sig))
703 #define KILLPG(pid, sig) killpg((pid), (sig))
706 static inline MAKE_ATTR_UNUSED Boolean ch_isalnum(char ch)
707 { return isalnum((unsigned char)ch) != 0; }
708 static inline MAKE_ATTR_UNUSED Boolean ch_isalpha(char ch)
709 { return isalpha((unsigned char)ch) != 0; }
710 static inline MAKE_ATTR_UNUSED Boolean ch_isdigit(char ch)
711 { return isdigit((unsigned char)ch) != 0; }
712 static inline MAKE_ATTR_UNUSED Boolean ch_isspace(char ch)
713 { return isspace((unsigned char)ch) != 0; }
714 static inline MAKE_ATTR_UNUSED Boolean ch_isupper(char ch)
715 { return isupper((unsigned char)ch) != 0; }
716 static inline MAKE_ATTR_UNUSED char ch_tolower(char ch)
717 { return (char)tolower((unsigned char)ch); }
718 static inline MAKE_ATTR_UNUSED char ch_toupper(char ch)
719 { return (char)toupper((unsigned char)ch); }
721 static inline MAKE_ATTR_UNUSED void
722 cpp_skip_whitespace(const char **pp)
724 while (ch_isspace(**pp))
728 static inline MAKE_ATTR_UNUSED void
729 pp_skip_whitespace(char **pp)
731 while (ch_isspace(**pp))
736 # include <sys/cdefs.h>
738 # define MAKE_RCSID(id) __RCSID(id)
741 # define MAKE_RCSID(id) static volatile char rcsid[] = id
744 #endif /* MAKE_MAKE_H */