mirror of
https://github.com/yann64/haikuports.git
synced 2026-04-09 05:10:05 +02:00
224 lines
5.4 KiB
Plaintext
224 lines
5.4 KiB
Plaintext
From 3b54df8e515ccfa21f2c70c2ed958a6093940a72 Mon Sep 17 00:00:00 2001
|
|
From: Jerome Duval <jerome.duval@gmail.com>
|
|
Date: Wed, 26 Nov 2014 16:48:13 +0000
|
|
Subject: Haiku patch
|
|
|
|
|
|
diff --git a/configure.ac b/configure.ac
|
|
index 6ecb255..ffee684 100644
|
|
--- a/configure.ac
|
|
+++ b/configure.ac
|
|
@@ -73,7 +73,7 @@ AC_CHECK_INCLUDES_DEFAULT
|
|
AC_PROG_EGREP
|
|
|
|
AC_HEADER_SYS_WAIT
|
|
-AC_CHECK_HEADERS([fcntl.h limits.h malloc.h stdlib.h string.h sys/ioctl.h sys/param.h unistd.h curses.h ncurses.h sys/cdefs.h termcap.h])
|
|
+AC_CHECK_HEADERS([fcntl.h limits.h malloc.h stdint.h stdlib.h string.h sys/errno.h errno.h sys/ioctl.h sys/param.h unistd.h curses.h ncurses.h sys/cdefs.h langinfo.h])
|
|
|
|
AC_CHECK_HEADER([ncurses.h], [],
|
|
[AC_CHECK_HEADER([curses.h], [],
|
|
diff --git a/src/editline/readline.h b/src/editline/readline.h
|
|
index 03e2d2e..894ebf5 100644
|
|
--- a/src/editline/readline.h
|
|
+++ b/src/editline/readline.h
|
|
@@ -78,7 +78,7 @@ typedef KEYMAP_ENTRY *Keymap;
|
|
|
|
#ifndef CTRL
|
|
#include <sys/ioctl.h>
|
|
-#if !defined(__sun) && !defined(__hpux) && !defined(_AIX)
|
|
+#if !defined(__sun) && !defined(__hpux) && !defined(_AIX) && !defined(__HAIKU__)
|
|
#include <sys/ttydefaults.h>
|
|
#endif
|
|
#ifndef CTRL
|
|
diff --git a/src/vis.c b/src/vis.c
|
|
index 00f98f0..c853983 100644
|
|
--- a/src/vis.c
|
|
+++ b/src/vis.c
|
|
@@ -75,6 +75,10 @@ __FBSDID("$FreeBSD$");
|
|
#include <wchar.h>
|
|
#include <wctype.h>
|
|
|
|
+#ifdef HAVE_STDINT_H
|
|
+#include <stdint.h>
|
|
+#endif
|
|
+
|
|
#ifdef __weak_alias
|
|
__weak_alias(strvisx,_strvisx)
|
|
#endif
|
|
--
|
|
2.42.1
|
|
|
|
|
|
From 01328eeefbf7b5941a94bb5b0450fe6ca03b1e45 Mon Sep 17 00:00:00 2001
|
|
From: Jerome Duval <jerome.duval@gmail.com>
|
|
Date: Wed, 26 Nov 2014 16:55:47 +0000
|
|
Subject: define NBBY
|
|
|
|
|
|
diff --git a/src/sys.h b/src/sys.h
|
|
index 0511bad..6ba29a1 100644
|
|
--- a/src/sys.h
|
|
+++ b/src/sys.h
|
|
@@ -132,4 +132,8 @@ extern char* tgoto(const char*, int, int);
|
|
extern char* tgetstr(char*, char**);
|
|
#endif
|
|
|
|
+#ifdef __HAIKU__
|
|
+#define NBBY 8
|
|
+#endif
|
|
+
|
|
#endif /* _h_sys */
|
|
--
|
|
2.42.1
|
|
|
|
|
|
From f316faa7dfb62198a82c5301082d9691b36e1b51 Mon Sep 17 00:00:00 2001
|
|
From: fbrosson <fbrosson@localhost>
|
|
Date: Thu, 1 Feb 2018 11:05:59 +0000
|
|
Subject: gcc2 support.
|
|
|
|
|
|
diff --git a/src/hist.c b/src/hist.c
|
|
index 19ce1c1..2c88b28 100644
|
|
--- a/src/hist.c
|
|
+++ b/src/hist.c
|
|
@@ -188,12 +188,14 @@ hist_command(EditLine *el, int argc, const wchar_t **argv)
|
|
len = len * 4 + 1;
|
|
if (len >= maxlen) {
|
|
maxlen = len + 1024;
|
|
+ {
|
|
char *nbuf = el_realloc(buf, maxlen);
|
|
if (nbuf == NULL) {
|
|
el_free(buf);
|
|
return -1;
|
|
}
|
|
buf = nbuf;
|
|
+ }
|
|
}
|
|
strvis(buf, ptr, VIS_NL);
|
|
(void) fprintf(el->el_outfile, "%d\t%s\n",
|
|
--
|
|
2.42.1
|
|
|
|
|
|
From be21054f496d6e830785cdb63235991a74edf4d8 Mon Sep 17 00:00:00 2001
|
|
From: begasus <begasus@gmail.com>
|
|
Date: Sat, 1 May 2021 09:40:38 +0000
|
|
Subject: Another gcc2 patch
|
|
|
|
|
|
diff --git a/src/filecomplete.c b/src/filecomplete.c
|
|
index 8354c81..875bedb 100644
|
|
--- a/src/filecomplete.c
|
|
+++ b/src/filecomplete.c
|
|
@@ -712,6 +712,7 @@ fn_complete2(EditLine *el,
|
|
if (matches == NULL) {
|
|
goto out;
|
|
}
|
|
+ {
|
|
int i;
|
|
size_t matches_num, maxlen, match_len, match_display=1;
|
|
int single_match = matches[2] == NULL &&
|
|
@@ -819,6 +820,7 @@ out2:
|
|
out:
|
|
el_free(temp);
|
|
return retval;
|
|
+ }
|
|
}
|
|
|
|
int
|
|
--
|
|
2.42.1
|
|
|
|
|
|
From a49b526579707aa9e2a1129c31d9cf902a66b7cd Mon Sep 17 00:00:00 2001
|
|
From: PulkoMandy <pulkomandy@pulkomandy.tk>
|
|
Date: Sun, 10 Apr 2022 22:10:17 +0200
|
|
Subject: Fix NULL pointer dereference if the prompt contains invalid UTF8
|
|
|
|
|
|
diff --git a/src/prompt.c b/src/prompt.c
|
|
index 026a746..bbad962 100644
|
|
--- a/src/prompt.c
|
|
+++ b/src/prompt.c
|
|
@@ -96,6 +96,13 @@ prompt_print(EditLine *el, int op)
|
|
p = ct_decode_string((char *)(void *)(*elp->p_func)(el),
|
|
&el->el_scratch);
|
|
|
|
+ if (!p) {
|
|
+ if (op == EL_PROMPT)
|
|
+ p = prompt_default(el);
|
|
+ else
|
|
+ p = prompt_default_r(el);
|
|
+ }
|
|
+
|
|
for (; *p; p++) {
|
|
if (elp->p_ignore == *p) {
|
|
wchar_t *litstart = ++p;
|
|
--
|
|
2.42.1
|
|
|
|
|
|
From 4f67b7208698e7415302d7310b68462b3dbac5c1 Mon Sep 17 00:00:00 2001
|
|
From: Oscar Lesta <oscar.lesta@gmail.com>
|
|
Date: Mon, 11 Dec 2023 00:49:44 -0300
|
|
Subject: Fix more parsing errors when using GCC2
|
|
|
|
|
|
diff --git a/src/chared.c b/src/chared.c
|
|
index 03d31dd..aac2593 100644
|
|
--- a/src/chared.c
|
|
+++ b/src/chared.c
|
|
@@ -650,11 +650,13 @@ el_deletestr1(EditLine *el, int start, int end)
|
|
|
|
p1 = el->el_line.buffer + start;
|
|
p2 = el->el_line.buffer + end;
|
|
- for (size_t i = 0; i < len; i++) {
|
|
+ {
|
|
+ size_t i;
|
|
+ for (i = 0; i < len; i++) {
|
|
*p1++ = *p2++;
|
|
el->el_line.lastchar--;
|
|
}
|
|
-
|
|
+ }
|
|
if (el->el_line.cursor < el->el_line.buffer)
|
|
el->el_line.cursor = el->el_line.buffer;
|
|
|
|
@@ -679,9 +681,11 @@ el_wreplacestr(EditLine *el, const wchar_t *s)
|
|
}
|
|
|
|
p = el->el_line.buffer;
|
|
- for (size_t i = 0; i < len; i++)
|
|
+ {
|
|
+ size_t i;
|
|
+ for (i = 0; i < len; i++)
|
|
*p++ = *s++;
|
|
-
|
|
+ }
|
|
el->el_line.buffer[len] = '\0';
|
|
el->el_line.lastchar = el->el_line.buffer + len;
|
|
if (el->el_line.cursor > el->el_line.lastchar)
|
|
diff --git a/src/chartype.c b/src/chartype.c
|
|
index 42079a4..fb18a65 100644
|
|
--- a/src/chartype.c
|
|
+++ b/src/chartype.c
|
|
@@ -236,10 +236,13 @@ ct_visual_string(const wchar_t *s, ct_buffer_t *conv)
|
|
}
|
|
|
|
/* failed to encode, need more buffer space */
|
|
- uintptr_t sused = (uintptr_t)dst - (uintptr_t)conv->wbuff;
|
|
+ {
|
|
+ uintptr_t sused;
|
|
+ sused = (uintptr_t)dst - (uintptr_t)conv->wbuff;
|
|
if (ct_conv_wbuff_resize(conv, conv->wsize + CT_BUFSIZ) == -1)
|
|
return NULL;
|
|
dst = conv->wbuff + sused;
|
|
+ }
|
|
}
|
|
|
|
if (dst >= (conv->wbuff + conv->wsize)) { /* sigh */
|
|
--
|
|
2.42.1
|
|
|