shithub: 9ferno

Download patch

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

synchronize segflush function definition

--- a/OpenBSD/amd64/include/lib9.h	Sun Aug  8 15:24:07 2021
+++ b/OpenBSD/amd64/include/lib9.h	Sun Aug  8 17:27:26 2021
@@ -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	Sun Aug  8 15:24:07 2021
+++ b/emu/OpenBSD/os.c	Sun Aug  8 17:27:26 2021
@@ -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	Sun Aug  8 15:24:07 2021
+++ b/include/interp.h	Sun Aug  8 17:27:26 2021
@@ -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	Sun Aug  8 15:24:07 2021
+++ b/include/kern.h	Sun Aug  8 17:27:26 2021
@@ -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	Sun Aug  8 15:24:07 2021
+++ b/os/pc64/fns.h	Sun Aug  8 17:27:26 2021
@@ -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	Sun Aug  8 15:24:07 2021
+++ b/os/pc64/mmu.c	Sun Aug  8 17:27:26 2021
@@ -148,8 +148,8 @@
 {
 }
 
-s32
-segflush(void*, u32)
+long
+segflush(void*, ulong)
 {
 	return 0;
 }