9front - general discussion about 9front
 help / color / mirror / Atom feed
* signed fixed size u.h typedefs
@ 2018-05-11 18:19 qwx
  2018-05-11 18:29 ` [9front] " Benjamin Purcell
  0 siblings, 1 reply; 2+ messages in thread
From: qwx @ 2018-05-11 18:19 UTC (permalink / raw)
  To: 9front

Hello,

Are there any objections to adding the signed equivalents of u8int, etc. to
/$objtype/include/u.h?

As far as I can tell, the inlined diff is all that would suffice.
There are no compilation errors that I've found with this.

Thanks,

qwx


diff -r abfb40232967 386/include/u.h
--- a/386/include/u.h	Fri May 11 16:16:37 2018 +0200
+++ b/386/include/u.h	Fri May 11 19:08:12 2018 +0200
@@ -20,6 +20,10 @@
 typedef unsigned short	u16int;
 typedef unsigned int	u32int;
 typedef unsigned long long u64int;
+typedef char s8int;
+typedef short s16int;
+typedef long s32int;
+typedef vlong s64int;
 
 /* FCR */
 #define	FPINEX	(1<<5)
diff -r abfb40232967 68000/include/u.h
--- a/68000/include/u.h	Fri May 11 16:16:37 2018 +0200
+++ b/68000/include/u.h	Fri May 11 19:08:12 2018 +0200
@@ -20,6 +20,10 @@
 typedef unsigned short u16int;
 typedef unsigned int	u32int;
 typedef unsigned long long u64int;
+typedef char s8int;
+typedef short s16int;
+typedef long s32int;
+typedef vlong s64int;
 
 /* FCR */
 #define	FPINEX	(3<<8)
diff -r abfb40232967 68020/include/u.h
--- a/68020/include/u.h	Fri May 11 16:16:37 2018 +0200
+++ b/68020/include/u.h	Fri May 11 19:08:12 2018 +0200
@@ -20,7 +20,10 @@
 typedef unsigned short u16int;
 typedef unsigned int	u32int;
 typedef unsigned long long u64int;
-
+typedef char s8int;
+typedef short s16int;
+typedef long s32int;
+typedef vlong s64int;
 
 /* FCR */
 #define	FPINEX	(3<<8)
diff -r abfb40232967 amd64/include/u.h
--- a/amd64/include/u.h	Fri May 11 16:16:37 2018 +0200
+++ b/amd64/include/u.h	Fri May 11 19:08:12 2018 +0200
@@ -20,6 +20,10 @@
 typedef unsigned short	u16int;
 typedef unsigned int	u32int;
 typedef unsigned long long u64int;
+typedef char s8int;
+typedef short s16int;
+typedef long s32int;
+typedef vlong s64int;
 
 /* MXCSR */
 /* fcr */
diff -r abfb40232967 arm/include/u.h
--- a/arm/include/u.h	Fri May 11 16:16:37 2018 +0200
+++ b/arm/include/u.h	Fri May 11 19:08:12 2018 +0200
@@ -21,6 +21,10 @@
 typedef unsigned short u16int;
 typedef unsigned int	u32int;
 typedef unsigned long long u64int;
+typedef char s8int;
+typedef short s16int;
+typedef long s32int;
+typedef vlong s64int;
 
 /* VFP FPSCR (exceptions) */
 #define	FPINEX		(1<<12)
diff -r abfb40232967 mips/include/u.h
--- a/mips/include/u.h	Fri May 11 16:16:37 2018 +0200
+++ b/mips/include/u.h	Fri May 11 19:08:12 2018 +0200
@@ -20,6 +20,10 @@
 typedef unsigned short u16int;
 typedef unsigned int	u32int;
 typedef unsigned long long u64int;
+typedef char s8int;
+typedef short s16int;
+typedef long s32int;
+typedef vlong s64int;
 
 /* FCR */
 #define	FPINEX	(1<<7)
diff -r abfb40232967 power/include/u.h
--- a/power/include/u.h	Fri May 11 16:16:37 2018 +0200
+++ b/power/include/u.h	Fri May 11 19:08:12 2018 +0200
@@ -20,6 +20,10 @@
 typedef unsigned short	u16int;
 typedef unsigned int	u32int;
 typedef unsigned long long u64int;
+typedef char s8int;
+typedef short s16int;
+typedef long s32int;
+typedef vlong s64int;
 
 /* FPSCR */
 #define	FPSFX	(1<<31)	/* exception summary (sticky) */
diff -r abfb40232967 power64/include/u.h
--- a/power64/include/u.h	Fri May 11 16:16:37 2018 +0200
+++ b/power64/include/u.h	Fri May 11 19:08:12 2018 +0200
@@ -20,6 +20,10 @@
 typedef unsigned short u16int;
 typedef unsigned int	u32int;
 typedef unsigned long long u64int;
+typedef char s8int;
+typedef short s16int;
+typedef long s32int;
+typedef vlong s64int;
 
 /* FPSCR */
 #define	FPSFX	(1<<31)	/* exception summary (sticky) */
diff -r abfb40232967 sparc/include/u.h
--- a/sparc/include/u.h	Fri May 11 16:16:37 2018 +0200
+++ b/sparc/include/u.h	Fri May 11 19:08:12 2018 +0200
@@ -20,6 +20,10 @@
 typedef unsigned short u16int;
 typedef unsigned int	u32int;
 typedef unsigned long long u64int;
+typedef char s8int;
+typedef short s16int;
+typedef long s32int;
+typedef vlong s64int;
 
 /* FCR */
 #define	FPINEX	(1<<23)
diff -r abfb40232967 sparc64/include/u.h
--- a/sparc64/include/u.h	Fri May 11 16:16:37 2018 +0200
+++ b/sparc64/include/u.h	Fri May 11 19:08:12 2018 +0200
@@ -20,6 +20,10 @@
 typedef unsigned short u16int;
 typedef unsigned int	u32int;
 typedef unsigned long long u64int;
+typedef char s8int;
+typedef short s16int;
+typedef long s32int;
+typedef vlong s64int;
 
 /* FCR */
 #define	FPINEX	(1<<23)
diff -r abfb40232967 spim/include/u.h
--- a/spim/include/u.h	Fri May 11 16:16:37 2018 +0200
+++ b/spim/include/u.h	Fri May 11 19:08:12 2018 +0200
@@ -20,6 +20,10 @@
 typedef unsigned short u16int;
 typedef unsigned int	u32int;
 typedef unsigned long long u64int;
+typedef char s8int;
+typedef short s16int;
+typedef long s32int;
+typedef vlong s64int;
 
 /* FCR */
 #define	FPINEX	(1<<7)
diff -r abfb40232967 sys/src/9/pc/etherrt2860.c
--- a/sys/src/9/pc/etherrt2860.c	Fri May 11 16:16:37 2018 +0200
+++ b/sys/src/9/pc/etherrt2860.c	Fri May 11 19:08:12 2018 +0200
@@ -17,9 +17,6 @@
 #include "../port/etherif.h"
 #include "../port/wifi.h"
 
-/* for consistency */
-typedef signed char s8int;
-
 enum {
 	/* PCI registers */
 	PciCfg = 0x0000,
diff -r abfb40232967 sys/src/cmd/vmx/dat.h
--- a/sys/src/cmd/vmx/dat.h	Fri May 11 16:16:37 2018 +0200
+++ b/sys/src/cmd/vmx/dat.h	Fri May 11 19:08:12 2018 +0200
@@ -1,7 +1,3 @@
-typedef char s8int;
-typedef short s16int;
-typedef int s32int;
-
 typedef struct PCIDev PCIDev;
 typedef struct PCICap PCICap;
 typedef struct PCIBar PCIBar;
diff -r abfb40232967 sys/src/games/blit/dat.h
--- a/sys/src/games/blit/dat.h	Fri May 11 16:16:37 2018 +0200
+++ b/sys/src/games/blit/dat.h	Fri May 11 19:08:12 2018 +0200
@@ -1,7 +1,3 @@
-typedef signed char s8int;
-typedef signed short s16int;
-typedef signed long s32int;
-
 extern u32int curpc, irq;
 extern int trace, debug;
 


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2018-05-11 18:29 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-05-11 18:19 signed fixed size u.h typedefs qwx
2018-05-11 18:29 ` [9front] " Benjamin Purcell

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).