Print this page
XXXX update sendmail to 8.14.9
| Split |
Close |
| Expand all |
| Collapse all |
--- old/usr/src/cmd/sendmail/libsm/t-fopen.c
+++ new/usr/src/cmd/sendmail/libsm/t-fopen.c
1 1 /*
2 - * Copyright (c) 2000-2002 Sendmail, Inc. and its suppliers.
2 + * Copyright (c) 2000-2002 Proofpoint, Inc. and its suppliers.
3 3 * All rights reserved.
4 4 *
5 5 * By using this file, you agree to the terms and conditions set
6 6 * forth in the LICENSE file which can be found at the top level of
7 7 * the sendmail distribution.
8 8 */
9 9
10 -#pragma ident "%Z%%M% %I% %E% SMI"
11 -
12 10 #include <sm/gen.h>
13 -SM_IDSTR(id, "@(#)$Id: t-fopen.c,v 1.9 2002/02/06 23:57:45 ca Exp $")
11 +SM_IDSTR(id, "@(#)$Id: t-fopen.c,v 1.10 2013-11-22 20:51:43 ca Exp $")
14 12
15 13 #include <fcntl.h>
16 14 #include <sm/io.h>
17 15 #include <sm/test.h>
18 16
19 17 /* ARGSUSED0 */
20 18 int
21 19 main(argc, argv)
22 20 int argc;
23 21 char *argv[];
24 22 {
25 23 int m, r;
26 24 SM_FILE_T *out;
27 25
28 26 sm_test_begin(argc, argv, "test sm_io_fopen");
29 27 out = sm_io_fopen("foo", O_WRONLY|O_APPEND|O_CREAT, 0666);
30 28 SM_TEST(out != NULL);
31 29 if (out != NULL)
32 30 {
33 31 (void) sm_io_fprintf(out, SM_TIME_DEFAULT, "foo\n");
34 32 r = sm_io_getinfo(out, SM_IO_WHAT_MODE, &m);
35 33 SM_TEST(r == 0);
36 34 SM_TEST(m == SM_IO_WRONLY);
37 35 sm_io_close(out, SM_TIME_DEFAULT);
38 36 }
39 37 return sm_test_end();
40 38 }
|
↓ open down ↓ |
17 lines elided |
↑ open up ↑ |
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX