Deleted Added
full compact
perror_test.c (291840) perror_test.c (291870)
1/*-
2 * Copyright (c) 2002 Tim J. Robbins
3 * All rights reserved.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions
7 * are met:
8 * 1. Redistributions of source code must retain the above copyright

--- 16 unchanged lines hidden (view full) ---

25 */
26
27/*
28 * Test program for perror() as specified by IEEE Std. 1003.1-2001 and
29 * ISO/IEC 9899:1999.
30 */
31
32#include <sys/cdefs.h>
1/*-
2 * Copyright (c) 2002 Tim J. Robbins
3 * All rights reserved.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions
7 * are met:
8 * 1. Redistributions of source code must retain the above copyright

--- 16 unchanged lines hidden (view full) ---

25 */
26
27/*
28 * Test program for perror() as specified by IEEE Std. 1003.1-2001 and
29 * ISO/IEC 9899:1999.
30 */
31
32#include <sys/cdefs.h>
33__FBSDID("$FreeBSD: stable/10/lib/libc/tests/stdio/perror_test.c 291840 2015-12-05 04:17:40Z ngie $");
33__FBSDID("$FreeBSD: stable/10/lib/libc/tests/stdio/perror_test.c 291870 2015-12-05 21:49:35Z ngie $");
34
35#include <err.h>
36#include <errno.h>
37#include <limits.h>
38#include <paths.h>
39#include <stdio.h>
40#include <stdlib.h>
41#include <string.h>
42#include <unistd.h>
43
44#include <atf-c.h>
45
46static char tmpfil[PATH_MAX];
47
48ATF_TC_WITHOUT_HEAD(perror_test);
49ATF_TC_BODY(perror_test, tc)
50{
34
35#include <err.h>
36#include <errno.h>
37#include <limits.h>
38#include <paths.h>
39#include <stdio.h>
40#include <stdlib.h>
41#include <string.h>
42#include <unistd.h>
43
44#include <atf-c.h>
45
46static char tmpfil[PATH_MAX];
47
48ATF_TC_WITHOUT_HEAD(perror_test);
49ATF_TC_BODY(perror_test, tc)
50{
51 char buf[512], lbuf[512];
51 char lbuf[512];
52 int i;
53 char *s;
54
55 strcpy(tmpfil, "perror.XXXXXXXX");
56 ATF_REQUIRE(mkstemp(tmpfil) >= 0);
57 /* Reopen stderr on a file descriptor other than 2. */
58 fclose(stderr);
59 for (i = 0; i < 3; i++)

--- 48 unchanged lines hidden ---
52 int i;
53 char *s;
54
55 strcpy(tmpfil, "perror.XXXXXXXX");
56 ATF_REQUIRE(mkstemp(tmpfil) >= 0);
57 /* Reopen stderr on a file descriptor other than 2. */
58 fclose(stderr);
59 for (i = 0; i < 3; i++)

--- 48 unchanged lines hidden ---