2 * Copyright (c) 2001 Sendmail, Inc. and its suppliers.
5 * By using this file, you agree to the terms and conditions set
6 * forth in the LICENSE file which can be found at the top level of
7 * the sendmail distribution.
15 static char id
[] = "@(#)$Id: t_snprintf.c,v 8.4 2001/09/23 03:35:41 ca Exp $";
18 #define TEST_STRING "1234567890"
28 r
= snprintf(buf
, sizeof buf
, "%s", TEST_STRING
);
30 if (buf
[sizeof buf
- 1] != '\0' ||
31 r
!= strlen(TEST_STRING
))
33 fprintf(stderr
, "Add the following to devtools/Site/site.config.m4:\n\n");
34 fprintf(stderr
, "APPENDDEF(`confENVDEF', `-DSNPRINTF_IS_BROKEN=1')\n\n");
37 fprintf(stderr
, "snprintf() appears to work properly\n");