aboutsummaryrefslogtreecommitdiffstats
path: root/contrib/tools/m4/patches
diff options
context:
space:
mode:
authorAlexander Smirnov <alex@ydb.tech>2024-10-21 10:21:33 +0000
committerAlexander Smirnov <alex@ydb.tech>2024-10-21 10:21:33 +0000
commit4eca37ecd81a80606e9c2afed5401f15d15e3671 (patch)
treeedb21b983f86981f8ed77704231cbe589bc19bdd /contrib/tools/m4/patches
parent7f4d37b99e25e931918580a353dba7eed11407ee (diff)
parentd3ed30f2deefe6a5ed0d07a3018c723749ca5d7b (diff)
downloadydb-4eca37ecd81a80606e9c2afed5401f15d15e3671.tar.gz
Merge branch 'rightlib' into mergelibs-241021-1020
Diffstat (limited to 'contrib/tools/m4/patches')
-rw-r--r--contrib/tools/m4/patches/config.patch8
-rw-r--r--contrib/tools/m4/patches/darwin-extern-environ.patch25
-rw-r--r--contrib/tools/m4/patches/darwin-segfaults.patch11
-rw-r--r--contrib/tools/m4/patches/disable-includes.patch13
-rw-r--r--contrib/tools/m4/patches/langinfo-windows.patch27
-rw-r--r--contrib/tools/m4/patches/mkstemp-windows.patch14
6 files changed, 98 insertions, 0 deletions
diff --git a/contrib/tools/m4/patches/config.patch b/contrib/tools/m4/patches/config.patch
new file mode 100644
index 0000000000..343cbda917
--- /dev/null
+++ b/contrib/tools/m4/patches/config.patch
@@ -0,0 +1,8 @@
+--- contrib/tools/m4/lib/config-linux.h (index)
++++ contrib/tools/m4/lib/config-linux.h (working tree)
+@@ -2902,2 +2902,5 @@
+ /* Define as a macro for copying va_list variables. */
+ /* #undef va_copy */
++#undef HAVE_SYS_SINGLE_THREADED_H
++#define __attribute_maybe_unused__
++#define __attribute_nonnull__(...)
diff --git a/contrib/tools/m4/patches/darwin-extern-environ.patch b/contrib/tools/m4/patches/darwin-extern-environ.patch
new file mode 100644
index 0000000000..a7ffbaec01
--- /dev/null
+++ b/contrib/tools/m4/patches/darwin-extern-environ.patch
@@ -0,0 +1,25 @@
+--- a/lib/execute.c (index)
++++ b/lib/execute.c (working tree)
+@@ -48,6 +48,9 @@
+
+ #endif
+
++#if defined(__FreeBSD__) || defined(__MACH__)
++ extern char** environ;
++#endif
+
+ #if defined EINTR && ((defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__)
+
+--- a/lib/spawn-pipe.c (index)
++++ b/lib/spawn-pipe.c (working tree)
+@@ -53,7 +53,10 @@
+ # include <spawn.h>
+
+ #endif
+
++#if defined(__FreeBSD__) || defined(__MACH__)
++ extern char** environ;
++#endif
+
+ #ifdef EINTR
+
diff --git a/contrib/tools/m4/patches/darwin-segfaults.patch b/contrib/tools/m4/patches/darwin-segfaults.patch
new file mode 100644
index 0000000000..cd88b7e72e
--- /dev/null
+++ b/contrib/tools/m4/patches/darwin-segfaults.patch
@@ -0,0 +1,11 @@
+--- a/lib/vasnprintf.c (ef06a7dccff68bd15f669606131c541d158d4b1a)
++++ b/lib/vasnprintf.c (1efd2cc9274f1f5a222e759093d27c8d38825028)
+@@ -4870,7 +4870,7 @@ VASNPRINTF (DCHAR_T *resultbuf, size_t *lengthp,
+ #endif
+ *fbp = dp->conversion;
+ #if USE_SNPRINTF
+-# if !(((__GLIBC__ > 2 || (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 3)) && !defined __UCLIBC__) || ((defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__))
++# if !defined(__APPLE__) && !(((__GLIBC__ > 2 || (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 3)) && !defined __UCLIBC__) || ((defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__))
+ fbp[1] = '%';
+ fbp[2] = 'n';
+ fbp[3] = '\0';
diff --git a/contrib/tools/m4/patches/disable-includes.patch b/contrib/tools/m4/patches/disable-includes.patch
new file mode 100644
index 0000000000..3650e4adca
--- /dev/null
+++ b/contrib/tools/m4/patches/disable-includes.patch
@@ -0,0 +1,13 @@
+--- a/lib/obstack.c (index)
++++ b/lib/obstack.c (working tree)
+@@ -51,10 +51,6 @@
+ /* If GCC, or if an oddball (testing?) host that #defines __alignof__,
+ use the already-supplied __alignof__. Otherwise, this must be Gnulib
+ (as glibc assumes GCC); defer to Gnulib's alignof_type. */
+-# if !defined __GNUC__ && !defined __alignof__
+-# include <alignof.h>
+-# define __alignof__(type) alignof_type (type)
+-# endif
+ # include <stdlib.h>
+ # include <stdint.h>
+
diff --git a/contrib/tools/m4/patches/langinfo-windows.patch b/contrib/tools/m4/patches/langinfo-windows.patch
new file mode 100644
index 0000000000..737fa39d4d
--- /dev/null
+++ b/contrib/tools/m4/patches/langinfo-windows.patch
@@ -0,0 +1,27 @@
+--- contrib/tools/m4/lib/nl_langinfo.c (index)
++++ contrib/tools/m4/lib/nl_langinfo.c (working tree)
+@@ -171,8 +171,6 @@ nl_langinfo (nl_item item)
+ return localeconv () ->decimal_point;
+ case THOUSEP:
+ return localeconv () ->thousands_sep;
+- case GROUPING:
+- return localeconv () ->grouping;
+ /* nl_langinfo items of the LC_TIME category.
+ TODO: Really use the locale. */
+ case D_T_FMT:
+@@ -279,6 +277,7 @@ nl_langinfo (nl_item item)
+ /* nl_langinfo items of the LC_MONETARY category. */
+ case CRNCYSTR:
+ return localeconv () ->currency_symbol;
++#if 0
+ case INT_CURR_SYMBOL:
+ return localeconv () ->int_curr_symbol;
+ case MON_DECIMAL_POINT:
+@@ -307,6 +306,7 @@ nl_langinfo (nl_item item)
+ return & localeconv () ->p_sign_posn;
+ case N_SIGN_POSN:
+ return & localeconv () ->n_sign_posn;
++#endif
+ /* nl_langinfo items of the LC_MESSAGES category
+ TODO: Really use the locale. */
+ case YESEXPR:
diff --git a/contrib/tools/m4/patches/mkstemp-windows.patch b/contrib/tools/m4/patches/mkstemp-windows.patch
new file mode 100644
index 0000000000..573676c184
--- /dev/null
+++ b/contrib/tools/m4/patches/mkstemp-windows.patch
@@ -0,0 +1,14 @@
+--- contrib/tools/m4/lib/mkstemp-safer.c (73a968936fc7a168adec50944afcde54a6274f7b)
++++ contrib/tools/m4/lib/mkstemp-safer.c (index)
+@@ -21,9 +21,10 @@
+
+ #include "stdlib-safer.h"
+
+-#include <stdlib.h>
++#include "stdlib--.h"
+ #include "unistd-safer.h"
+
++
+ /* Like mkstemp, but do not return STDIN_FILENO, STDOUT_FILENO, or
+ STDERR_FILENO. */
+