mirror of
https://gitlab.com/qemu-project/openbios.git
synced 2024-02-13 08:34:06 +08:00
Use standard types
Replace uchar, uint, ulong, u_char, u_int, u_long, u_int* with their standard equivalents. Fixes warnings like these on OpenBSD: CC target/arch/unix/unix.o In file included from ../arch/unix/unix.c:29: ../include/config.h:26: warning: redefinition of `ulong' /usr/include/sys/types.h:56: warning: `ulong' previously declared here ../include/config.h:26: warning: redundant redeclaration of `ulong' in same scope Signed-off-by: Blue Swirl <blauwirbel@gmail.com> git-svn-id: svn://coreboot.org/openbios/trunk/openbios-devel@830 f158a5a8-5612-0410-a976-696ce0be7e32
This commit is contained in:
@@ -389,15 +389,15 @@
|
||||
|
||||
/* opcode macros */
|
||||
|
||||
#define OPCODE_PRIM(n) ( ((ulong)(n)) >> 26 )
|
||||
#define OPCODE_EXT(n) ( (((ulong)(n)) >> 1) & 0x3ff )
|
||||
#define OPCODE_PRIM(n) ( ((unsigned long)(n)) >> 26 )
|
||||
#define OPCODE_EXT(n) ( (((unsigned long)(n)) >> 1) & 0x3ff )
|
||||
#define OPCODE(op,op_ext) ( ((op)<<10) + op_ext )
|
||||
|
||||
#define B1(n) ( (((ulong)(n)) >> 21) & 0x1f )
|
||||
#define B2(n) ( (((ulong)(n)) >> 16) & 0x1f )
|
||||
#define B3(n) ( (((ulong)(n)) >> 11) & 0x1f )
|
||||
#define B1(n) ( (((unsigned long)(n)) >> 21) & 0x1f )
|
||||
#define B2(n) ( (((unsigned long)(n)) >> 16) & 0x1f )
|
||||
#define B3(n) ( (((unsigned long)(n)) >> 11) & 0x1f )
|
||||
|
||||
#define BD(n) ((ulong)((n) & 0x7fff) + (((n) & 0x8000) ? (ulong)0xffff8000 : 0))
|
||||
#define BD(n) ((unsigned long)((n) & 0x7fff) + (((n) & 0x8000) ? (unsigned long)0xffff8000 : 0))
|
||||
|
||||
#define SPRNUM_FLIP( v ) ( (((v)>>5) & 0x1f) | (((v)<<5) & 0x3e0) )
|
||||
|
||||
|
||||
@@ -23,14 +23,6 @@
|
||||
|
||||
#define PROGRAM_NAME "OpenBIOS"
|
||||
|
||||
typedef unsigned long ulong;
|
||||
typedef unsigned int uint;
|
||||
typedef unsigned short ushort;
|
||||
typedef unsigned char uchar;
|
||||
|
||||
typedef unsigned long long ullong;
|
||||
typedef long long llong;
|
||||
|
||||
#ifndef BOOTSTRAP
|
||||
|
||||
#ifndef NULL
|
||||
@@ -44,7 +36,7 @@ typedef signed int off_t;
|
||||
|
||||
typedef unsigned int time_t;
|
||||
|
||||
#define UINT_MAX ((uint)-1)
|
||||
#define UINT_MAX ((unsigned int)-1)
|
||||
|
||||
#define ENOMEM 1
|
||||
#define EIO 2
|
||||
|
||||
@@ -53,42 +53,42 @@ const char *fs_get_name( fs_ops_t *fs );
|
||||
|
||||
#ifdef CONFIG_HFSP
|
||||
extern int fs_hfsp_open( int fd, fs_ops_t *fs );
|
||||
extern int fs_hfsp_probe( int fd, llong offs );
|
||||
extern int fs_hfsp_probe( int fd, long long offs );
|
||||
#else
|
||||
static inline int fs_hfsp_open( int fd, fs_ops_t *fs ) { return -1; }
|
||||
static inline int fs_hfsp_probe( int fd, llong offs ) { return -1; }
|
||||
static inline int fs_hfsp_probe( int fd, long long offs ) { return -1; }
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_HFS
|
||||
extern int fs_hfs_open( int fd, fs_ops_t *fs );
|
||||
extern int fs_hfs_probe( int fd, llong offs );
|
||||
extern int fs_hfs_probe( int fd, long long offs );
|
||||
#else
|
||||
static inline int fs_hfs_open( int fd, fs_ops_t *fs ) { return -1; }
|
||||
static inline int fs_hfs_probe( int fd, llong offs ) { return -1; }
|
||||
static inline int fs_hfs_probe( int fd, long long offs ) { return -1; }
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_ISO9660
|
||||
extern int fs_iso9660_open( int fd, fs_ops_t *fs );
|
||||
extern int fs_iso9660_probe( int fd, llong offs );
|
||||
extern int fs_iso9660_probe( int fd, long long offs );
|
||||
#else
|
||||
static inline int fs_iso9660_open( int fd, fs_ops_t *fs ) { return -1; }
|
||||
static inline int fs_iso9660_probe( int fd, llong offs ) { return -1; }
|
||||
static inline int fs_iso9660_probe( int fd, long long offs ) { return -1; }
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_EXT2
|
||||
extern int fs_ext2_open( int fd, fs_ops_t *fs );
|
||||
extern int fs_ext2_probe( int fd, llong offs );
|
||||
extern int fs_ext2_probe( int fd, long long offs );
|
||||
#else
|
||||
static inline int fs_ext2_open( int fd, fs_ops_t *fs ) { return -1; }
|
||||
static inline int fs_ext2_probe( int fd, llong offs ) { return -1; }
|
||||
static inline int fs_ext2_probe( int fd, long long offs ) { return -1; }
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_GRUBFS
|
||||
extern int fs_grubfs_open( int fd, fs_ops_t *fs );
|
||||
extern int fs_grubfs_probe( int fd, llong offs );
|
||||
extern int fs_grubfs_probe( int fd, long long offs );
|
||||
#else
|
||||
static inline int fs_grubfs_open( int fd, fs_ops_t *fs ) { return -1; }
|
||||
static inline int fs_grubfs_probe( int fd, llong offs ) { return -1; }
|
||||
static inline int fs_grubfs_probe( int fd, long long offs ) { return -1; }
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
@@ -21,8 +21,8 @@ extern int open_ih( ihandle_t ih );
|
||||
extern int open_io( const char *spec );
|
||||
extern int close_io( int fd );
|
||||
extern int read_io( int fd, void *buf, size_t cnt );
|
||||
extern int seek_io( int fd, llong offs );
|
||||
extern llong tell( int fd );
|
||||
extern int seek_io( int fd, long long offs );
|
||||
extern long long tell( int fd );
|
||||
extern int reopen( int fd, const char *filename );
|
||||
extern int reopen_nwrom( int fd );
|
||||
extern ihandle_t get_ih_from_fd( int fd );
|
||||
|
||||
@@ -108,8 +108,8 @@ extern ucell ofmem_translate( ucell virt, ucell *ret_mode );
|
||||
#ifdef CONFIG_PPC
|
||||
#define PAGE_SHIFT 12
|
||||
|
||||
ulong get_ram_top( void );
|
||||
ulong get_ram_bottom( void );
|
||||
unsigned long get_ram_top( void );
|
||||
unsigned long get_ram_bottom( void );
|
||||
|
||||
#elif defined(CONFIG_SPARC32)
|
||||
#define PAGE_SHIFT 12
|
||||
|
||||
Reference in New Issue
Block a user