shithub: riscv

Download patch

ref: 70c7a9eb07516843da083b6231d55a07d28b9350
parent: 2728e065895e7af2493ed7af3b8897caa416adf6
author: qwx <devnull@localhost>
date: Sat May 12 15:19:52 EDT 2018

add signed fixed size integer typedefs

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