version 1.11, 2007/10/18 12:13:20 |
version 1.12, 2007/11/09 16:03:25 |
|
|
#include <sys/resource.h> |
#include <sys/resource.h> |
|
|
#include <errno.h> |
#include <errno.h> |
|
#include <limits.h> |
#include <stdlib.h> |
#include <stdlib.h> |
#include <string.h> |
#include <string.h> |
|
|
|
|
size_t len; |
size_t len; |
struct rlimit rl; |
struct rlimit rl; |
const char *errstr; |
const char *errstr; |
char *p, *buf, *lbuf, *opt, *val, fpath[MAXPATHLEN]; |
char *p, *buf, *ep, *lbuf, *opt, *val, fpath[MAXPATHLEN]; |
|
|
(void)xsnprintf(fpath, sizeof(fpath), "%s/%s", |
(void)xsnprintf(fpath, sizeof(fpath), "%s/%s", |
current_cvsroot->cr_dir, CVS_PATH_CONFIG); |
current_cvsroot->cr_dir, CVS_PATH_CONFIG); |
|
|
xfree(cvs_tagname); |
xfree(cvs_tagname); |
cvs_tagname = xstrdup(val); |
cvs_tagname = xstrdup(val); |
} else if (!strcmp(opt, "umask")) { |
} else if (!strcmp(opt, "umask")) { |
cvs_umask = (int)strtonum(val, 0, INT_MAX, &errstr); |
cvs_umask = strtol(val, &ep, 8); |
if (errstr != NULL) |
|
fatal("cvs_parse_configfile: %s: %s", val, |
if (val == ep || *ep != '\0') |
errstr); |
fatal("cvs_parse_configfile: umask %s is " |
|
"invalid", val); |
|
if (cvs_umask < 0 || cvs_umask > 07777) |
|
fatal("cvs_parse_configfile: umask %s is " |
|
"invalid", val); |
} else if (!strcmp(opt, "dlimit")) { |
} else if (!strcmp(opt, "dlimit")) { |
if (getrlimit(RLIMIT_DATA, &rl) != -1) { |
if (getrlimit(RLIMIT_DATA, &rl) != -1) { |
rl.rlim_cur = (int)strtonum(val, 0, INT_MAX, |
rl.rlim_cur = (int)strtonum(val, 0, INT_MAX, |