diff options
author | Todd C. Miller <millert@cvs.openbsd.org> | 2007-04-04 14:43:50 +0000 |
---|---|---|
committer | Todd C. Miller <millert@cvs.openbsd.org> | 2007-04-04 14:43:50 +0000 |
commit | 939ab3e3cba6f8d8a023dc273f5a200f2997f8d0 (patch) | |
tree | 65fd02c9b6e6db05a428feaef2369a3030915116 /gnu/usr.sbin/sendmail/libsm | |
parent | 2f6173b72cd65659ffc7251b9346b94e5f3cfea8 (diff) |
Update to sendmail-8.14.1
Diffstat (limited to 'gnu/usr.sbin/sendmail/libsm')
-rw-r--r-- | gnu/usr.sbin/sendmail/libsm/config.c | 13 | ||||
-rw-r--r-- | gnu/usr.sbin/sendmail/libsm/memstat.c | 6 | ||||
-rw-r--r-- | gnu/usr.sbin/sendmail/libsm/t-memstat.c | 19 | ||||
-rw-r--r-- | gnu/usr.sbin/sendmail/libsm/t-sem.c | 10 |
4 files changed, 37 insertions, 11 deletions
diff --git a/gnu/usr.sbin/sendmail/libsm/config.c b/gnu/usr.sbin/sendmail/libsm/config.c index 68476e3cd76..b096e13c8fb 100644 --- a/gnu/usr.sbin/sendmail/libsm/config.c +++ b/gnu/usr.sbin/sendmail/libsm/config.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2000-2003 Sendmail, Inc. and its suppliers. + * Copyright (c) 2000-2003, 2007 Sendmail, Inc. and its suppliers. * All rights reserved. * * By using this file, you agree to the terms and conditions set @@ -9,7 +9,7 @@ */ #include <sm/gen.h> -SM_RCSID("@(#)$Sendmail: config.c,v 1.30 2003/12/10 03:19:07 gshapiro Exp $") +SM_RCSID("@(#)$Sendmail: config.c,v 1.31 2007/03/14 21:21:49 ca Exp $") #include <stdlib.h> #include <sm/heap.h> @@ -247,5 +247,14 @@ char *SmCompileOptions[] = #if SM_VA_STD "SM_VA_STD", #endif /* SM_VA_STD */ +#if USEKSTAT + "USEKSTAT", +#endif /* USEKSTAT */ +#if USEPROCMEMINFO + "USEPROCMEMINFO", +#endif /* USEPROCMEMINFO */ +#if USESWAPCTL + "USESWAPCTL", +#endif /* USESWAPCTL */ NULL }; diff --git a/gnu/usr.sbin/sendmail/libsm/memstat.c b/gnu/usr.sbin/sendmail/libsm/memstat.c index 66cddadd0bc..e720ca77b2e 100644 --- a/gnu/usr.sbin/sendmail/libsm/memstat.c +++ b/gnu/usr.sbin/sendmail/libsm/memstat.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2005, 2006 Sendmail, Inc. and its suppliers. + * Copyright (c) 2005-2007 Sendmail, Inc. and its suppliers. * All rights reserved. * * By using this file, you agree to the terms and conditions set @@ -8,7 +8,7 @@ */ #include <sm/gen.h> -SM_RCSID("@(#)$Sendmail: memstat.c,v 1.5 2006/06/28 23:57:59 ca Exp $") +SM_RCSID("@(#)$Sendmail: memstat.c,v 1.6 2007/03/20 23:26:12 ca Exp $") #include <errno.h> #include <sm/misc.h> @@ -266,6 +266,8 @@ sm_memstat_get(resource, pvalue) return -1; /* try to reopen? */ rewind(fp); l = strlen(resource); + if (l >= sizeof(buf)) + return EINVAL; while (fgets(buf, sizeof(buf), fp) != NULL) { if (strncmp(buf, resource, l) == 0 && buf[l] == ':') diff --git a/gnu/usr.sbin/sendmail/libsm/t-memstat.c b/gnu/usr.sbin/sendmail/libsm/t-memstat.c index 1ea105479d0..421d5d279b3 100644 --- a/gnu/usr.sbin/sendmail/libsm/t-memstat.c +++ b/gnu/usr.sbin/sendmail/libsm/t-memstat.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2005, 2006 Sendmail, Inc. and its suppliers. + * Copyright (c) 2005-2007 Sendmail, Inc. and its suppliers. * All rights reserved. * * By using this file, you agree to the terms and conditions set @@ -8,7 +8,7 @@ */ #include <sm/gen.h> -SM_IDSTR(id, "@(#)$Sendmail: t-memstat.c,v 1.7 2006/06/28 23:57:59 ca Exp $") +SM_IDSTR(id, "@(#)$Sendmail: t-memstat.c,v 1.9 2007/03/14 21:41:09 ca Exp $") #include <sm/misc.h> @@ -25,6 +25,18 @@ SM_IDSTR(id, "@(#)$Sendmail: t-memstat.c,v 1.7 2006/06/28 23:57:59 ca Exp $") extern char *optarg; extern int optind; +void +usage(prg) + char *prg; +{ + fprintf(stderr, "usage: %s [options]\n", prg); + fprintf(stderr, "options:\n"); + fprintf(stderr, "-l n loop n times\n"); + fprintf(stderr, "-m n allocate n bytes per iteration\n"); + fprintf(stderr, "-r name use name as resource to query\n"); + fprintf(stderr, "-s n sleep n seconds per iteration\n"); +} + int main(argc, argv) int argc; @@ -58,7 +70,8 @@ main(argc, argv) break; default: - break; + usage(argv[0]); + exit(1); } } diff --git a/gnu/usr.sbin/sendmail/libsm/t-sem.c b/gnu/usr.sbin/sendmail/libsm/t-sem.c index 0e416eab4ae..f92f772eb6b 100644 --- a/gnu/usr.sbin/sendmail/libsm/t-sem.c +++ b/gnu/usr.sbin/sendmail/libsm/t-sem.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2000-2001, 2005-2006 Sendmail, Inc. and its suppliers. + * Copyright (c) 2000-2001, 2005-2007 Sendmail, Inc. and its suppliers. * All rights reserved. * * By using this file, you agree to the terms and conditions set @@ -8,7 +8,7 @@ */ #include <sm/gen.h> -SM_RCSID("@(#)$Sendmail: t-sem.c,v 1.15 2006/03/13 20:40:43 msk Exp $") +SM_RCSID("@(#)$Sendmail: t-sem.c,v 1.16 2007/03/21 23:22:10 ca Exp $") #include <stdio.h> @@ -22,6 +22,8 @@ SM_RCSID("@(#)$Sendmail: t-sem.c,v 1.15 2006/03/13 20:40:43 msk Exp $") # include <sm/test.h> # include <sm/sem.h> +# define T_SM_SEM_KEY (4321L) + static void delay(t, s) int t; @@ -58,7 +60,7 @@ seminter(owner) int semid; int t; - semid = sm_sem_start(SM_SEM_KEY, SM_NSEM, 0, owner); + semid = sm_sem_start(T_SM_SEM_KEY, SM_NSEM, 0, owner); if (semid < 0) { perror("sm_sem_start failed"); @@ -145,7 +147,7 @@ semtest(owner) int semid, r; int cnt = 0; - semid = sm_sem_start(SM_SEM_KEY, 1, 0, owner); + semid = sm_sem_start(T_SM_SEM_KEY, 1, 0, owner); if (semid < 0) { perror("sm_sem_start failed"); |