diff options
author | cvs2svn <admin@example.com> | 2025-04-14 17:32:06 +0000 |
---|---|---|
committer | cvs2svn <admin@example.com> | 2025-04-14 17:32:06 +0000 |
commit | eb8dd9dca1228af0cd132f515509051ecfabf6f6 (patch) | |
tree | edb6da6af7e865d488dc1a29309f1e1ec226e603 /src/lib/libc/string/strerror_l.c | |
parent | 247f0352e0ed72a4f476db9dc91f4d982bc83eb2 (diff) | |
download | openbsd-eb8dd9dca1228af0cd132f515509051ecfabf6f6.tar.gz openbsd-eb8dd9dca1228af0cd132f515509051ecfabf6f6.tar.bz2 openbsd-eb8dd9dca1228af0cd132f515509051ecfabf6f6.zip |
This commit was manufactured by cvs2git to create tag 'tb_20250414'.tb_20250414
Diffstat (limited to 'src/lib/libc/string/strerror_l.c')
-rw-r--r-- | src/lib/libc/string/strerror_l.c | 33 |
1 files changed, 0 insertions, 33 deletions
diff --git a/src/lib/libc/string/strerror_l.c b/src/lib/libc/string/strerror_l.c deleted file mode 100644 index c16be7a0cc..0000000000 --- a/src/lib/libc/string/strerror_l.c +++ /dev/null | |||
@@ -1,33 +0,0 @@ | |||
1 | /* $OpenBSD: strerror_l.c,v 1.1 2017/09/05 03:16:13 schwarze Exp $ */ | ||
2 | /* | ||
3 | * Copyright (c) 2017 Ingo Schwarze <schwarze@openbsd.org> | ||
4 | * | ||
5 | * Permission to use, copy, modify, and distribute this software for any | ||
6 | * purpose with or without fee is hereby granted, provided that the above | ||
7 | * copyright notice and this permission notice appear in all copies. | ||
8 | * | ||
9 | * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES | ||
10 | * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF | ||
11 | * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR | ||
12 | * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES | ||
13 | * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN | ||
14 | * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF | ||
15 | * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. | ||
16 | */ | ||
17 | |||
18 | #include <limits.h> | ||
19 | #include <string.h> | ||
20 | |||
21 | #include "thread_private.h" | ||
22 | |||
23 | char * | ||
24 | strerror_l(int errnum, locale_t locale) | ||
25 | { | ||
26 | static char sel_buf[NL_TEXTMAX]; | ||
27 | _THREAD_PRIVATE_KEY(strerror_l); | ||
28 | char *p = _THREAD_PRIVATE(strerror_l, sel_buf, NULL); | ||
29 | |||
30 | return p == NULL ? "no buffer available in strerror_l" : | ||
31 | strerror_r(errnum, p, sizeof(sel_buf)) ? | ||
32 | "strerror_r failure" : p; | ||
33 | } | ||