summaryrefslogtreecommitdiffstats
path: root/gl/setlocale_null.h
diff options
context:
space:
mode:
authorLorenz Kästle <12514511+RincewindsHat@users.noreply.github.com>2024-10-31 15:27:12 (GMT)
committerLorenz Kästle <12514511+RincewindsHat@users.noreply.github.com>2024-10-31 15:27:12 (GMT)
commit5be04ec2ceb1df77afbca4fcbf9e92a712612d6f (patch)
tree2b2e1c71dffae827c8e45cd4cccc375093d03486 /gl/setlocale_null.h
parent6d1d1dac32841d5ca6ee51bb09b30a6c604b17e2 (diff)
downloadmonitoring-plugins-5be04ec2ceb1df77afbca4fcbf9e92a712612d6f.tar.gz
Sync with the latest Gnulib code (d4ec02b3cc)refs/pull/2037/head
Diffstat (limited to 'gl/setlocale_null.h')
-rw-r--r--gl/setlocale_null.h30
1 files changed, 29 insertions, 1 deletions
diff --git a/gl/setlocale_null.h b/gl/setlocale_null.h
index c740fa0..966c53c 100644
--- a/gl/setlocale_null.h
+++ b/gl/setlocale_null.h
@@ -1,5 +1,5 @@
1/* Query the name of the current global locale. 1/* Query the name of the current global locale.
2 Copyright (C) 2019-2023 Free Software Foundation, Inc. 2 Copyright (C) 2019-2024 Free Software Foundation, Inc.
3 3
4 This file is free software: you can redistribute it and/or modify 4 This file is free software: you can redistribute it and/or modify
5 it under the terms of the GNU Lesser General Public License as 5 it under the terms of the GNU Lesser General Public License as
@@ -44,6 +44,34 @@ extern "C" {
44 55+5*58. */ 44 55+5*58. */
45#define SETLOCALE_NULL_ALL_MAX (148+12*256+1) 45#define SETLOCALE_NULL_ALL_MAX (148+12*256+1)
46 46
47/* setlocale_null_r_unlocked (CATEGORY, BUF, BUFSIZE) is like
48 setlocale (CATEGORY, NULL), except that
49 - it returns the resulting locale category name or locale name in the
50 user-supplied buffer BUF, which must be BUFSIZE bytes long.
51 The recommended minimum buffer size is
52 - SETLOCALE_NULL_MAX for CATEGORY != LC_ALL, and
53 - SETLOCALE_NULL_ALL_MAX for CATEGORY == LC_ALL.
54 The return value is an error code: 0 if the call is successful, EINVAL if
55 CATEGORY is invalid, or ERANGE if BUFSIZE is smaller than the length needed
56 size (including the trailing NUL byte). In the latter case, a truncated
57 result is returned in BUF, but still NUL-terminated if BUFSIZE > 0.
58 This call is guaranteed to be multithread-safe only if
59 - CATEGORY != LC_ALL and SETLOCALE_NULL_ONE_MTSAFE is true, or
60 - CATEGORY == LC_ALL and SETLOCALE_NULL_ALL_MTSAFE is true,
61 and the other threads must not make other setlocale invocations (since
62 changing the global locale has side effects on all threads). */
63extern int setlocale_null_r_unlocked (int category, char *buf, size_t bufsize)
64 _GL_ARG_NONNULL ((2));
65
66/* setlocale_null_unlocked (CATEGORY) is like setlocale (CATEGORY, NULL).
67 The return value is NULL if CATEGORY is invalid.
68 This call is guaranteed to be multithread-safe only if
69 - CATEGORY != LC_ALL and SETLOCALE_NULL_ONE_MTSAFE is true, or
70 - CATEGORY == LC_ALL and SETLOCALE_NULL_ALL_MTSAFE is true,
71 and the other threads must not make other setlocale invocations (since
72 changing the global locale has side effects on all threads). */
73extern const char *setlocale_null_unlocked (int category);
74
47/* setlocale_null_r (CATEGORY, BUF, BUFSIZE) is like setlocale (CATEGORY, NULL), 75/* setlocale_null_r (CATEGORY, BUF, BUFSIZE) is like setlocale (CATEGORY, NULL),
48 except that 76 except that
49 - it is guaranteed to be multithread-safe, 77 - it is guaranteed to be multithread-safe,