From: Thayne Harbaugh <thayne@c2.net>
To: l_indien@magic.fr
Cc: qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] [PATCH] target_posix_types.h
Date: Wed, 14 Nov 2007 11:20:43 -0700 [thread overview]
Message-ID: <1195064444.918.45.camel@phantasm.home.enterpriseandprosperity.com> (raw)
In-Reply-To: <1195057546.21958.56.camel@jma4.dev.netgem.com>
[-- Attachment #1: Type: text/plain, Size: 801 bytes --]
On Wed, 2007-11-14 at 17:25 +0100, Jocelyn Mayer wrote:
> On Wed, 2007-11-14 at 08:59 -0700, Thayne Harbaugh wrote:
> > This patch, 44_target_posix_types.patch provides target specific posix
> > types. These types improve target structure creation, code similarity
> > to kernel code and improve type casting for assignment between target
> > and host.
>
> Hi,
>
> This seems not OK for ppc/ppc64. There is no ppc64 subdirectory anymore
> in the linux-user directory. ppc and ppc64 targets have been merged, as
> it is in recent kernels, so all the definitions should go in the ppc
> subdirectory, using #ifdef TARGET_PPC64 when there are differences; but
> there should be very few: there are only 2 ifdef __powerpc64__ in the
> linux-2.6.23/include/asm-powerpc/posix_types.h file.
How is this?
[-- Attachment #2: 44_target_posix_types.patch --]
[-- Type: text/x-patch, Size: 24364 bytes --]
Index: qemu/linux-user/alpha/target_posix_types.h
===================================================================
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
+++ qemu/linux-user/alpha/target_posix_types.h 2007-11-13 15:36:14.000000000 -0700
@@ -0,0 +1,55 @@
+/*
+ * Borrowed with minor changes from:
+ * linux/include/asm-alpha/posix_types.h
+ */
+
+#ifndef TARGET_POSIX_TYPES_H
+#define TARGET_POSIX_TYPES_H
+
+typedef int8_t target_char;
+typedef int16_t target_short;
+typedef int32_t target_int;
+/* target_long defined in qemu/cpu-defs.h */
+typedef int64_t target_long_long;
+
+typedef uint8_t target_uchar;
+typedef uint16_t target_ushort;
+typedef uint32_t target_uint;
+/* target_ulong defined in qemu/cpu-defs.h */
+typedef uint64_t target_ulong_long;
+
+typedef target_uint target_ino_t;
+typedef target_uint target_mode_t;
+typedef target_uint target_nlink_t;
+typedef abi_long target_off_t;
+typedef target_long_long target_loff_t;
+typedef target_int target_pid_t;
+typedef target_int target_ipc_pid_t;
+typedef target_uint target_uid_t;
+typedef target_uint target_gid_t;
+typedef abi_ulong target_size_t;
+typedef abi_long target_ssize_t;
+typedef abi_long target_ptrdiff_t;
+typedef abi_long target_time_t;
+typedef abi_long target_suseconds_t;
+typedef abi_long target_clock_t;
+typedef target_int target_daddr_t;
+typedef target_char * target_caddr_t;
+/* typedef unsigned long target_sigset_t; (conflicts in syscall_defs.h) */
+typedef target_ushort target_uid16_t;
+typedef target_ushort target_gid16_t;
+typedef target_int target_clockid_t;
+typedef target_int target_timer_t;
+
+typedef struct {
+ target_int val[2];
+} target_fsid_t;
+
+typedef target_uid_t target_old_uid_t;
+typedef target_gid_t target_old_gid_t;
+typedef target_uid_t target_uid32_t;
+typedef target_gid_t target_gid32_t;
+
+typedef target_uint target_old_dev_t;
+
+#endif /* TARGET_POSIX_TYPES_H */
Index: qemu/linux-user/arm/target_posix_types.h
===================================================================
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
+++ qemu/linux-user/arm/target_posix_types.h 2007-11-13 15:36:14.000000000 -0700
@@ -0,0 +1,62 @@
+/*
+ * Borrowed with minor changes from:
+ * linux/include/asm-arm/posix_types.h
+ *
+ * Copyright (C) 1996-1998 Russell King.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2 as
+ * published by the Free Software Foundation.
+ *
+ * Changelog:
+ * 27-06-1996 RMK Created
+ */
+#ifndef TARGET_POSIX_TYPES_H
+#define TARGET_POSIX_TYPES_H
+
+typedef int8_t target_char;
+typedef int16_t target_short;
+typedef int32_t target_int;
+/* target_long defined in qemu/cpu-defs.h */
+typedef int64_t target_long_long;
+
+typedef uint8_t target_uchar;
+typedef uint16_t target_ushort;
+typedef uint32_t target_uint;
+/* target_ulong defined in qemu/cpu-defs.h */
+typedef uint64_t target_ulong_long;
+
+typedef abi_ulong target_ino_t;
+typedef target_ushort target_mode_t;
+typedef target_ushort target_nlink_t;
+typedef abi_long target_off_t;
+typedef target_int target_pid_t;
+typedef target_ushort target_ipc_pid_t;
+typedef target_ushort target_uid_t;
+typedef target_ushort target_gid_t;
+typedef target_uint target_size_t;
+typedef target_int target_ssize_t;
+typedef target_int target_ptrdiff_t;
+typedef abi_long target_time_t;
+typedef abi_long target_suseconds_t;
+typedef abi_long target_clock_t;
+typedef target_int target_timer_t;
+typedef target_int target_clockid_t;
+typedef target_int target_daddr_t;
+typedef target_char * target_caddr_t;
+typedef target_ushort id16_t;
+typedef target_ushort target_gid16_t;
+typedef target_uint target_uid32_t;
+typedef target_uint target_gid32_t;
+
+typedef target_ushort target_old_uid_t;
+typedef target_ushort target_old_gid_t;
+typedef target_ushort target_old_dev_t;
+
+typedef target_long_long target_loff_t;
+
+typedef struct {
+ target_int val[2];
+} target_fsid_t;
+
+#endif /* TARGET_POSIX_TYPES */
Index: qemu/linux-user/i386/target_posix_types.h
===================================================================
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
+++ qemu/linux-user/i386/target_posix_types.h 2007-11-13 15:36:14.000000000 -0700
@@ -0,0 +1,55 @@
+/*
+ * Borrowed with minor changes from:
+ * linux/include/asm-i386/posix_types.h
+ */
+
+#ifndef TARGET_POSIX_TYPES_H
+#define TARGET_POSIX_TYPES_H
+
+typedef int8_t target_char;
+typedef int16_t target_short;
+typedef int32_t target_int;
+/* target_long defined in qemu/cpu-defs.h */
+typedef int64_t target_long_long;
+
+typedef uint8_t target_uchar;
+typedef uint16_t target_ushort;
+typedef uint32_t target_uint;
+/* target_ulong defined in qemu/cpu-defs.h */
+typedef uint64_t target_ulong_long;
+
+typedef abi_ulong target_ino_t;
+typedef target_ushort target_mode_t;
+typedef target_ushort target_nlink_t;
+typedef abi_long target_off_t;
+typedef target_int target_pid_t;
+typedef target_ushort target_ipc_pid_t;
+typedef target_ushort target_uid_t;
+typedef target_ushort target_gid_t;
+typedef target_uint target_size_t;
+typedef target_int target_ssize_t;
+typedef target_int target_ptrdiff_t;
+typedef abi_long target_time_t;
+typedef abi_long target_suseconds_t;
+typedef abi_long target_clock_t;
+typedef target_int target_timer_t;
+typedef target_int target_clockid_t;
+typedef target_int target_daddr_t;
+typedef target_char * target_caddr_t;
+typedef target_ushort target_uid16_t;
+typedef target_ushort target_gid16_t;
+typedef target_uint target_uid32_t;
+typedef target_uint target_gid32_t;
+
+typedef target_ushort target_old_uid_t;
+typedef target_ushort target_old_gid_t;
+typedef target_ushort target_old_dev_t;
+
+typedef target_long_long target_loff_t;
+
+typedef struct {
+ target_int val[2];
+} target_fsid_t;
+
+
+#endif /* TARGET_POSIX_TYPES_H */
Index: qemu/linux-user/m68k/target_posix_types.h
===================================================================
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
+++ qemu/linux-user/m68k/target_posix_types.h 2007-11-13 15:36:14.000000000 -0700
@@ -0,0 +1,54 @@
+/*
+ * Borrowed with minor changes from:
+ * linux/include/asm-m68k/posix_types.h
+ */
+
+#ifndef TARGET_POSIX_TYPES_H
+#define TARGET_POSIX_TYPES_H
+
+typedef int8_t target_char;
+typedef int16_t target_short;
+typedef int32_t target_int;
+/* target_long defined in qemu/cpu-defs.h */
+typedef int64_t target_long_long;
+
+typedef uint8_t target_uchar;
+typedef uint16_t target_ushort;
+typedef uint32_t target_uint;
+/* target_ulong defined in qemu/cpu-defs.h */
+typedef uint64_t target_ulong_long;
+
+typedef abi_ulong target_ino_t;
+typedef target_ushort target_mode_t;
+typedef target_ushort target_nlink_t;
+typedef abi_long target_off_t;
+typedef target_int target_pid_t;
+typedef target_ushort target_ipc_pid_t;
+typedef target_ushort target_uid_t;
+typedef target_ushort target_gid_t;
+typedef target_uint target_size_t;
+typedef target_int target_ssize_t;
+typedef target_int target_ptrdiff_t;
+typedef abi_long target_time_t;
+typedef abi_long target_suseconds_t;
+typedef abi_long target_clock_t;
+typedef target_int target_timer_t;
+typedef target_int target_clockid_t;
+typedef target_int target_daddr_t;
+typedef target_char * target_caddr_t;
+typedef target_ushort target_uid16_t;
+typedef target_ushort target_gid16_t;
+typedef target_uint target_uid32_t;
+typedef target_uint target_gid32_t;
+
+typedef target_ushort target_old_uid_t;
+typedef target_ushort target_old_gid_t;
+typedef target_ushort target_old_dev_t;
+
+typedef target_long_long target_loff_t;
+
+typedef struct {
+ target_int val[2];
+} target_fsid_t;
+
+#endif /* TARGET_POSIX_TYPES_H */
Index: qemu/linux-user/mips/target_posix_types.h
===================================================================
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
+++ qemu/linux-user/mips/target_posix_types.h 2007-11-13 15:36:14.000000000 -0700
@@ -0,0 +1,79 @@
+/*
+ * Borrowed with minor changes from:
+ * linux/include/asm-mips/posix_types.h
+ */
+
+/*
+ * This file is subject to the terms and conditions of the GNU General Public
+ * License. See the file "COPYING" in the main directory of this archive
+ * for more details.
+ *
+ * Copyright (C) 1996, 97, 98, 99, 2000 by Ralf Baechle
+ * Copyright (C) 1999, 2000 Silicon Graphics, Inc.
+ */
+#ifndef TARGET_POSIX_TYPES_H
+#define TARGET_POSIX_TYPES_H
+
+typedef int8_t target_char;
+typedef int16_t target_short;
+typedef int32_t target_int;
+/* target_long defined in qemu/cpu-defs.h */
+typedef int64_t target_long_long;
+
+typedef uint8_t target_uchar;
+typedef uint16_t target_ushort;
+typedef uint32_t target_uint;
+/* target_ulong defined in qemu/cpu-defs.h */
+typedef uint64_t target_ulong_long;
+
+typedef abi_ulong target_ino_t;
+typedef target_uint target_mode_t;
+#ifdef TARGET_MIPS
+typedef abi_ulong target_nlink_t;
+#endif
+#ifdef TARGET_MIPS64
+typedef target_uint target_nlink_t;
+#endif
+typedef abi_long target_off_t;
+typedef target_int target_pid_t;
+typedef target_int target_ipc_pid_t;
+typedef target_uint target_uid_t;
+typedef target_uint target_gid_t;
+#ifdef TARGET_MIPS
+typedef target_uint target_size_t;
+typedef target_int target_ssize_t;
+typedef target_int target_ptrdiff_t;
+#endif
+#ifdef TARGET_MIPS64
+typedef abi_ulong target_size_t;
+typedef abi_long target_ssize_t;
+typedef abi_long target_ptrdiff_t;
+#endif
+typedef abi_long target_time_t;
+typedef abi_long target_suseconds_t;
+typedef abi_long target_clock_t;
+typedef target_int target_timer_t;
+typedef target_int target_clockid_t;
+typedef abi_long target_daddr_t;
+typedef target_char * target_caddr_t;
+
+typedef target_ushort target_uid16_t;
+typedef target_ushort target_gid16_t;
+typedef target_uint target_uid32_t;
+typedef target_uint target_gid32_t;
+typedef target_uid_t target_old_uid_t;
+typedef target_gid_t target_old_gid_t;
+typedef target_uint target_old_dev_t;
+
+typedef target_long_long target_loff_t;
+
+typedef struct {
+#ifdef TARGET_MIPS
+ abi_long val[2];
+#endif
+#ifdef TARGET_MIPS64
+ target_int val[2];
+#endif
+} target_fsid_t;
+
+#endif /* TARGET_POSIX_TYPES_H */
Index: qemu/linux-user/ppc/target_posix_types.h
===================================================================
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
+++ qemu/linux-user/ppc/target_posix_types.h 2007-11-13 15:36:14.000000000 -0700
@@ -0,0 +1,65 @@
+/*
+ * Borrowed with minor changes from:
+ * linux/include/asm-powerpc/posix_types.h
+ */
+
+#ifndef TARGET_POSIX_TYPES_H
+#define TARGET_POSIX_TYPES_H
+
+/* ppc usually has unsigned chars */
+typedef int8_t target_schar;
+
+typedef uint8_t target_char;
+typedef int16_t target_short;
+typedef int32_t target_int;
+/* target_long defined in qemu/cpu-defs.h */
+typedef int64_t target_long_long;
+
+typedef uint8_t target_uchar;
+typedef uint16_t target_ushort;
+typedef uint32_t target_uint;
+/* target_ulong defined in qemu/cpu-defs.h */
+typedef uint64_t target_ulong_long;
+
+typedef abi_ulong target_ino_t;
+typedef target_uint target_mode_t;
+typedef abi_long target_off_t;
+typedef target_int target_pid_t;
+typedef target_uint target_uid_t;
+typedef target_uint target_gid_t;
+typedef abi_long target_ptrdiff_t;
+typedef abi_long target_time_t;
+typedef abi_long target_clock_t;
+typedef target_int target_timer_t;
+typedef target_int target_clockid_t;
+typedef abi_long target_suseconds_t;
+typedef target_int target_daddr_t;
+typedef target_char * target_caddr_t;
+typedef target_ushort target_uid16_t;
+typedef target_ushort target_gid16_t;
+typedef target_uint target_uid32_t;
+typedef target_uint target_gid32_t;
+typedef target_uint target_old_uid_t;
+typedef target_uint target_old_gid_t;
+
+#if defined(TARGET_PPC64)
+typedef abi_ulong target_nlink_t;
+typedef target_int target_ipc_pid_t;
+typedef abi_ulong target_size_t;
+typedef target_long target_ssize_t;
+typedef abi_ulong target_old_dev_t;
+#else /* !defined(TARGET_PPC64) */
+typedef target_ushort target_nlink_t;
+typedef target_short target_ipc_pid_t;
+typedef target_uint target_size_t;
+typedef target_int target_ssize_t;
+typedef target_uint target_old_dev_t;
+#endif /* !defined(TARGET_PPC64) */
+
+typedef target_long_long target_loff_t;
+
+typedef struct {
+ target_int val[2];
+} target_fsid_t;
+
+#endif /* TARGET_POSIX_TYPES_H */
Index: qemu/linux-user/sh4/target_posix_types.h
===================================================================
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
+++ qemu/linux-user/sh4/target_posix_types.h 2007-11-13 15:36:14.000000000 -0700
@@ -0,0 +1,56 @@
+/*
+ * Borrowed with minor changes from:
+ * linux/include/asm-sh/posix_types.h
+ */
+
+#ifndef TARGET_POSIX_TYPES_H
+#define TARGET_POSIX_TYPES_H
+
+typedef int8_t target_char;
+typedef int16_t target_short;
+typedef int32_t target_int;
+/* target_long defined in qemu/cpu-defs.h */
+typedef int64_t target_long_long;
+
+typedef uint8_t target_uchar;
+typedef uint16_t target_ushort;
+typedef uint32_t target_uint;
+/* target_ulong defined in qemu/cpu-defs.h */
+typedef uint64_t target_ulong_long;
+
+typedef abi_ulong target_ino_t;
+typedef target_ushort target_mode_t;
+typedef target_ushort target_nlink_t;
+typedef abi_long target_off_t;
+typedef target_int target_pid_t;
+typedef target_ushort target_ipc_pid_t;
+typedef target_ushort target_uid_t;
+typedef target_ushort target_gid_t;
+typedef target_uint target_size_t;
+typedef target_int target_ssize_t;
+typedef target_int target_ptrdiff_t;
+typedef abi_long target_time_t;
+typedef abi_long target_suseconds_t;
+typedef abi_long target_clock_t;
+typedef target_int target_timer_t;
+typedef target_int target_clockid_t;
+typedef target_int target_daddr_t;
+typedef target_char * target_caddr_t;
+typedef target_ushort target_uid16_t;
+typedef target_ushort target_gid16_t;
+typedef target_uint target_uid32_t;
+typedef target_uint target_gid32_t;
+
+typedef target_ushort target_old_uid_t;
+typedef target_ushort target_old_gid_t;
+typedef target_ushort target_old_dev_t;
+
+#ifdef __GNUC__
+typedef target_long_long target_loff_t;
+#endif
+
+typedef struct {
+ target_int val[2];
+} target_fsid_t;
+
+#endif /* TARGET_POSIX_TYPES_H */
Index: qemu/linux-user/sparc/target_posix_types.h
===================================================================
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
+++ qemu/linux-user/sparc/target_posix_types.h 2007-11-13 15:36:14.000000000 -0700
@@ -0,0 +1,56 @@
+/*
+ * Borrowed with minor changes from:
+ * linux/include/asm-sparc/posix_types.h
+ */
+
+#ifndef TARGET_POSIX_TYPES_H
+#define TARGET_POSIX_TYPES_H
+
+typedef int8_t target_char;
+typedef int16_t target_short;
+typedef int32_t target_int;
+/* target_long defined in qemu/cpu-defs.h */
+typedef int32_t target_long_int;
+typedef int64_t target_long_long;
+
+typedef uint8_t target_uchar;
+typedef uint16_t target_ushort;
+typedef uint32_t target_uint;
+/* target_ulong defined in qemu/cpu-defs.h */
+typedef int32_t target_ulong_int;
+typedef uint64_t target_ulong_long;
+
+typedef target_uint target_size_t;
+typedef target_int target_ssize_t;
+typedef target_long_int target_ptrdiff_t;
+typedef abi_long target_time_t;
+typedef abi_long target_suseconds_t;
+typedef abi_long target_clock_t;
+typedef target_int target_pid_t;
+typedef target_ushort target_ipc_pid_t;
+typedef target_ushort target_uid_t;
+typedef target_ushort target_gid_t;
+typedef abi_ulong target_ino_t;
+typedef target_ushort target_mode_t;
+typedef target_ushort target_umode_t;
+typedef target_short target_nlink_t;
+typedef abi_long target_daddr_t;
+typedef abi_long target_off_t;
+typedef target_char * target_caddr_t;
+typedef target_ushort target_uid16_t;
+typedef target_ushort target_gid16_t;
+typedef target_uint target_uid32_t;
+typedef target_uint target_gid32_t;
+typedef target_ushort target_old_uid_t;
+typedef target_ushort target_old_gid_t;
+typedef target_ushort target_old_dev_t;
+typedef target_int target_clockid_t;
+typedef target_int target_timer_t;
+
+typedef target_long_long target_loff_t;
+
+typedef struct {
+ target_int val[2];
+} target_fsid_t;
+
+#endif /* TARGET_POSIX_TYPES_H */
Index: qemu/linux-user/sparc64/target_posix_types.h
===================================================================
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
+++ qemu/linux-user/sparc64/target_posix_types.h 2007-11-13 15:36:14.000000000 -0700
@@ -0,0 +1,58 @@
+/*
+ * Borrowed with minor changes from:
+ * linux/include/asm-sparc64/posix_types.h
+ */
+
+#ifndef TARGET_POSIX_TYPES_H
+#define TARGET_POSIX_TYPES_H
+
+typedef int8_t target_char;
+typedef int16_t target_short;
+typedef int32_t target_int;
+/* target_long defined in qemu/cpu-defs.h */
+typedef int64_t target_long_long;
+
+typedef uint8_t target_uchar;
+typedef uint16_t target_ushort;
+typedef uint32_t target_uint;
+/* target_ulong defined in qemu/cpu-defs.h */
+typedef uint64_t target_ulong_long;
+
+typedef abi_ulong target_size_t;
+typedef abi_long target_ssize_t;
+typedef abi_long target_ptrdiff_t;
+typedef abi_long target_time_t;
+typedef abi_long target_clock_t;
+typedef target_int target_pid_t;
+typedef target_int target_ipc_pid_t;
+typedef target_uint target_uid_t;
+typedef target_uint target_gid_t;
+typedef abi_ulong target_ino_t;
+typedef target_uint target_mode_t;
+typedef target_ushort target_umode_t;
+typedef target_uint target_nlink_t;
+typedef target_int target_daddr_t;
+typedef abi_long target_off_t;
+typedef target_char * target_caddr_t;
+typedef target_ushort target_uid16_t;
+typedef target_ushort target_gid16_t;
+typedef target_int target_clockid_t;
+typedef target_int target_timer_t;
+
+typedef target_ushort target_old_uid_t;
+typedef target_ushort target_old_gid_t;
+typedef target_uid_t target_uid32_t;
+typedef target_gid_t target_gid32_t;
+
+typedef target_uint target_old_dev_t;
+
+/* Note this piece of asymmetry from the v9 ABI. */
+typedef target_int target_suseconds_t;
+
+typedef target_long_long target_loff_t;
+
+typedef struct {
+ target_int val[2];
+} target_fsid_t;
+
+#endif /* TARGET_POSIX_TYPES_H */
Index: qemu/linux-user/x86_64/target_posix_types.h
===================================================================
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
+++ qemu/linux-user/x86_64/target_posix_types.h 2007-11-13 15:36:14.000000000 -0700
@@ -0,0 +1,57 @@
+/*
+ * Borrowed with minor changes from:
+ * linux/include/asm-x86_64/posix_types.h
+ */
+
+#ifndef TARGET_POSIX_TYPES_H
+#define TARGET_POSIX_TYPES_H
+
+#include <stdint.h>
+
+typedef int8_t target_char;
+typedef int16_t target_short;
+typedef int32_t target_int;
+/* target_long defined in qemu/cpu-defs.h */
+typedef int64_t target_long_long;
+
+typedef uint8_t target_uchar;
+typedef uint16_t target_ushort;
+typedef uint32_t target_uint;
+/* target_ulong defined in qemu/cpu-defs.h */
+typedef uint64_t target_ulong_long;
+
+typedef abi_ulong target_ino_t;
+typedef target_uint target_mode_t;
+typedef abi_ulong target_nlink_t;
+typedef abi_long target_off_t;
+typedef target_int target_pid_t;
+typedef target_int target_ipc_pid_t;
+typedef target_uint target_uid_t;
+typedef target_uint target_gid_t;
+typedef abi_ulong target_size_t;
+typedef abi_long target_ssize_t;
+typedef abi_long target_ptrdiff_t;
+typedef abi_long target_time_t;
+typedef abi_long target_suseconds_t;
+typedef abi_long target_clock_t;
+typedef target_int target_timer_t;
+typedef target_int target_clockid_t;
+typedef target_int target_daddr_t;
+typedef target_char * target_caddr_t;
+typedef target_ushort target_uid16_t;
+typedef target_ushort target_gid16_t;
+
+typedef target_long_long target_loff_t;
+
+typedef struct {
+ target_int val[2];
+} target_fsid_t;
+
+typedef target_ushort target_old_uid_t;
+typedef target_ushort target_old_gid_t;
+typedef target_uid_t target_uid32_t;
+typedef target_gid_t target_gid32_t;
+
+typedef abi_ulong target_old_dev_t;
+
+#endif /* TARGET_POSIX_TYPES_H */
Index: qemu/linux-user/syscall_defs.h
===================================================================
--- qemu.orig/linux-user/syscall_defs.h 2007-11-13 15:33:11.000000000 -0700
+++ qemu/linux-user/syscall_defs.h 2007-11-13 15:37:47.000000000 -0700
@@ -5,6 +5,7 @@
necessary */
#include "syscall_nr.h"
+#include "target_posix_types.h"
#define SOCKOP_socket 1
#define SOCKOP_bind 2
@@ -104,13 +105,15 @@
uint8_t sa_data[14];
};
+typedef uint32_t target_socklen_t;
+
struct target_timeval {
- abi_long tv_sec;
- abi_long tv_usec;
+ target_time_t tv_sec;
+ target_suseconds_t tv_usec;
};
struct target_timespec {
- abi_long tv_sec;
+ target_time_t tv_sec;
abi_long tv_nsec;
};
@@ -119,8 +122,6 @@
struct target_timeval it_value;
};
-typedef abi_long target_clock_t;
-
#define TARGET_HZ 100
struct target_tms {
@@ -131,8 +132,8 @@
};
struct target_utimbuf {
- abi_long actime;
- abi_long modtime;
+ target_time_t actime;
+ target_time_t modtime;
};
struct target_sel_arg_struct {
@@ -1481,10 +1482,6 @@
#error unsupported CPU
#endif
-typedef struct {
- int val[2];
-} target_fsid_t;
-
#ifdef TARGET_MIPS
#ifdef TARGET_MIPSN32
struct target_statfs {
Index: qemu/linux-user/cris/target_posix_types.h
===================================================================
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
+++ qemu/linux-user/cris/target_posix_types.h 2007-11-13 16:18:03.000000000 -0700
@@ -0,0 +1,59 @@
+/*
+ * Borrowed with minor changes from:
+ * linux/include/asm-cris/posix_types.h
+ */
+
+#ifndef TARGET_POSIX_TYPES_H
+#define TARGET_POSIX_TYPES_H
+
+
+#include <stdint.h>
+
+
+typedef int8_t target_char;
+typedef int16_t target_short;
+typedef int32_t target_int;
+/* target_long defined in qemu/cpu-defs.h */
+typedef int64_t target_long_long;
+
+typedef uint8_t target_uchar;
+typedef uint16_t target_ushort;
+typedef uint32_t target_uint;
+/* target_ulong defined in qemu/cpu-defs.h */
+typedef uint64_t target_ulong_long;
+
+typedef target_ulong target_ino_t;
+typedef target_ushort target_mode_t;
+typedef target_ushort target_nlink_t;
+typedef target_long target_off_t;
+typedef target_int target_pid_t;
+typedef target_ushort target_ipc_pid_t;
+typedef target_ushort target_uid_t;
+typedef target_ushort target_gid_t;
+typedef target_ulong target_size_t;
+typedef target_long target_ssize_t;
+typedef target_int target_ptrdiff_t;
+typedef target_long target_time_t;
+typedef target_long target_suseconds_t;
+typedef target_long target_clock_t;
+typedef target_int target_timer_t;
+typedef target_int target_clockid_t;
+typedef target_int target_daddr_t;
+typedef target_char * target_caddr_t;
+typedef target_ushort target_uid16_t;
+typedef target_ushort target_gid16_t;
+typedef target_uint target_uid32_t;
+typedef target_uint target_gid32_t;
+
+typedef target_ushort target_old_uid_t;
+typedef target_ushort target_old_gid_t;
+typedef target_ushort target_old_dev_t;
+
+typedef target_long_long target_loff_t;
+
+typedef struct {
+ target_int val[2];
+} target_fsid_t;
+
+
+#endif /* TARGET_POSIX_TYPES_H */
next prev parent reply other threads:[~2007-11-14 18:28 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-11-14 15:59 [Qemu-devel] [PATCH] target_posix_types.h Thayne Harbaugh
2007-11-14 16:03 ` [Qemu-devel] Re: [PATCH] tget/tput deprecation Thayne Harbaugh
2007-11-14 16:08 ` Thayne Harbaugh
2007-11-14 18:21 ` Thayne Harbaugh
2007-11-14 19:02 ` Thayne Harbaugh
2007-11-16 4:16 ` Thayne Harbaugh
2007-11-14 16:25 ` [Qemu-devel] [PATCH] target_posix_types.h Jocelyn Mayer
2007-11-14 17:36 ` Thiemo Seufer
2007-11-14 17:54 ` Jocelyn Mayer
2007-11-14 18:20 ` Thayne Harbaugh [this message]
2007-11-14 18:32 ` Fabrice Bellard
2007-11-14 18:43 ` Thayne Harbaugh
2007-11-14 19:14 ` Fabrice Bellard
2007-11-14 19:53 ` Thayne Harbaugh
2007-11-14 20:39 ` Paul Brook
2007-11-14 21:06 ` Warner Losh
2007-11-14 21:25 ` Thayne Harbaugh
2007-11-14 21:19 ` Thayne Harbaugh
2007-11-14 21:37 ` Paul Brook
2007-11-14 19:56 ` Thayne Harbaugh
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1195064444.918.45.camel@phantasm.home.enterpriseandprosperity.com \
--to=thayne@c2.net \
--cc=l_indien@magic.fr \
--cc=qemu-devel@nongnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).