diff options
| author | Jörg Frings-Fürst <debian@jff.email> | 2024-03-03 19:11:45 +0100 | 
|---|---|---|
| committer | Jörg Frings-Fürst <debian@jff.email> | 2024-03-03 19:11:45 +0100 | 
| commit | 7cf710f6587e71a193a55d84dd6d8ae1a8a69ce0 (patch) | |
| tree | db628840acea83dbccaf5676b89579a80e02ef51 /lib/setlocale_null.h | |
| parent | d83e85a2e6064c36f6ad3c848e39d8b8c101c4f7 (diff) | |
| parent | 00893e79fc62966067af1a106567db96bd170338 (diff) | |
Update upstream source from tag 'upstream/1.2'
Update to upstream version '1.2'
with Debian dir 16dafe941db3036235f48227f29c6a73587c376d
Diffstat (limited to 'lib/setlocale_null.h')
| -rw-r--r-- | lib/setlocale_null.h | 30 | 
1 files changed, 29 insertions, 1 deletions
| diff --git a/lib/setlocale_null.h b/lib/setlocale_null.h index d1921b09..966c53cf 100644 --- a/lib/setlocale_null.h +++ b/lib/setlocale_null.h @@ -1,5 +1,5 @@  /* Query the name of the current global locale. -   Copyright (C) 2019-2022 Free Software Foundation, Inc. +   Copyright (C) 2019-2024 Free Software Foundation, Inc.     This file is free software: you can redistribute it and/or modify     it under the terms of the GNU Lesser General Public License as @@ -44,6 +44,34 @@ extern "C" {     55+5*58.  */  #define SETLOCALE_NULL_ALL_MAX (148+12*256+1) +/* setlocale_null_r_unlocked (CATEGORY, BUF, BUFSIZE) is like +   setlocale (CATEGORY, NULL), except that +     - it returns the resulting locale category name or locale name in the +       user-supplied buffer BUF, which must be BUFSIZE bytes long. +   The recommended minimum buffer size is +     - SETLOCALE_NULL_MAX for CATEGORY != LC_ALL, and +     - SETLOCALE_NULL_ALL_MAX for CATEGORY == LC_ALL. +   The return value is an error code: 0 if the call is successful, EINVAL if +   CATEGORY is invalid, or ERANGE if BUFSIZE is smaller than the length needed +   size (including the trailing NUL byte).  In the latter case, a truncated +   result is returned in BUF, but still NUL-terminated if BUFSIZE > 0. +   This call is guaranteed to be multithread-safe only if +     - CATEGORY != LC_ALL and SETLOCALE_NULL_ONE_MTSAFE is true, or +     - CATEGORY == LC_ALL and SETLOCALE_NULL_ALL_MTSAFE is true, +   and the other threads must not make other setlocale invocations (since +   changing the global locale has side effects on all threads).  */ +extern int setlocale_null_r_unlocked (int category, char *buf, size_t bufsize) +  _GL_ARG_NONNULL ((2)); + +/* setlocale_null_unlocked (CATEGORY) is like setlocale (CATEGORY, NULL). +   The return value is NULL if CATEGORY is invalid. +   This call is guaranteed to be multithread-safe only if +     - CATEGORY != LC_ALL and SETLOCALE_NULL_ONE_MTSAFE is true, or +     - CATEGORY == LC_ALL and SETLOCALE_NULL_ALL_MTSAFE is true, +   and the other threads must not make other setlocale invocations (since +   changing the global locale has side effects on all threads).  */ +extern const char *setlocale_null_unlocked (int category); +  /* setlocale_null_r (CATEGORY, BUF, BUFSIZE) is like setlocale (CATEGORY, NULL),     except that       - it is guaranteed to be multithread-safe, | 
