int flags;
u_int32_t flags;
__db_tmp_dir(dbenv, flags)	DB_ENV *dbenv;	int flags;{	static const char * list[] = {	/* Ordered: see db_appinit(3). */		"/var/tmp",		"/usr/tmp",		"/temp",		/* WIN32. */		"/tmp",		"C:/temp",		/* WIN32. */		"C:/tmp",		/* WIN32. */		NULL	};	const char **lp, *p;	/* Use the environment if it's permitted and initialized. */	p = NULL;#ifdef HAVE_GETEUID	if (LF_ISSET(DB_USE_ENVIRON) ||	    (LF_ISSET(DB_USE_ENVIRON_ROOT) && getuid() == 0)) {#else	if (LF_ISSET(DB_USE_ENVIRON)) {#endif		if ((p = getenv("TMPDIR")) != NULL && p[0] == '\0') {			__db_err(dbenv, "illegal TMPDIR environment variable");			return (EINVAL);		}		/* WIN32 */		if (p == NULL && (p = getenv("TEMP")) != NULL && p[0] == '\0') {			__db_err(dbenv, "illegal TEMP environment variable");			return (EINVAL);		}		/* WIN32 */		if (p == NULL && (p = getenv("TMP")) != NULL && p[0] == '\0') {			__db_err(dbenv, "illegal TMP environment variable");			return (EINVAL);		}		/* Macintosh */		if (p == NULL &&		    (p = getenv("TempFolder")) != NULL && p[0] == '\0') {			__db_err(dbenv,			    "illegal TempFolder environment variable");			return (EINVAL);		}	}#ifdef macintosh	/* Get the path to the temporary folder. */	if (p == NULL) {		FSSpec spec;		if (!Special2FSSpec(kTemporaryFolderType,		    kOnSystemDisk, 0, &spec)) {			p = FSp2FullPath(&spec);			sTempFolder = __db_malloc(strlen(p) + 1);			strcpy(sTempFolder, p);			p = sTempFolder;		}	}#endif	/* Step through the list looking for a possibility. */	if (p == NULL)		for (lp = list; *lp != NULL; ++lp)			if (__db_exists(p = *lp, NULL) == 0)				break;	if (p == NULL)		return (0);	if ((dbenv->db_tmp_dir = (char *)__db_strdup(p)) == NULL) {		__db_err(dbenv, "%s", strerror(ENOMEM));		return (ENOMEM);	}	return (0);}