MSYS2-packages/procps-ng/procps-ng-3.3.17-wchar.patch
Biswapriyo Nath 2b6756f211 procps-ng: Update to 3.3.17
* Add pgp key.
* Import patches from cygwin.
* Add check function.
2021-11-30 15:19:43 +05:30

44 lines
1.4 KiB
Diff

--- a/lib/test_process.c
+++ b/lib/test_process.c
@@ -61,9 +61,11 @@
case SI_USER:
printf("SIG %s\n", signame);
break;
+#if !defined (__CYGWIN__)
case SI_QUEUE:
printf("SIG %s value=%d\n", signame, siginfo->si_int);
break;
+#endif
default:
printf("Unknown si_code %d\n", siginfo->si_code);
exit(EXIT_FAILURE);
--- a/proc/escape.c
+++ b/proc/escape.c
@@ -25,7 +25,7 @@
#include "escape.h"
#include "readproc.h"
-#if (__GNU_LIBRARY__ >= 6) && (!defined(__UCLIBC__) || defined(__UCLIBC_HAS_WCHAR__))
+#if defined (__CYGWIN__) || ((__GNU_LIBRARY__ >= 6) && (!defined(__UCLIBC__) || defined(__UCLIBC_HAS_WCHAR__)))
# include <wchar.h>
# include <wctype.h>
# include <stdlib.h> /* MB_CUR_MAX */
@@ -53,7 +53,7 @@
};
-#if (__GNU_LIBRARY__ >= 6) && (!defined(__UCLIBC__) || defined(__UCLIBC_HAS_WCHAR__))
+#if defined (__CYGWIN__) || ((__GNU_LIBRARY__ >= 6) && (!defined(__UCLIBC__) || defined(__UCLIBC_HAS_WCHAR__)))
static int escape_str_utf8(char *restrict dst, const char *restrict src, int bufsize, int *maxcells){
int my_cells = 0;
@@ -127,7 +127,7 @@
int my_cells = 0;
int my_bytes = 0;
-#if (__GNU_LIBRARY__ >= 6) && (!defined(__UCLIBC__) || defined(__UCLIBC_HAS_WCHAR__))
+#if defined (__CYGWIN__) || ((__GNU_LIBRARY__ >= 6) && (!defined(__UCLIBC__) || defined(__UCLIBC_HAS_WCHAR__)))
static int utf_init=0;
if(utf_init==0){