tangled
alpha
login
or
join now
pyrox.dev
/
nixpkgs
0
fork
atom
lol
0
fork
atom
overview
issues
pulls
pipelines
tinyfugue: fix build
Sizhe Zhao
9 months ago
0171f786
e1e2f771
+47
-28
3 changed files
expand all
collapse all
unified
split
pkgs
by-name
ti
tinyfugue
001-darwin-fixes.patch
fix-build.patch
package.nix
-27
pkgs/by-name/ti/tinyfugue/001-darwin-fixes.patch
···
1
1
-
diff --git a/src/malloc.h b/src/malloc.h
2
2
-
index cc4d3bf..bbf78cd 100644
3
3
-
--- a/src/malloc.h
4
4
-
+++ b/src/malloc.h
5
5
-
@@ -34,6 +34,10 @@ extern int low_memory_warning;
6
6
-
# define realloc(ptr, size) mrealloc(NULL, ptr, size)
7
7
-
# define free(ptr) mfree(NULL, ptr)
8
8
-
#else
9
9
-
+#ifdef __APPLE__
10
10
-
+ #include <stdlib.h>
11
11
-
+ #include <sys/types.h>
12
12
-
+#endif
13
13
-
# define mmalloc(md, size) malloc(size)
14
14
-
# define mcalloc(md, size) calloc(size)
15
15
-
# define mrealloc(md, ptr, size) realloc(ptr, size)
16
16
-
diff --git a/src/tfio.c b/src/tfio.c
17
17
-
index 2cd2103..8640f2b 100644
18
18
-
--- a/src/tfio.c
19
19
-
+++ b/src/tfio.c
20
20
-
@@ -70,6 +70,7 @@ static void fileputs(const char *str, FILE *fp);
21
21
-
static void filenputs(const char *str, int n, FILE *fp);
22
22
-
static void queueputline(conString *line, TFILE *file);
23
23
-
24
24
-
+extern void main_loop(void);
25
25
-
26
26
-
void init_tfio(void)
27
27
-
{
+46
pkgs/by-name/ti/tinyfugue/fix-build.patch
···
1
1
+
diff -ur a/src/malloc.c b/src/malloc.c
2
2
+
--- a/src/malloc.c
3
3
+
+++ b/src/malloc.c
4
4
+
@@ -12,7 +12,6 @@
5
5
+
#include "signals.h"
6
6
+
#include "malloc.h"
7
7
+
8
8
+
-caddr_t mmalloc_base = NULL;
9
9
+
int low_memory_warning = 0;
10
10
+
static char *reserve = NULL;
11
11
+
12
12
+
diff -ur a/src/malloc.h b/src/malloc.h
13
13
+
--- a/src/malloc.h
14
14
+
+++ b/src/malloc.h
15
15
+
@@ -34,6 +34,8 @@
16
16
+
# define realloc(ptr, size) mrealloc(NULL, ptr, size)
17
17
+
# define free(ptr) mfree(NULL, ptr)
18
18
+
#else
19
19
+
+# include <stdlib.h>
20
20
+
+# include <sys/types.h>
21
21
+
# define mmalloc(md, size) malloc(size)
22
22
+
# define mcalloc(md, size) calloc(size)
23
23
+
# define mrealloc(md, ptr, size) realloc(ptr, size)
24
24
+
diff -ur a/src/socket.c b/src/socket.c
25
25
+
--- a/src/socket.c
26
26
+
+++ b/src/socket.c
27
27
+
@@ -2600,7 +2600,7 @@
28
28
+
socks_with_lines--;
29
29
+
30
30
+
if (line->attrs & (F_TFPROMPT)) {
31
31
+
- incoming_text = line;
32
32
+
+ incoming_text = (String*)line;
33
33
+
handle_prompt(incoming_text, 0, TRUE);
34
34
+
continue;
35
35
+
}
36
36
+
diff -ur a/src/tfio.c b/src/tfio.c
37
37
+
--- a/src/tfio.c
38
38
+
+++ b/src/tfio.c
39
39
+
@@ -70,6 +70,7 @@
40
40
+
static void filenputs(const char *str, int n, FILE *fp);
41
41
+
static void queueputline(conString *line, TFILE *file);
42
42
+
43
43
+
+extern void main_loop(void);
44
44
+
45
45
+
void init_tfio(void)
46
46
+
{
+1
-1
pkgs/by-name/ti/tinyfugue/package.nix
···
30
30
};
31
31
32
32
patches = [
33
33
-
./001-darwin-fixes.patch
33
33
+
./fix-build.patch
34
34
];
35
35
36
36
configureFlags = optional (!sslSupport) "--disable-ssl";