File: debian.patch

package info (click to toggle)
linux86 1.0.1%2Bgit20250212.0332db1-2
  • links: PTS, VCS
  • area: main
  • in suites: sid
  • size: 5,312 kB
  • sloc: ansic: 68,192; asm: 6,154; makefile: 1,387; sh: 802
file content (187 lines) | stat: -rw-r--r-- 4,581 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
--- a/bcc/bcc.c
+++ b/bcc/bcc.c
@@ -33,6 +33,7 @@
 #ifndef MSDOS
 #include <sys/wait.h>
 #include <signal.h>
+#include <limits.h>
 #endif
 #include "version.h"
 
@@ -588,8 +589,12 @@
 void command_reset()
 {
 #ifndef MAXPATHLEN
+#ifdef PATH_MAX
+#define MAXPATHLEN PATH_MAX
+#else
 #define MAXPATHLEN 1024
 #endif
+#endif
    char buf[MAXPATHLEN];
    char ** prefix;
    char * saved_cmd;
--- a/bcc/const.h
+++ b/bcc/const.h
@@ -78,7 +78,8 @@
 
 /* Unportable alignment needed for specific compilers */
 #ifndef VERY_SMALL_MEMORY
-# define S_ALIGNMENT (sizeof(long)) /* A little safer */
+/* # define S_ALIGNMENT (sizeof(long)) */ /* A little safer */
+# define S_ALIGNMENT (2*sizeof(size_t)) /* Even more safe: do as glibc malloc */
 #endif
 
 /* local style */
--- a/doselks/syscalls.c
+++ b/doselks/syscalls.c
@@ -1,4 +1,4 @@
-
+#include <errno.h>
 #include "doselks.h"
 #include "syscalls.h"
 
--- a/elksemu/elks_sys.c
+++ b/elksemu/elks_sys.c
@@ -147,9 +147,9 @@
 	/* Nasty hack so /lib/liberror.txt doesn't exist on the host.
 	 */
 	if (strcmp(dp, "/lib/liberror.txt") == 0 ) {
-	   int fd = open("/tmp/liberror.txt", O_CREAT|O_EXCL|O_RDWR, 0666);
+	   int fd = open("/var/run/elks-liberror.txt", O_CREAT|O_EXCL|O_RDWR, 0666);
 	   if (fd < 0) return fd;
-	   unlink("/tmp/liberror.txt");
+	   unlink("/var/run/elks-liberror.txt");
 	   write(fd, efile, sizeof(efile));
 	   lseek(fd, 0L, 0);
 	   return fd;
--- a/ld/ld.c
+++ b/ld/ld.c
@@ -2,6 +2,8 @@
 
 /* Copyright (C) 1994 Bruce Evans */
 
+#include <errno.h>
+
 #include "syshead.h"
 #include "const.h"
 #include "byteord.h"
--- a/libc/error/error.c
+++ b/libc/error/error.c
@@ -24,7 +24,8 @@
    }
 
    if( err <= 0 ) goto unknown;	/* NB the <= allows comments in the file */
-   fd = open("/lib/liberror.txt", 0);
+   fd = open("/usr/lib/bcc/liberror.txt", 0);
+   if (fd < 0) fd = open("/lib/liberror.txt", 0);
    if( fd < 0 ) goto unknown;
 
    while( (cc=read(fd, inbuf, sizeof(inbuf))) > 0 )
--- a/libc/error/sys_errlist.c
+++ b/libc/error/sys_errlist.c
@@ -42,7 +42,8 @@
    int i, cc, fd, err, len, bufoff=0;
    char * ptr;
 
-   fd = open("/lib/liberror.txt", 0);
+   fd = open("/usr/lib/bcc/liberror.txt", 0);
+   if (fd < 0) fd = open("/lib/liberror.txt", 0);
    if( fd < 0 ) return;
 
    for(i=0; i<NR_ERRORS; i++) sys_errlist[i] = "Unknown error";
--- a/libc/i386fp/fperr.c
+++ b/libc/i386fp/fperr.c
@@ -3,12 +3,12 @@
 
 #include "fperr.h"
 
-void fperr(errno)
-int errno;
+void fperr(err)
+int err;
 {
 
 #if defined(DEBUG) || 0
-	switch(errno) {
+	switch(err) {
 
 	case EFDENORMAL:
 		fputs("\nDenormal - ", stderr);
@@ -35,7 +35,7 @@
 		break;
 
 	default:
-		fprintf(stderr, "\nUnknown error 0x%x - ", errno);
+		fprintf(stderr, "\nUnknown error 0x%x - ", err);
 	}
 	fflush(stderr);
 #endif
--- a/makefile.in
+++ b/makefile.in
@@ -195,10 +195,6 @@
 elksemu: bindir
 	$(MAKEC) elksemu elksemu
 	cp -p elksemu/elksemu bin/elksemu
-#else
-try_elksemu: bindir
-	$(MAKEC) elksemu CC='ncc' elksemu
-	cp -p elksemu/elksemu bin/elksemu
 #endif
 #endif
 
--- a/man/as86.1
+++ b/man/as86.1
@@ -185,7 +185,7 @@
 	mov ax,[_hello]
 .fi
 Absolute addressing, ax is set to contents of location 1234. Note the
-third option is not strictly consistant but is in place mainly for asld
+third option is not strictly consistent but is in place mainly for asld
 compatibility.
 
 .sp
--- a/man/bcc.1
+++ b/man/bcc.1
@@ -342,7 +342,7 @@
 .P
 .SH DIRECTORIES
 All the include, library and compiler components are stored under the
-.I /usr/bcc
+.I /usr/lib/bcc
 directory under Linux-i386, this is laid out the same as a
 .I /usr
 filesystem and if bcc is to be the primary compiler on a system it should
--- a/man/elksemu.1
+++ b/man/elksemu.1
@@ -4,7 +4,7 @@
 .SH NAME
 elksemu \- Embedded Linux Kernel Subset emulator
 .SH SYNOPSIS
-.B /lib/elksemu
+.B elksemu
 .B program
 .RB [ arguments ]
 .SH DESCRIPTION
--- a/man/ld86.1
+++ b/man/ld86.1
@@ -115,7 +115,7 @@
 Standard C variable for the end of the text segment.
 .TP
 .B __edata
-Standard C variable for the end of the initilised data.
+Standard C variable for the end of the initialized data.
 .TP
 .B __end
 Standard C variable for the end of the bss area.
@@ -136,8 +136,8 @@
 The top of segment 'X's data area.
 .TP
 .B __segXCL
-The bottom of segment 'X's 'common data' or unitilised data area. Each 
-segment has both an initilised and unitilised data area.
+The bottom of segment 'X's 'common data' or uninitialized data area. Each 
+segment has both an initialized and uninitialized data area.
 .TP
 .B __segXCH
 The top of segment 'X's common area.