⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 luapatch.txt

📁 linux下从网卡远程启动
💻 TXT
📖 第 1 页 / 共 2 页
字号:
diff -ur --exclude='*.a' --exclude='*.o' --exclude='*.map' --unidirectional-new-file /usr/local/src/lua-4.0.1/Makefile lua-4.0.1/Makefile--- /usr/local/src/lua-4.0.1/Makefile	2000-11-01 04:32:01.000000000 +1100+++ lua-4.0.1/Makefile	2003-01-07 22:27:31.000000000 +1100@@ -10,8 +10,9 @@ all clean co klean: 	cd include; $(MAKE) $@ 	cd src; $(MAKE) $@-	cd src/luac; $(MAKE) $@+	# cd src/luac; $(MAKE) $@ 	cd src/lib; $(MAKE) $@+	cd sa; $(MAKE) $@ 	cd src/lua; $(MAKE) $@  # remove debug information from binariesdiff -ur --exclude='*.a' --exclude='*.o' --exclude='*.map' --unidirectional-new-file /usr/local/src/lua-4.0.1/config lua-4.0.1/config--- /usr/local/src/lua-4.0.1/config	2000-11-07 07:28:20.000000000 +1100+++ lua-4.0.1/config	2003-01-13 10:49:43.000000000 +1100@@ -28,8 +28,10 @@ # ------------------------------------------------------------------ C compiler  # You need an ANSI C compiler. gcc is a popular one.-CC= gcc-WARN= -ansi -pedantic -Wall+CC= /usr/i386-linux-uclibc/bin/i386-uclibc-gcc -nostdlib -Os -ffreestanding -fstrength-reduce -mcpu=i386+WARN=-Wall -W -Wno-format -Wno-unused+LUA_RELOC=0x60000+EXTRA_DEFS=-DLUA_RELOC=$(LUA_RELOC) -DDATA_START=0x80000  # On IRIX, cc is a good ANSI compiler. #CC= cc@@ -56,7 +58,8 @@ # in libm.a (-lm).  If your C library already includes the math functions, # or if you are using a modified interpreter that does not need them, # then comment the following line.-EXTRA_LIBS= -lm+#EXTRA_LIBS= -lm+EXTRA_LIBS= /usr/i386-linux-uclibc/lib/libc.a  # ------------------------------------------------------------------ librarian diff -ur --exclude='*.a' --exclude='*.o' --exclude='*.map' --unidirectional-new-file /usr/local/src/lua-4.0.1/include/byteswap.h lua-4.0.1/include/byteswap.h--- /usr/local/src/lua-4.0.1/include/byteswap.h	1970-01-01 10:00:00.000000000 +1000+++ lua-4.0.1/include/byteswap.h	2003-01-07 22:27:31.000000000 +1100@@ -0,0 +1,65 @@+#define	__LITTLE_ENDIAN		/* x86 */++/* Taken from /usr/include/linux/hfs_sysdep.h */+#if defined(__BIG_ENDIAN)+#	if !defined(__constant_htonl)+#		define __constant_htonl(x) (x)+#	endif+#	if !defined(__constant_htons)+#		define __constant_htons(x) (x)+#	endif+#elif defined(__LITTLE_ENDIAN)+#	if !defined(__constant_htonl)+#		define __constant_htonl(x) \+        ((unsigned long int)((((unsigned long int)(x) & 0x000000ffU) << 24) | \+                             (((unsigned long int)(x) & 0x0000ff00U) <<  8) | \+                             (((unsigned long int)(x) & 0x00ff0000U) >>  8) | \+                             (((unsigned long int)(x) & 0xff000000U) >> 24)))+#	endif+#	if !defined(__constant_htons)+#		define __constant_htons(x) \+        ((unsigned short int)((((unsigned short int)(x) & 0x00ff) << 8) | \+                              (((unsigned short int)(x) & 0xff00) >> 8)))+#	endif+#else+#	error "Don't know if bytes are big- or little-endian!"+#endif++#define ntohl(x) \+(__builtin_constant_p(x) ? \+ __constant_htonl((x)) : \+ __swap32(x))+#define htonl(x) \+(__builtin_constant_p(x) ? \+ __constant_htonl((x)) : \+ __swap32(x))+#define ntohs(x) \+(__builtin_constant_p(x) ? \+ __constant_htons((x)) : \+ __swap16(x))+#define htons(x) \+(__builtin_constant_p(x) ? \+ __constant_htons((x)) : \+ __swap16(x))++static inline unsigned long int __swap32(unsigned long int x)+{+	__asm__("xchgb %b0,%h0\n\t"+		"rorl $16,%0\n\t"+		"xchgb %b0,%h0"+		: "=q" (x)+		: "0" (x));+	return x;+}++static inline unsigned short int __swap16(unsigned short int x)+{+	__asm__("xchgb %b0,%h0"+		: "=q" (x)+		: "0" (x));+	return x;+}++/* Make routines available to all */+#define	swap32(x)	__swap32(x)+#define	swap16(x)	__swap16(x)diff -ur --exclude='*.a' --exclude='*.o' --exclude='*.map' --unidirectional-new-file /usr/local/src/lua-4.0.1/include/elf_boot.h lua-4.0.1/include/elf_boot.h--- /usr/local/src/lua-4.0.1/include/elf_boot.h	1970-01-01 10:00:00.000000000 +1000+++ lua-4.0.1/include/elf_boot.h	2003-01-07 22:27:31.000000000 +1100@@ -0,0 +1 @@+#include "../../elf_boot.h"diff -ur --exclude='*.a' --exclude='*.o' --exclude='*.map' --unidirectional-new-file /usr/local/src/lua-4.0.1/include/etherboot.h lua-4.0.1/include/etherboot.h--- /usr/local/src/lua-4.0.1/include/etherboot.h	1970-01-01 10:00:00.000000000 +1000+++ lua-4.0.1/include/etherboot.h	2003-01-07 22:27:31.000000000 +1100@@ -0,0 +1 @@+#include "../../etherboot.h"diff -ur --exclude='*.a' --exclude='*.o' --exclude='*.map' --unidirectional-new-file /usr/local/src/lua-4.0.1/include/lualib.h lua-4.0.1/include/lualib.h--- /usr/local/src/lua-4.0.1/include/lualib.h	2000-10-28 03:15:53.000000000 +1100+++ lua-4.0.1/include/lualib.h	2003-01-13 11:02:01.000000000 +1100@@ -23,6 +23,7 @@ LUALIB_API void lua_strlibopen (lua_State *L); LUALIB_API void lua_mathlibopen (lua_State *L); LUALIB_API void lua_dblibopen (lua_State *L);+LUALIB_API void lua_userlibopen (lua_State *L);   diff -ur --exclude='*.a' --exclude='*.o' --exclude='*.map' --unidirectional-new-file /usr/local/src/lua-4.0.1/include/misc.h lua-4.0.1/include/misc.h--- /usr/local/src/lua-4.0.1/include/misc.h	1970-01-01 10:00:00.000000000 +1000+++ lua-4.0.1/include/misc.h	2003-01-13 01:07:18.000000000 +1100@@ -0,0 +1 @@+#include "../../misc.h"diff -ur --exclude='*.a' --exclude='*.o' --exclude='*.map' --unidirectional-new-file /usr/local/src/lua-4.0.1/include/printf.h lua-4.0.1/include/printf.h--- /usr/local/src/lua-4.0.1/include/printf.h	1970-01-01 10:00:00.000000000 +1000+++ lua-4.0.1/include/printf.h	2003-01-07 22:27:31.000000000 +1100@@ -0,0 +1 @@+#include "../../printf.h"diff -ur --exclude='*.a' --exclude='*.o' --exclude='*.map' --unidirectional-new-file /usr/local/src/lua-4.0.1/include/setjmp.h lua-4.0.1/include/setjmp.h--- /usr/local/src/lua-4.0.1/include/setjmp.h	1970-01-01 10:00:00.000000000 +1000+++ lua-4.0.1/include/setjmp.h	2003-01-07 22:27:31.000000000 +1100@@ -0,0 +1 @@+#include "../../setjmp.h"diff -ur --exclude='*.a' --exclude='*.o' --exclude='*.map' --unidirectional-new-file /usr/local/src/lua-4.0.1/include/signal.h lua-4.0.1/include/signal.h--- /usr/local/src/lua-4.0.1/include/signal.h	1970-01-01 10:00:00.000000000 +1000+++ lua-4.0.1/include/signal.h	2003-01-13 11:02:54.000000000 +1100@@ -0,0 +1,4 @@+#ifndef	_SIGNAL_H+#define	_SIGNAL_H+#define	signal(a,b)+#endifdiff -ur --exclude='*.a' --exclude='*.o' --exclude='*.map' --unidirectional-new-file /usr/local/src/lua-4.0.1/include/startmenu.h lua-4.0.1/include/startmenu.h--- /usr/local/src/lua-4.0.1/include/startmenu.h	1970-01-01 10:00:00.000000000 +1000+++ lua-4.0.1/include/startmenu.h	2003-01-12 20:18:10.000000000 +1100@@ -0,0 +1 @@+#include "../../startmenu.h"diff -ur --exclude='*.a' --exclude='*.o' --exclude='*.map' --unidirectional-new-file /usr/local/src/lua-4.0.1/include/stddef.h lua-4.0.1/include/stddef.h--- /usr/local/src/lua-4.0.1/include/stddef.h	1970-01-01 10:00:00.000000000 +1000+++ lua-4.0.1/include/stddef.h	2003-01-07 22:27:31.000000000 +1100@@ -0,0 +1 @@+#include "../../stddef.h"diff -ur --exclude='*.a' --exclude='*.o' --exclude='*.map' --unidirectional-new-file /usr/local/src/lua-4.0.1/include/stdio.h lua-4.0.1/include/stdio.h--- /usr/local/src/lua-4.0.1/include/stdio.h	1970-01-01 10:00:00.000000000 +1000+++ lua-4.0.1/include/stdio.h	2003-01-07 22:27:31.000000000 +1100@@ -0,0 +1,16 @@+#ifndef	_STDIO_H+#define	_STDIO_H+#include "stddef.h"+#include "printf.h"+#define	BUFSIZ	8192+typedef void FILE;+extern FILE *stdin, *stdout, *stderr;+extern int sprintf(char *str, const char *fmt, ...);+extern int vsprintf(char *buf, const char *fmt, const int *dp);+extern inline int fprintf(FILE *f, const char *fmt, ...) {+        return (vsprintf(0, fmt, ((const int *)&fmt)+1));+}+#define fputs(s,f)	printf("%s",s)+#define	fread(a,b,c,d)	1+#define	feof(f)		0+#endifdiff -ur --exclude='*.a' --exclude='*.o' --exclude='*.map' --unidirectional-new-file /usr/local/src/lua-4.0.1/sa/Makefile lua-4.0.1/sa/Makefile--- /usr/local/src/lua-4.0.1/sa/Makefile	1970-01-01 10:00:00.000000000 +1000+++ lua-4.0.1/sa/Makefile	2003-01-13 01:08:33.000000000 +1100@@ -0,0 +1,40 @@+LUA=		..+include		$(LUA)/config++# Options for auxiliary menu program+# Available: -DANSIESC -DANSIMODE -DCONSOLE_CRT/CONSOLE_SERIAL -DPOWERSAVE -DCOMCONSOLE -DCOMPRESERVE+# ANSIMODE requires ANSIESC, see misc.c for choices+# Might as well take the lot since code size is not a concern+EXTRA_FLAGS=	-DCONSOLE_CRT -DANSIESC -DANSIMODE=-1 -DPOWERSAVE -DCOMCONSOLE=0x3f8 -DCOMPRESERVE++# We steal the malloc .o's from uclibc. They have to be in libsalib.a+# otherwise they bind to the s/brk in uclibc instead of our substitute+UCLIBC=		/usr/i386-linux-uclibc/lib/libc.a+MOBJS=		malloc.o realloc.o heap_alloc.o heap_alloc_at.o free.o heap_free.o++all:	../lib/libsalib.a startmenu.o++../lib/libsalib.a:	printf.o misc.o ansiesc.o brk.o luserlib.o $(UCLIBC)+	ar xv $(UCLIBC) $(MOBJS)+	$(AR) $@ printf.o misc.o ansiesc.o brk.o luserlib.o $(MOBJS)++startmenu.o:	../../startmenu.S+	gcc -E -Ui386 -DRELOC=$(LUA_RELOC) ../../startmenu.S | $(AS) -o startmenu.o++printf.o:		../../printf.c+	$(CC) $(CFLAGS) -c ../../$*.c++misc.o:	../../misc.h ../../misc.c ../../ansiesc.h ../../etherboot.h+	$(CC) $(CFLAGS) $(EXTRA_FLAGS) -c ../../$*.c++ansiesc.o:	../../ansiesc.h ../../ansiesc.c ../../stddef.h ../../string.h ../../etherboot.h+	$(CC) $(CFLAGS) $(EXTRA_FLAGS) -c ../../$*.c++brk.o:	brk.c+	$(CC) $(CFLAGS) -c $*.c++luserlib.o:	luserlib.c+	$(CC) $(CFLAGS) $(EXTRA_FLAGS) -c $*.c++clean:+	rm *.odiff -ur --exclude='*.a' --exclude='*.o' --exclude='*.map' --unidirectional-new-file /usr/local/src/lua-4.0.1/sa/brk.c lua-4.0.1/sa/brk.c--- /usr/local/src/lua-4.0.1/sa/brk.c	1970-01-01 10:00:00.000000000 +1000+++ lua-4.0.1/sa/brk.c	2003-01-07 22:27:31.000000000 +1100@@ -0,0 +1,31 @@+#include	<errno.h>++extern void _end;+static void *curr_heap_top = &_end;++int brk(void *end_data_segment) {+	int	sp;++	/* Give 256 bytes of room between heap and stack */+	if (end_data_segment > (void *)&sp - 0x100) {+		errno = ENOMEM;+		return (-1);+	}+	curr_heap_top = end_data_segment;+	return (0);+}++void *sbrk(unsigned long increment) {+	int	sp;++	if (increment <= 0)+		return (curr_heap_top);+	void *p = curr_heap_top;+	/* Give 256 bytes of room between heap and stack */+	if (p + increment > (void *)&sp - 0x100) {+		errno = ENOMEM;+		return (0);+	}+	curr_heap_top += increment;+	return (p);+}diff -ur --exclude='*.a' --exclude='*.o' --exclude='*.map' --unidirectional-new-file /usr/local/src/lua-4.0.1/sa/luserlib.c lua-4.0.1/sa/luserlib.c--- /usr/local/src/lua-4.0.1/sa/luserlib.c	1970-01-01 10:00:00.000000000 +1000+++ lua-4.0.1/sa/luserlib.c	2003-01-13 10:43:39.000000000 +1100@@ -0,0 +1,80 @@+/*+ *	Interface to available routines in BIOS library.+ *	GPL, Ken Yap 2003+ *	(I know the filename suggests ineptitude, but it's not a+ *	very rich set of routines anyway. :-)+ */++#include "lauxlib.h"+#include "lualib.h"++#include "startmenu.h"+#include "misc.h"++#define	zero_result(x)		x; return 0+#define	single_result(x)	lua_pushnumber(L, x); return 1++static int l_checkkey(lua_State *L) { single_result(console_checkkey()); }++static int l_cls(lua_State *L) { zero_result(console_cls()); }++static int l_getkey(lua_State *L) { single_result(console_getkey()); }++static int l_getshift(lua_State *L) { single_result(console_getshift()); }++static int l_getxy(lua_State *L) { single_result(console_getxy()); }++static int l_gotoxy(lua_State *L) {+	int n = lua_gettop(L);+	if (n < 2) {+		single_result(0);+	}+	zero_result(console_gotoxy(luaL_check_number(L, 1), luaL_check_number(L, 2)));+}++static int l_ischar(lua_State *L) { single_result(console_ischar()); }++static int l_nocursor(lua_State *L) { zero_result(console_nocursor()); }++static int l_setattrib(lua_State *L) {+	int n = lua_gettop(L);+	if (n < 1) {

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -