code: 9ferno

Download patch

ref: b1df88a7857cdf816c5183db10d1a24caac5484b
parent: 9ef92d3389d5724a3683842dfeef30068518e79f
author: 9ferno <gophone2015@gmail.com>
date: Sun Aug 8 10:27:26 EDT 2021

synchronize segflush function definition

--- a/OpenBSD/amd64/include/lib9.h
+++ b/OpenBSD/amd64/include/lib9.h
@@ -453,7 +453,7 @@
 extern	int	remove(const char*);
 extern	void	rerrstr(char*, uint);
 extern	vlong	seek(int, vlong, int);
-extern	s32	segflush(void*, u32);
+extern	long	segflush(void*, ulong);
 extern	void	werrstr(char*, ...);
 
 extern char *argv0;
--- a/emu/OpenBSD/os.c
+++ b/emu/OpenBSD/os.c
@@ -316,8 +316,8 @@
 	return 0;
 }
 
-s32
-segflush(void *p, u32 n)
+long
+segflush(void *p, ulong n)
 {
 	return mprotect(p, n, PROT_EXEC|PROT_READ|PROT_WRITE);
 }
--- a/include/interp.h
+++ b/include/interp.h
@@ -507,7 +507,7 @@
 extern	void		rungc(Prog*);
 extern	void		runtime(Module*, Link*, char*, int, void(*)(void*), Type*);
 extern	void		safemem(void*, Type*, void (*)(void*));
-extern	s32		segflush(void *, u32);
+extern	long		segflush(void *, ulong);
 extern	void		isend(void);
 extern	void	setdbreg(uchar*);
 extern	uchar*	setdbloc(uchar*);
--- a/include/kern.h
+++ b/include/kern.h
@@ -567,7 +567,7 @@
 extern	long	segattach(int, char*, void*, ulong);
 extern	int	segbrk(void*, void*);
 extern	int	segdetach(void*);
-extern	s32	segflush(void*, u32);
+extern	long	segflush(void*, ulong);
 extern	int	segfree(void*, ulong);
 extern	int	sleep(long);
 extern	int	stat(char*, uchar*, int);
--- a/os/pc64/fns.h
+++ b/os/pc64/fns.h
@@ -181,7 +181,7 @@
 void	(*screenputs)(char*, int);
 void	setconfenv(void);
 void*	sigsearch(char*, int);
-s32	segflush(void*, u32);
+long	segflush(void*, ulong);
 void	showframe(void*, void*);
 void	syncclock(void);
 uvlong	tscticks(uvlong*);
--- a/os/pc64/mmu.c
+++ b/os/pc64/mmu.c
@@ -148,8 +148,8 @@
 {
 }
 
-s32
-segflush(void*, u32)
+long
+segflush(void*, ulong)
 {
 	return 0;
 }