SCCS-vsn: lib/libc/db/test/dbtest.c 5.16
#endif /* not lint */
#ifndef lint
#endif /* not lint */
#ifndef lint
-static char sccsid[] = "@(#)dbtest.c 5.15 (Berkeley) %G%";
+static char sccsid[] = "@(#)dbtest.c 5.16 (Berkeley) %G%";
#endif /* not lint */
#include <sys/param.h>
#endif /* not lint */
#include <sys/param.h>
infop = setinfo(type, p);
/* Open the DB. */
infop = setinfo(type, p);
/* Open the DB. */
-#define BACKINGFILE "/tmp/__dbtest"
- fname = BACKINGFILE;
- (void)unlink(BACKINGFILE);
+ p = getenv("TMPDIR");
+ if (p == NULL)
+ p = "/var/tmp";
+ (void)sprintf(buf, "%s/__dbtest", p);
+ fname = buf;
+ (void)unlink(buf);
}
if ((dbp = dbopen(fname,
O_CREAT | O_RDWR, S_IRUSR | S_IWUSR, type, infop)) == NULL)
}
if ((dbp = dbopen(fname,
O_CREAT | O_RDWR, S_IRUSR | S_IWUSR, type, infop)) == NULL)