Lines Matching +defs:tmpdir +defs:c +defs:a

1 /*	$NetBSD: main.c,v 1.102 2025/01/07 14:21:11 joe Exp $	*/
4 * Copyright (c) 1992, 1993
40 * from: @(#)main.c 8.1 (Berkeley) 6/6/93
48 __RCSID("$NetBSD: main.c,v 1.102 2025/01/07 14:21:11 joe Exp $");
58 COPYRIGHT("@(#) Copyright (c) 1992, 1993\
152 struct filelist allcfiles; /* list of all .c files */
279 * to ../../compile/FOO.PROF; i.e., compile a
280 * profiling kernel based on a typical "regular"
284 * can (and should) use a "makeoptions" line.
352 errx(EXIT_FAILURE, "%s: not a binary kernel",
439 const char *tmpdir;
447 tmpdir = getenv("TMPDIR");
448 if (tmpdir == NULL)
449 tmpdir = _PATH_TMP;
450 snprintf(cname, sizeof(cname), "%s/config.tmp.XXXXXX", tmpdir);
656 struct attr *a;
665 if ((a = ht_lookup(attrtab, nv->nv_name)) != NULL) {
666 if (a->a_iattr)
668 nv->nv_name, a->a_name);
669 expandattr(a, selectattr);
767 * Make a symlink for "machine" so that "#include <machine/foo.h>" works,
814 struct attr *a;
820 * be a previously declared option.
822 if ((a = ht_lookup(attrtab, dep->nv_name)) != NULL) {
823 if (a->a_iattr)
826 thing, a->a_name);
874 * Also mark it as a valid file system, which may be
894 * Sanity check a file name.
906 cfgerror("option file name contains a `/'");
918 * Search for a defined option (defopt, filesystem, etc), and if found,
1067 * Specify that a defined option should have a Makefile variable created.
1102 * Define an option for which a value is required.
1112 * Define an option which must not have a value, and which
1113 * emits a "needs-flag" style output.
1123 * Specify that a defined flag option should have a Makefile variable
1146 * XXX crying out for a type field in a unified hashtab.
1160 /* Make sure this is not a defined file system. */
1162 cfgerror("`%s' is a defined file system", name);
1165 /* A defparam must have a value */
1167 cfgerror("option `%s' must have a value", name);
1170 /* A defflag must not have a value */
1172 cfgerror("option `%s' must not have a value", name);
1202 * Add a file system option. This routine simply inserts the name into
1203 * a list of valid file systems, which is used to validate the root
1204 * file system type. The name is then treated like a standard option.
1211 /* Make sure this is a defined file system. */
1213 cfgerror("`%s' is not a defined file system", name);
1234 struct attr *a;
1235 if ((a = ht_lookup(attrtab, n)) != NULL)
1236 selectattr(a);
1253 * Add a "make" option.
1286 * Add a conditional appending "make" option.
1330 * Add a name=value pair to an option list. The value may be NULL.
1371 * Remove a name from a hash table,
1372 * and optionally, a name=value pair from an option list.
1440 * Pseudo-devices are a little special. We consider them
1525 * Check to see if there is a *'d unit with a needs-count file.
1590 errx(EXIT_FAILURE, "%s is not a directory", builddir);
1596 errx(EXIT_FAILURE, "%s is not a directory", srcdir);
1634 const char *tmpdir;
1642 tmpdir = getenv("TMPDIR");
1643 if (tmpdir == NULL)
1644 tmpdir = _PATH_TMP;
1645 (void)snprintf(line, sizeof(line), "%s/config.tmp.XXXXXX", tmpdir);
1795 char c;
1797 for (n = name, p = low; (c = *n) != '\0'; n++)
1798 *p++ = (char)(isupper((u_char)c) ? tolower((u_char)c) : c);
1939 * device instances would have been a valid instance considering the devbase,
1942 * In other words, for a non-active device, it checks if children would be
1943 * actual orphans or the result of a negative statement in the config file.
2011 struct attr *a;
2093 /* Look for a matching dead devi */
2116 a = al->al_this;
2117 for (nv1 = a->a_devs; nv1 != NULL; nv1 = nv1->nv_next) {
2118 do_kill_orphans(nv1->nv_ptr, a, d, active);