Re: [PATCH] Fix x86emu builds when using non-gnu compilers

2010-03-31 Thread Tiago Vignatti
On Wed, Mar 31, 2010 at 01:22:46AM +0200, ext Alan Coopersmith wrote:
> Before this fix, the u64 type would not be defined, causing
> x86emu/sys.c to fail to build:
> "sys.c", line 102: syntax error before or at: ldq_u
> "sys.c", line 102: syntax error before or at: *
> 
> Since Keith requested using , converted all the x86emu
> typedefs to use the stdint types.
> 
> Signed-off-by: Alan Coopersmith 

Acked-by: Tiago Vignatti 

Tiago
___
xorg-devel@lists.x.org: X.Org development
Archives: http://lists.x.org/archives/xorg-devel
Info: http://lists.x.org/mailman/listinfo/xorg-devel


Re: [PATCH] Fix x86emu builds when using non-gnu compilers

2010-03-30 Thread Matt Turner
On Tue, Mar 30, 2010 at 7:22 PM, Alan Coopersmith
 wrote:
> Before this fix, the u64 type would not be defined, causing
> x86emu/sys.c to fail to build:
> "sys.c", line 102: syntax error before or at: ldq_u
> "sys.c", line 102: syntax error before or at: *
>
> Since Keith requested using , converted all the x86emu
> typedefs to use the stdint types.
>
> Signed-off-by: Alan Coopersmith 
> ---
>  hw/xfree86/x86emu/x86emu/types.h |   42 -
>  1 files changed, 9 insertions(+), 33 deletions(-)
>
> diff --git a/hw/xfree86/x86emu/x86emu/types.h 
> b/hw/xfree86/x86emu/x86emu/types.h
> index c18e11c..fa23800 100644
> --- a/hw/xfree86/x86emu/x86emu/types.h
> +++ b/hw/xfree86/x86emu/x86emu/types.h
> @@ -61,45 +61,21 @@
>
>  /*-- Macros and type definitions --*/
>
> -/* Currently only for Linux/32bit */
> -#undef  __HAS_LONG_LONG__
> -#if defined(__GNUC__) && !defined(NO_LONG_LONG)
> -#define __HAS_LONG_LONG__
> -#endif
> -
> -/* Taken from Xmd.h */
> -#undef NUM32
> -#if defined (_LP64) || \
> -    defined(__alpha) || defined(__alpha__) || \
> -    defined(__ia64__) || defined(ia64) || \
> -    defined(__sparc64__) || \
> -    defined(__s390x__) || \
> -    defined(__hppa__) && defined(__LP64) || \
> -    defined(__amd64__) || defined(amd64)
> -#define NUM32 int
> -#else
> -#define NUM32 long
> -#endif
> +#include 
>
> -typedef unsigned char          u8;
> -typedef unsigned short                 u16;
> -typedef unsigned NUM32                 u32;
> -#ifdef __HAS_LONG_LONG__
> -typedef unsigned long long     u64;
> -#endif
> +typedef uint8_t                                u8;
> +typedef uint16_t                       u16;
> +typedef uint32_t                       u32;
> +typedef uint64_t                       u64;
>
> -typedef char                           s8;
> -typedef short                          s16;
> -typedef NUM32                          s32;
> -#ifdef __HAS_LONG_LONG__
> -typedef long long                      s64;
> -#endif
> +typedef int8_t                                 s8;
> +typedef int16_t                                s16;
> +typedef int32_t                                s32;
> +typedef int64_t                                s64;
>
>  typedef unsigned int                   uint;
>  typedef int                            sint;
>
>  typedef u16 X86EMU_pioAddr;
>
> -#undef NUM32
> -
>  #endif /* __X86EMU_TYPES_H */
> --
> 1.5.6.5
>
> ___
> xorg-devel@lists.x.org: X.Org development
> Archives: http://lists.x.org/archives/xorg-devel
> Info: http://lists.x.org/mailman/listinfo/xorg-devel
>

Acked-by: Matt Turner 
___
xorg-devel@lists.x.org: X.Org development
Archives: http://lists.x.org/archives/xorg-devel
Info: http://lists.x.org/mailman/listinfo/xorg-devel


[PATCH] Fix x86emu builds when using non-gnu compilers

2010-03-30 Thread Alan Coopersmith
Before this fix, the u64 type would not be defined, causing
x86emu/sys.c to fail to build:
"sys.c", line 102: syntax error before or at: ldq_u
"sys.c", line 102: syntax error before or at: *

Since Keith requested using , converted all the x86emu
typedefs to use the stdint types.

Signed-off-by: Alan Coopersmith 
---
 hw/xfree86/x86emu/x86emu/types.h |   42 -
 1 files changed, 9 insertions(+), 33 deletions(-)

diff --git a/hw/xfree86/x86emu/x86emu/types.h b/hw/xfree86/x86emu/x86emu/types.h
index c18e11c..fa23800 100644
--- a/hw/xfree86/x86emu/x86emu/types.h
+++ b/hw/xfree86/x86emu/x86emu/types.h
@@ -61,45 +61,21 @@
 
 /*-- Macros and type definitions --*/
 
-/* Currently only for Linux/32bit */
-#undef  __HAS_LONG_LONG__
-#if defined(__GNUC__) && !defined(NO_LONG_LONG)
-#define __HAS_LONG_LONG__
-#endif
-
-/* Taken from Xmd.h */
-#undef NUM32
-#if defined (_LP64) || \
-defined(__alpha) || defined(__alpha__) || \
-defined(__ia64__) || defined(ia64) || \
-defined(__sparc64__) || \
-defined(__s390x__) || \
-defined(__hppa__) && defined(__LP64) || \
-defined(__amd64__) || defined(amd64) 
-#define NUM32 int
-#else
-#define NUM32 long
-#endif
+#include 
 
-typedef unsigned char  u8;
-typedef unsigned short u16;
-typedef unsigned NUM32 u32;
-#ifdef __HAS_LONG_LONG__
-typedef unsigned long long u64;
-#endif
+typedef uint8_tu8;
+typedef uint16_t   u16;
+typedef uint32_t   u32;
+typedef uint64_t   u64;
 
-typedef char   s8;
-typedef short  s16;
-typedef NUM32  s32;
-#ifdef __HAS_LONG_LONG__
-typedef long long  s64;
-#endif
+typedef int8_t s8;
+typedef int16_ts16;
+typedef int32_ts32;
+typedef int64_ts64;
 
 typedef unsigned int   uint;
 typedef intsint;
 
 typedef u16 X86EMU_pioAddr;
 
-#undef NUM32
-
 #endif /* __X86EMU_TYPES_H */
-- 
1.5.6.5

___
xorg-devel@lists.x.org: X.Org development
Archives: http://lists.x.org/archives/xorg-devel
Info: http://lists.x.org/mailman/listinfo/xorg-devel


Re: [PATCH] Fix x86emu builds when using non-gnu compilers

2010-03-30 Thread Keith Packard
On Mon, 29 Mar 2010 16:08:06 +0300, Tiago Vignatti  
wrote:

> Watching the other replies from Keith, I've seen he's not so enthusiastic with
> the idea of not use stdint.h. Anyway, if this patch arrives on xserver, I'll
> be pushing to my libx86 tree either.

Right, I think all 'fixed' size objects should be obviously traceable
back to stdint.h. Does this seem unreasonable to anyone?

-- 
keith.pack...@intel.com


pgpjw5OY2Cqwu.pgp
Description: PGP signature
___
xorg-devel@lists.x.org: X.Org development
Archives: http://lists.x.org/archives/xorg-devel
Info: http://lists.x.org/mailman/listinfo/xorg-devel

Re: [PATCH] Fix x86emu builds when using non-gnu compilers

2010-03-29 Thread Tiago Vignatti
On Tue, Mar 23, 2010 at 02:03:53AM +0100, ext Alan Coopersmith wrote:
> Before this fix, the u64 type would not be defined, causing
> x86emu/sys.c to fail to build:
> "sys.c", line 102: syntax error before or at: ldq_u
> "sys.c", line 102: syntax error before or at: *
> 
> Since 64-bit types are now required by x86emu, assumes all platforms
> either have a 64-bit long or a 64-bit long long (defined by C99).
> 
> Signed-off-by: Alan Coopersmith 
> Acked-by: Adam Jackson 
> Acked-by: Matt Turner 
> ---

Compiled-by: Tiago Vignatti  (on ARM architecture,
emulated by Scratchbox2).

Watching the other replies from Keith, I've seen he's not so enthusiastic with
the idea of not use stdint.h. Anyway, if this patch arrives on xserver, I'll
be pushing to my libx86 tree either.


Thanks,
Tiago
___
xorg-devel@lists.x.org: X.Org development
Archives: http://lists.x.org/archives/xorg-devel
Info: http://lists.x.org/mailman/listinfo/xorg-devel


Re: [PATCH] Fix x86emu builds when using non-gnu compilers

2010-03-24 Thread Keith Packard
On Wed, 24 Mar 2010 06:12:52 -0700, Alan Coopersmith  
wrote:

> Not yet - and I didn't dig to find out why, but some of the x86emu files
> that include this specifically avoid including system headers.   (Could
> be more of the ancient xf86 module loader sillyness or something
> deeper.)

include/input.h uses stdint.h, clearly it's part of our required system
interface for the server now.

-- 
keith.pack...@intel.com


pgp5kVWIvGBZU.pgp
Description: PGP signature
___
xorg-devel@lists.x.org: X.Org development
Archives: http://lists.x.org/archives/xorg-devel
Info: http://lists.x.org/mailman/listinfo/xorg-devel

Re: [PATCH] Fix x86emu builds when using non-gnu compilers

2010-03-24 Thread Alan Coopersmith
Keith Packard wrote:
> On Mon, 22 Mar 2010 18:03:53 -0700, Alan Coopersmith 
>  wrote:
> 
>> Since 64-bit types are now required by x86emu, assumes all platforms
>> either have a 64-bit long or a 64-bit long long (defined by C99).
> 
> Don't we assume stdint.h exists yet?

Not yet - and I didn't dig to find out why, but some of the x86emu files
that include this specifically avoid including system headers.   (Could
be more of the ancient xf86 module loader sillyness or something deeper.)

-- 
-Alan Coopersmith-   alan.coopersm...@sun.com
 Oracle Solaris Platform Engineering: X Window System

___
xorg-devel@lists.x.org: X.Org development
Archives: http://lists.x.org/archives/xorg-devel
Info: http://lists.x.org/mailman/listinfo/xorg-devel


Re: [PATCH] Fix x86emu builds when using non-gnu compilers

2010-03-24 Thread Keith Packard
On Mon, 22 Mar 2010 18:03:53 -0700, Alan Coopersmith  
wrote:

> Since 64-bit types are now required by x86emu, assumes all platforms
> either have a 64-bit long or a 64-bit long long (defined by C99).

Don't we assume stdint.h exists yet?

-- 
keith.pack...@intel.com


pgpNk1IAuTQ77.pgp
Description: PGP signature
___
xorg-devel@lists.x.org: X.Org development
Archives: http://lists.x.org/archives/xorg-devel
Info: http://lists.x.org/mailman/listinfo/xorg-devel

[PATCH] Fix x86emu builds when using non-gnu compilers

2010-03-22 Thread Alan Coopersmith
Before this fix, the u64 type would not be defined, causing
x86emu/sys.c to fail to build:
"sys.c", line 102: syntax error before or at: ldq_u
"sys.c", line 102: syntax error before or at: *

Since 64-bit types are now required by x86emu, assumes all platforms
either have a 64-bit long or a 64-bit long long (defined by C99).

Signed-off-by: Alan Coopersmith 
Acked-by: Adam Jackson 
Acked-by: Matt Turner 
---
 hw/xfree86/x86emu/x86emu/types.h |   16 
 1 files changed, 4 insertions(+), 12 deletions(-)

diff --git a/hw/xfree86/x86emu/x86emu/types.h b/hw/xfree86/x86emu/x86emu/types.h
index c18e11c..3e315c5 100644
--- a/hw/xfree86/x86emu/x86emu/types.h
+++ b/hw/xfree86/x86emu/x86emu/types.h
@@ -61,12 +61,6 @@
 
 /*-- Macros and type definitions --*/
 
-/* Currently only for Linux/32bit */
-#undef  __HAS_LONG_LONG__
-#if defined(__GNUC__) && !defined(NO_LONG_LONG)
-#define __HAS_LONG_LONG__
-#endif
-
 /* Taken from Xmd.h */
 #undef NUM32
 #if defined (_LP64) || \
@@ -77,23 +71,21 @@
 defined(__hppa__) && defined(__LP64) || \
 defined(__amd64__) || defined(amd64) 
 #define NUM32 int
+#define NUM64 long
 #else
 #define NUM32 long
+#define NUM64 long long
 #endif
 
 typedef unsigned char  u8;
 typedef unsigned short u16;
 typedef unsigned NUM32 u32;
-#ifdef __HAS_LONG_LONG__
-typedef unsigned long long u64;
-#endif
+typedef unsigned NUM64 u64;
 
 typedef char   s8;
 typedef short  s16;
 typedef NUM32  s32;
-#ifdef __HAS_LONG_LONG__
-typedef long long  s64;
-#endif
+typedef NUM64  s64;
 
 typedef unsigned int   uint;
 typedef intsint;
-- 
1.5.6.5

___
xorg-devel@lists.x.org: X.Org development
Archives: http://lists.x.org/archives/xorg-devel
Info: http://lists.x.org/mailman/listinfo/xorg-devel


Re: [PATCH] Fix x86emu builds when using non-gnu compilers

2010-03-17 Thread Matt Turner
On Fri, Mar 12, 2010 at 10:20 PM, Alan Coopersmith
 wrote:
> Before this fix, the u64 type would not be defined, causing
> x86emu/sys.c to fail to build:
> "sys.c", line 102: syntax error before or at: ldq_u
> "sys.c", line 102: syntax error before or at: *
>
> Since 64-bit types are now required by x86emu, assumes all platforms
> either have a 64-bit long or a 64-bit long long (defined by C99).
>
> Signed-off-by: Alan Coopersmith 
> ---
>  hw/xfree86/x86emu/x86emu/types.h |   16 
>  1 files changed, 4 insertions(+), 12 deletions(-)
>
> diff --git a/hw/xfree86/x86emu/x86emu/types.h 
> b/hw/xfree86/x86emu/x86emu/types.h
> index c18e11c..3e315c5 100644
> --- a/hw/xfree86/x86emu/x86emu/types.h
> +++ b/hw/xfree86/x86emu/x86emu/types.h
> @@ -61,12 +61,6 @@
>
>  /*-- Macros and type definitions --*/
>
> -/* Currently only for Linux/32bit */
> -#undef  __HAS_LONG_LONG__
> -#if defined(__GNUC__) && !defined(NO_LONG_LONG)
> -#define __HAS_LONG_LONG__
> -#endif
> -
>  /* Taken from Xmd.h */
>  #undef NUM32
>  #if defined (_LP64) || \
> @@ -77,23 +71,21 @@
>     defined(__hppa__) && defined(__LP64) || \
>     defined(__amd64__) || defined(amd64)
>  #define NUM32 int
> +#define NUM64 long
>  #else
>  #define NUM32 long
> +#define NUM64 long long
>  #endif
>
>  typedef unsigned char          u8;
>  typedef unsigned short                 u16;
>  typedef unsigned NUM32                 u32;
> -#ifdef __HAS_LONG_LONG__
> -typedef unsigned long long     u64;
> -#endif
> +typedef unsigned NUM64                 u64;
>
>  typedef char                           s8;
>  typedef short                          s16;
>  typedef NUM32                          s32;
> -#ifdef __HAS_LONG_LONG__
> -typedef long long                      s64;
> -#endif
> +typedef NUM64                          s64;
>
>  typedef unsigned int                   uint;
>  typedef int                            sint;
> --
> 1.5.6.5
>
> ___
> xorg-devel@lists.x.org: X.Org development
> Archives: http://lists.x.org/archives/xorg-devel
> Info: http://lists.x.org/mailman/listinfo/xorg-devel
>

Acked-by: Matt Turner 
___
xorg-devel@lists.x.org: X.Org development
Archives: http://lists.x.org/archives/xorg-devel
Info: http://lists.x.org/mailman/listinfo/xorg-devel


Re: [PATCH] Fix x86emu builds when using non-gnu compilers

2010-03-17 Thread Adam Jackson
On Fri, 2010-03-12 at 18:20 -0800, Alan Coopersmith wrote:
> Before this fix, the u64 type would not be defined, causing
> x86emu/sys.c to fail to build:
> "sys.c", line 102: syntax error before or at: ldq_u
> "sys.c", line 102: syntax error before or at: *
> 
> Since 64-bit types are now required by x86emu, assumes all platforms
> either have a 64-bit long or a 64-bit long long (defined by C99).
> 
> Signed-off-by: Alan Coopersmith 

Acked-by: Adam Jackson 

- ajax


signature.asc
Description: This is a digitally signed message part
___
xorg-devel@lists.x.org: X.Org development
Archives: http://lists.x.org/archives/xorg-devel
Info: http://lists.x.org/mailman/listinfo/xorg-devel

[PATCH] Fix x86emu builds when using non-gnu compilers

2010-03-12 Thread Alan Coopersmith
Before this fix, the u64 type would not be defined, causing
x86emu/sys.c to fail to build:
"sys.c", line 102: syntax error before or at: ldq_u
"sys.c", line 102: syntax error before or at: *

Since 64-bit types are now required by x86emu, assumes all platforms
either have a 64-bit long or a 64-bit long long (defined by C99).

Signed-off-by: Alan Coopersmith 
---
 hw/xfree86/x86emu/x86emu/types.h |   16 
 1 files changed, 4 insertions(+), 12 deletions(-)

diff --git a/hw/xfree86/x86emu/x86emu/types.h b/hw/xfree86/x86emu/x86emu/types.h
index c18e11c..3e315c5 100644
--- a/hw/xfree86/x86emu/x86emu/types.h
+++ b/hw/xfree86/x86emu/x86emu/types.h
@@ -61,12 +61,6 @@
 
 /*-- Macros and type definitions --*/
 
-/* Currently only for Linux/32bit */
-#undef  __HAS_LONG_LONG__
-#if defined(__GNUC__) && !defined(NO_LONG_LONG)
-#define __HAS_LONG_LONG__
-#endif
-
 /* Taken from Xmd.h */
 #undef NUM32
 #if defined (_LP64) || \
@@ -77,23 +71,21 @@
 defined(__hppa__) && defined(__LP64) || \
 defined(__amd64__) || defined(amd64) 
 #define NUM32 int
+#define NUM64 long
 #else
 #define NUM32 long
+#define NUM64 long long
 #endif
 
 typedef unsigned char  u8;
 typedef unsigned short u16;
 typedef unsigned NUM32 u32;
-#ifdef __HAS_LONG_LONG__
-typedef unsigned long long u64;
-#endif
+typedef unsigned NUM64 u64;
 
 typedef char   s8;
 typedef short  s16;
 typedef NUM32  s32;
-#ifdef __HAS_LONG_LONG__
-typedef long long  s64;
-#endif
+typedef NUM64  s64;
 
 typedef unsigned int   uint;
 typedef intsint;
-- 
1.5.6.5

___
xorg-devel@lists.x.org: X.Org development
Archives: http://lists.x.org/archives/xorg-devel
Info: http://lists.x.org/mailman/listinfo/xorg-devel