Deleted Added
full compact
strerror.c (165903) strerror.c (220376)
1/*-
2 * Copyright (c) 1988, 1993
3 * The Regents of the University of California. 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

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

26 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
27 * SUCH DAMAGE.
28 */
29
30#if defined(LIBC_SCCS) && !defined(lint)
31static char sccsid[] = "@(#)strerror.c 8.1 (Berkeley) 6/4/93";
32#endif /* LIBC_SCCS and not lint */
33#include <sys/cdefs.h>
1/*-
2 * Copyright (c) 1988, 1993
3 * The Regents of the University of California. 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

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

26 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
27 * SUCH DAMAGE.
28 */
29
30#if defined(LIBC_SCCS) && !defined(lint)
31static char sccsid[] = "@(#)strerror.c 8.1 (Berkeley) 6/4/93";
32#endif /* LIBC_SCCS and not lint */
33#include <sys/cdefs.h>
34__FBSDID("$FreeBSD: head/lib/libc/string/strerror.c 165903 2007-01-09 00:28:16Z imp $");
34__FBSDID("$FreeBSD: head/lib/libc/string/strerror.c 220376 2011-04-05 21:56:05Z jilles $");
35
36#if defined(NLS)
37#include <nl_types.h>
38#endif
39
40#include <limits.h>
41#include <errno.h>
42#include <string.h>

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

82{
83 int retval = 0;
84#if defined(NLS)
85 int saved_errno = errno;
86 nl_catd catd;
87 catd = catopen("libc", NL_CAT_LOCALE);
88#endif
89
35
36#if defined(NLS)
37#include <nl_types.h>
38#endif
39
40#include <limits.h>
41#include <errno.h>
42#include <string.h>

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

82{
83 int retval = 0;
84#if defined(NLS)
85 int saved_errno = errno;
86 nl_catd catd;
87 catd = catopen("libc", NL_CAT_LOCALE);
88#endif
89
90 if (errnum < 1 || errnum >= sys_nerr) {
90 if (errnum < 0 || errnum >= sys_nerr) {
91 errstr(errnum,
92#if defined(NLS)
93 catgets(catd, 1, 0xffff, UPREFIX),
94#else
95 UPREFIX,
96#endif
97 strerrbuf, buflen);
98 retval = EINVAL;

--- 28 unchanged lines hidden ---
91 errstr(errnum,
92#if defined(NLS)
93 catgets(catd, 1, 0xffff, UPREFIX),
94#else
95 UPREFIX,
96#endif
97 strerrbuf, buflen);
98 retval = EINVAL;

--- 28 unchanged lines hidden ---