logo

live-bootstrap

Mirror of <https://github.com/fosslinux/live-bootstrap>

mbstate.patch (1307B)


  1. SPDX-FileCopyrightText: 2021 Andrius Štikonas <andrius@stikonas.eu>
  2. SPDX-FileCopyrightText: 2021 fosslinux <fosslinux@aussies.space>
  3. SPDX-License-Identifier: GPL-2.0-or-later
  4. mbstate_t is a struct that is required. However, it is not defined by mes libc.
  5. This implementation was taken from glibc 2.32.
  6. --- coreutils-5.0/lib/quotearg.c 2002-11-23 07:08:10.000000000 +0000
  7. +++ coreutils-5.0/lib/quotearg.c 2021-01-17 19:41:59.461095532 +0000
  8. @@ -21,6 +21,7 @@
  9. # include <config.h>
  10. #endif
  11. +#include "mbstate_t.h"
  12. #include "quotearg.h"
  13. #include "xalloc.h"
  14. --- coreutils-5.0/lib/mbstate_t.h 1970-01-01 01:00:00.000000000 +0100
  15. +++ coreutils-5.0/lib/mbstate_t.h 2021-01-17 19:42:21.341658668 +0000
  16. @@ -0,0 +1,23 @@
  17. +#ifndef ____mbstate_t_defined
  18. +#define ____mbstate_t_defined 1
  19. +
  20. +/* Integral type unchanged by default argument promotions that can
  21. + hold any value corresponding to members of the extended character
  22. + set, as well as at least one value that does not correspond to any
  23. + member of the extended character set. */
  24. +#ifndef __WINT_TYPE__
  25. +# define __WINT_TYPE__ unsigned int
  26. +#endif
  27. +
  28. +/* Conversion state information. */
  29. +typedef struct
  30. +{
  31. + int __count;
  32. + union
  33. + {
  34. + __WINT_TYPE__ __wch;
  35. + char __wchb[4];
  36. + } __value; /* Value so far. */
  37. +} mbstate_t;
  38. +
  39. +#endif