* Imported the original 3.0-8.1 Debian diff.

git-svn-id: svn://svn.zoy.org/elk/trunk@2 55e467fa-43c5-0310-a8a2-de718669efc6
This commit is contained in:
sam
2003-08-19 19:22:48 +00:00
parent 3132f65611
commit f37781fa62
43 changed files with 1237 additions and 116 deletions
+7 -2
View File
@@ -1,5 +1,6 @@
. ../config/system
. ../config/site
. ../debian/arch-config
case _$aout_format in
_coff) dump=dump-vanilla.c; stab=stab-coff.c;;
@@ -190,8 +191,12 @@ install: scheme standalone.o module.o
echo mkdir $install_dir/lib; \\
mkdir $install_dir/lib; \\
fi
cp standalone.o $install_dir/lib
cp module.o $install_dir/lib
-@if [ ! -d $install_dir/lib/elk ]; then \\
echo mkdir $install_dir/lib/elk; \\
mkdir $install_dir/lib/elk; \\
fi
cp standalone.o $install_dir/lib/elk
cp module.o $install_dir/lib/elk
lint:
lint \$(LINTFLAGS) -I\$(INC) \$(C)
+1 -1
View File
@@ -76,7 +76,7 @@ Check_Stack_Grows_Down () {
* It works independent of the direction into which the stack grows
* (the stack grows upwards on HP-PA based machines and Pyramids).
*/
int Stack_Size () {
unsigned int Stack_Size () {
char foo;
return Stack_Grows_Down ? stkbase-&foo : &foo-stkbase;
-1
View File
@@ -3,7 +3,6 @@
#include <stdio.h>
#include <unistd.h>
#include <fcntl.h>
#include <syms.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <sys/mman.h>
+2 -2
View File
@@ -39,7 +39,7 @@ char *Temp_Name (seq) int seq; {
tmpdir = "/tmp";
tempname = Safe_Malloc (tmplen = strlen (tmpdir) + 20);
sprintf (tempname, "%s/ldXXXXXX", tmpdir);
(void)mktemp (tempname);
(void)mkstemp (tempname);
strcat (tempname, ".");
}
sprintf (strrchr (tempname, '.'), ".%d", seq);
@@ -55,7 +55,7 @@ void Fork_Load () {
Disable_Interrupts;
newtemp = Safe_Malloc (tmplen);
sprintf (newtemp, "%s/ldXXXXXX", tmpdir);
(void)mktemp (newtemp);
(void)mkstemp (newtemp);
strcat (newtemp, ".");
for (i = 0; i < Seq_Num; i++) {
sprintf (strrchr (newtemp, '.'), ".%d", i);
+2 -2
View File
@@ -48,7 +48,7 @@ Load_Object (names) Object names; {
Loader_Output = Safe_Malloc (strlen (tmpdir) + 20);
}
sprintf (Loader_Output, "%s/ldXXXXXX", tmpdir);
(void)mktemp (Loader_Output);
(void)mkstemp (Loader_Output);
port = tail = fullnames = Null;
GC_Link3 (port, tail, fullnames);
@@ -159,7 +159,7 @@ void Fork_Load () {
Disable_Interrupts;
newlink = Safe_Malloc (strlen (tmpdir) + 20);
sprintf (newlink, "%s/ldXXXXXX", tmpdir);
(void)mktemp (newlink);
(void)mkstemp (newlink);
(void)link (Loader_Input, newlink);
free (Loader_Input);
Loader_Input = newlink;
+3 -1
View File
@@ -1,6 +1,7 @@
#include "kernel.h"
#include <errno.h>
#include <limits.h>
#include <sys/types.h>
#include <sys/stat.h>
@@ -21,7 +22,7 @@ extern char *getenv();
char *stkbase;
int Stack_Grows_Down;
int Max_Stack;
unsigned int Max_Stack;
int Interpreter_Initialized;
int GC_Debug = 0;
int Case_Insensitive;
@@ -320,6 +321,7 @@ Get_Stack_Limit () {
perror ("getrlimit");
exit (1);
}
Max_Stack = rl.rlim_cur;
#endif
Max_Stack -= STACK_MARGIN;
+6 -7
View File
@@ -3,6 +3,7 @@
#include "kernel.h"
#include <string.h>
#include <errno.h>
#include <ctype.h>
#include <varargs.h>
@@ -557,7 +558,9 @@ Format (port, fmt, len, argc, argv) Object port; const char *fmt;
char buf[256];
extern sys_nerr;
#ifndef __bsdi__
#ifndef __linux__
extern char *sys_errlist[];
#endif
#endif
GC_Node;
Alloca_Begin;
@@ -573,13 +576,9 @@ Format (port, fmt, len, argc, argv) Object port; const char *fmt;
} else if (c == '%') {
Print_Char (port, '\n');
} else if (c == 'e' || c == 'E') {
if (Saved_Errno > 0 && Saved_Errno < sys_nerr) {
s = sys_errlist[Saved_Errno];
sprintf (buf, "%c%s", isupper (*s) ? tolower (*s) :
*s, s+1);
} else {
sprintf (buf, "error %d", Saved_Errno);
}
s = strerror(Saved_Errno);
sprintf (buf, "%c%s", isupper (*s) ? tolower (*s) :
*s, *s ? "" : s+1);
Print_Object (Make_String (buf, strlen (buf)), port,
c == 'E', 0, 0);
} else {