2
* config.c -- $Id: config.c 685 2003-03-08 15:26:51Z travo $
3
* configuration tester for UNIX machines
5
* Copyright (c) 1999. See accompanying LEGAL file for details.
18
/* check settings of: USE_GETRUSAGE USE_TIMES */
22
double t = p_cpu_secs(&s); \
27
/* check settings of: USE_GETTIMEOFDAY */
30
double t = p_wall_secs(); \
35
/* check settings of: NO_PASSWD */
38
char *u = p_getuser(); \
43
/* check settings of: USE_TIOCGPGRP_IOCTL */
46
value = u_in_background();
50
/* check settings of: USE_GETWD */
52
static char dirbuf[1024];
54
#define getcwd(x,y) getwd(x)
57
char *u = getcwd(dirbuf, 1024); \
62
/* check settings of: DIRENT_HEADER USE_GETWD */
66
p_dir *d = p_dopen("no/such/thing"); \
67
char *l = p_dnext(d, &value); \
68
value = p_chdir(l) || p_rmdir(l) || p_mkdir(l);
72
/* check settings of: USE_SYS_POLL_H USE_SELECT HAVE_SYS_SELECT_H
73
NO_SYS_TIME_H NEED_SELECT_PROTO */
76
int p = u_poll(1000); \
81
main(int argc, char *argv[])