* PATCH: libdecimal builts with types.h using __(xxx)_t_defined clauses
@ 2007-03-01 13:26 Kai Tietz
2007-03-02 3:07 ` Ben Elliston
` (2 more replies)
0 siblings, 3 replies; 11+ messages in thread
From: Kai Tietz @ 2007-03-01 13:26 UTC (permalink / raw)
To: gcc-patches
Hi,
while porting I ran over the problem, that the types.h header causes
problem while building libdecimal, if the types headers uses older
__(xxx)_t_defined clauses.
I suggest this patch
ChangLog entry:
2007-03-01 Kai Tietz <kai.tietz@onevision.com>
* config/stdint.m4: Make template compatible with older cygwin
types.h (for __(xxx)_t_defined clauses),...)
Patch:
Index: config/stdint.m4
===================================================================
--- config/stdint.m4 (revision 122428)
+++ config/stdint.m4 (working copy)
@@ -218,33 +218,45 @@
#ifndef _UINT8_T
#define _UINT8_T
+ #ifndef __uint8_t_defined
typedef unsigned $acx_cv_type_int8_t uint8_t;
#endif
+ #endif
#ifndef _UINT16_T
#define _UINT16_T
+ #ifndef __uint16_t_defined
typedef unsigned $acx_cv_type_int16_t uint16_t;
#endif
+ #endif
#ifndef _UINT32_T
#define _UINT32_T
+ #ifndef __uint32_t_defined
typedef unsigned $acx_cv_type_int32_t uint32_t;
#endif
+ #endif
#ifndef _INT8_T
#define _INT8_T
+ #ifndef __int8_t_defined
typedef $acx_cv_type_int8_t int8_t;
#endif
+ #endif
#ifndef _INT16_T
#define _INT16_T
+ #ifndef __int16_t_defined
typedef $acx_cv_type_int16_t int16_t;
#endif
+ #endif
#ifndef _INT32_T
#define _INT32_T
+ #ifndef __int32_t_defined
typedef $acx_cv_type_int32_t int32_t;
#endif
+ #endif
EOF
elif test "$ac_cv_type_u_int32_t" = yes; then
sed 's/^ *//' >> tmp-stdint.h <<EOF
@@ -262,18 +274,24 @@
#ifndef _UINT8_T
#define _UINT8_T
+ #ifndef __uint8_t_defined
typedef u_int8_t uint8_t;
#endif
+ #endif
#ifndef _UINT16_T
#define _UINT16_T
+ #ifndef __uint16_t_defined
typedef u_int16_t uint16_t;
#endif
+ #endif
#ifndef _UINT32_T
#define _UINT32_T
+ #ifndef __uint32_t_defined
typedef u_int32_t uint32_t;
#endif
+ #endif
EOF
else
sed 's/^ *//' >> tmp-stdint.h <<EOF
@@ -321,8 +339,10 @@
#endif
#ifndef _UINT64_T
#define _UINT64_T
+ #ifndef __uint8_t_defined
typedef u_int64_t uint64_t;
#endif
+ #endif
EOF
elif test -n "$acx_cv_type_int64_t"; then
sed 's/^ *//' >> tmp-stdint.h <<EOF
@@ -334,8 +354,10 @@
#endif
#ifndef _UINT64_T
#define _UINT64_T
+ #ifndef __uint8_t_defined
typedef unsigned $acx_cv_type_int64_t uint64_t;
#endif
+ #endif
EOF
else
sed 's/^ *//' >> tmp-stdint.h <<EOF
@@ -344,10 +366,13 @@
#if defined __STDC_VERSION__ && (__STDC_VERSION__-0) >= 199901L
#ifndef _INT64_T
#define _INT64_T
+ #ifndef __uint8_t_defined
typedef long long int64_t;
#endif
+ #endif
#ifndef _UINT64_T
#define _UINT64_T
typedef unsigned long long uint64_t;
@@ -390,8 +415,12 @@
sed 's/^ *//' >> tmp-stdint.h <<EOF
/* Define intptr_t based on sizeof(void*) = $ac_cv_sizeof_void_p */
+ #ifndef __uintptr_t_defined
typedef u$acx_cv_type_intptr_t uintptr_t;
+ #endif
+ #ifndef __intptr_t_defined
typedef $acx_cv_type_intptr_t intptr_t;
+ #endif
EOF
fi
Regards,
i.A. Kai Tietz
----------------------------------------
Kai Tietz - Software engineering
OneVision Software Entwicklungs GmbH & Co KG
Dr.-Leo-Ritter-Str. 9, 93049 Regensburg, Germany
Phone: +49-941-78004-0
FAX: +49-941-78004-489
WWW: http://www.OneVision.com
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: PATCH: libdecimal builts with types.h using __(xxx)_t_defined clauses
2007-03-01 13:26 PATCH: libdecimal builts with types.h using __(xxx)_t_defined clauses Kai Tietz
@ 2007-03-02 3:07 ` Ben Elliston
2007-03-14 9:05 ` Ping: " Kai Tietz
2007-03-16 12:49 ` Paolo Bonzini
2007-03-16 12:53 ` Paolo Bonzini
2 siblings, 1 reply; 11+ messages in thread
From: Ben Elliston @ 2007-03-02 3:07 UTC (permalink / raw)
To: Kai Tietz; +Cc: gcc-patches
> while porting I ran over the problem, that the types.h header causes
> problem while building libdecimal, if the types headers uses older
> __(xxx)_t_defined clauses.
This looks okay to me, I suppose, but you will need a build system
maintainer to approve it.
Cheers, Ben
^ permalink raw reply [flat|nested] 11+ messages in thread
* Ping: PATCH: libdecimal builts with types.h using __(xxx)_t_defined clauses
2007-03-02 3:07 ` Ben Elliston
@ 2007-03-14 9:05 ` Kai Tietz
0 siblings, 0 replies; 11+ messages in thread
From: Kai Tietz @ 2007-03-14 9:05 UTC (permalink / raw)
To: Ben Elliston; +Cc: gcc-patches
Hello,
of course it is the libdecnumber.
Kai
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: PATCH: libdecimal builts with types.h using __(xxx)_t_defined clauses
2007-03-01 13:26 PATCH: libdecimal builts with types.h using __(xxx)_t_defined clauses Kai Tietz
2007-03-02 3:07 ` Ben Elliston
@ 2007-03-16 12:49 ` Paolo Bonzini
2007-03-28 9:19 ` PING: " Kai Tietz
2007-03-16 12:53 ` Paolo Bonzini
2 siblings, 1 reply; 11+ messages in thread
From: Paolo Bonzini @ 2007-03-16 12:49 UTC (permalink / raw)
To: Kai Tietz; +Cc: gcc-patches, Ben Elliston
> ChangLog entry:
>
> 2007-03-01 Kai Tietz <kai.tietz@onevision.com>
>
> * config/stdint.m4: Make template compatible with older cygwin
> types.h (for __(xxx)_t_defined clauses),...)
Ok, thanks.
Paolo
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: PATCH: libdecimal builts with types.h using __(xxx)_t_defined clauses
2007-03-01 13:26 PATCH: libdecimal builts with types.h using __(xxx)_t_defined clauses Kai Tietz
2007-03-02 3:07 ` Ben Elliston
2007-03-16 12:49 ` Paolo Bonzini
@ 2007-03-16 12:53 ` Paolo Bonzini
2007-03-16 13:20 ` Kai Tietz
2 siblings, 1 reply; 11+ messages in thread
From: Paolo Bonzini @ 2007-03-16 12:53 UTC (permalink / raw)
To: Kai Tietz; +Cc: gcc-patches
Kai Tietz wrote:
> Hi,
>
> while porting I ran over the problem, that the types.h header causes
> problem while building libdecimal, if the types headers uses older
> __(xxx)_t_defined clauses.
> I suggest this patch
On second thought, you also need to #define the symbols that you
test for.
Paolo
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: PATCH: libdecimal builts with types.h using __(xxx)_t_defined clauses
2007-03-16 12:53 ` Paolo Bonzini
@ 2007-03-16 13:20 ` Kai Tietz
2007-03-16 13:33 ` Paolo Bonzini
0 siblings, 1 reply; 11+ messages in thread
From: Kai Tietz @ 2007-03-16 13:20 UTC (permalink / raw)
To: bonzini; +Cc: gcc-patches
No, I don't think so. Just the gnu stdint defines have to be set if the
old-style types.h is pre-included. Because if the system types.h is
inherited, than it is for gcc always before the gnu version.
Regards,
i.A. Kai Tietz
Paolo Bonzini <paolo.bonzini@lu.unisi.ch> wrote on 16.03.2007 13:44:25:
> Kai Tietz wrote:
> > Hi,
> >
> > while porting I ran over the problem, that the types.h header causes
> > problem while building libdecimal, if the types headers uses older
> > __(xxx)_t_defined clauses.
> > I suggest this patch
>
> On second thought, you also need to #define the symbols that you
> test for.
>
> Paolo
>
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: PATCH: libdecimal builts with types.h using __(xxx)_t_defined clauses
2007-03-16 13:20 ` Kai Tietz
@ 2007-03-16 13:33 ` Paolo Bonzini
2007-03-16 13:41 ` Kai Tietz
0 siblings, 1 reply; 11+ messages in thread
From: Paolo Bonzini @ 2007-03-16 13:33 UTC (permalink / raw)
To: Kai Tietz; +Cc: gcc-patches
Kai Tietz wrote:
> No, I don't think so. Just the gnu stdint defines have to be set if the
> old-style types.h is pre-included. Because if the system types.h is
> inherited, than it is for gcc always before the gnu version.
I'd prefer that you define them anyway, in case some other header is
relying on them. You never know.
Paolo
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: PATCH: libdecimal builts with types.h using __(xxx)_t_defined clauses
2007-03-16 13:33 ` Paolo Bonzini
@ 2007-03-16 13:41 ` Kai Tietz
2007-03-16 15:15 ` Paolo Bonzini
0 siblings, 1 reply; 11+ messages in thread
From: Kai Tietz @ 2007-03-16 13:41 UTC (permalink / raw)
To: bonzini; +Cc: gcc-patches
[-- Attachment #1: Type: text/plain, Size: 3563 bytes --]
Paolo Bonzini <paolo.bonzini@lu.unisi.ch> wrote on 16.03.2007 13:52:54:
> Kai Tietz wrote:
> > No, I don't think so. Just the gnu stdint defines have to be set if
the
> > old-style types.h is pre-included. Because if the system types.h is
> > inherited, than it is for gcc always before the gnu version.
>
> I'd prefer that you define them anyway, in case some other header is
> relying on them. You never know.
>
> Paolo
>
Adjusted patch is:
Index: stdint.m4
===================================================================
--- stdint.m4 (revision 122909)
+++ stdint.m4 (working copy)
@@ -218,33 +218,51 @@
#ifndef _UINT8_T
#define _UINT8_T
+ #ifndef __uint8_t_defined
+ #define __uint8_t_defined
typedef unsigned $acx_cv_type_int8_t uint8_t;
#endif
+ #endif
#ifndef _UINT16_T
#define _UINT16_T
+ #ifndef __uint16_t_defined
+ #define __uint16_t_defined
typedef unsigned $acx_cv_type_int16_t uint16_t;
#endif
+ #endif
#ifndef _UINT32_T
#define _UINT32_T
+ #ifndef __uint32_t_defined
+ #define __uint32_t_defined
typedef unsigned $acx_cv_type_int32_t uint32_t;
#endif
+ #endif
#ifndef _INT8_T
#define _INT8_T
+ #ifndef __int8_t_defined
+ #define __int8_t_defined
typedef $acx_cv_type_int8_t int8_t;
#endif
+ #endif
#ifndef _INT16_T
#define _INT16_T
+ #ifndef __int16_t_defined
+ #define __int16_t_defined
typedef $acx_cv_type_int16_t int16_t;
#endif
+ #endif
#ifndef _INT32_T
#define _INT32_T
+ #ifndef __int32_t_defined
+ #define __int32_t_defined
typedef $acx_cv_type_int32_t int32_t;
#endif
+ #endif
EOF
elif test "$ac_cv_type_u_int32_t" = yes; then
sed 's/^ *//' >> tmp-stdint.h <<EOF
@@ -262,18 +280,27 @@
#ifndef _UINT8_T
#define _UINT8_T
+ #ifndef __uint8_t_defined
+ #define __uint8_t_defined
typedef u_int8_t uint8_t;
#endif
+ #endif
#ifndef _UINT16_T
#define _UINT16_T
+ #ifndef __uint16_t_defined
+ #define __uint16_t_defined
typedef u_int16_t uint16_t;
#endif
+ #endif
#ifndef _UINT32_T
#define _UINT32_T
+ #ifndef __uint32_t_defined
+ #define __uint32_t_defined
typedef u_int32_t uint32_t;
#endif
+ #endif
EOF
else
sed 's/^ *//' >> tmp-stdint.h <<EOF
@@ -321,8 +348,11 @@
#endif
#ifndef _UINT64_T
#define _UINT64_T
+ #ifndef __uint64_t_defined
+ #define __uint64_t_defined
typedef u_int64_t uint64_t;
#endif
+ #endif
EOF
elif test -n "$acx_cv_type_int64_t"; then
sed 's/^ *//' >> tmp-stdint.h <<EOF
@@ -334,8 +364,11 @@
#endif
#ifndef _UINT64_T
#define _UINT64_T
+ #ifndef __uint64_t_defined
+ #define __uint64_t_defined
typedef unsigned $acx_cv_type_int64_t uint64_t;
#endif
+ #endif
EOF
else
sed 's/^ *//' >> tmp-stdint.h <<EOF
@@ -344,8 +377,10 @@
#if defined __STDC_VERSION__ && (__STDC_VERSION__-0) >= 199901L
#ifndef _INT64_T
#define _INT64_T
+ #ifndef __int64_t_defined
typedef long long int64_t;
#endif
+ #endif
#ifndef _UINT64_T
#define _UINT64_T
typedef unsigned long long uint64_t;
@@ -390,8 +425,12 @@
sed 's/^ *//' >> tmp-stdint.h <<EOF
/* Define intptr_t based on sizeof(void*) = $ac_cv_sizeof_void_p */
+ #ifndef __uintptr_t_defined
typedef u$acx_cv_type_intptr_t uintptr_t;
+ #endif
+ #ifndef __intptr_t_defined
typedef $acx_cv_type_intptr_t intptr_t;
+ #endif
EOF
fi
[-- Attachment #2: stdint.m4.txt --]
[-- Type: text/plain, Size: 3239 bytes --]
Index: stdint.m4
===================================================================
--- stdint.m4 (revision 122909)
+++ stdint.m4 (working copy)
@@ -218,33 +218,51 @@
#ifndef _UINT8_T
#define _UINT8_T
+ #ifndef __uint8_t_defined
+ #define __uint8_t_defined
typedef unsigned $acx_cv_type_int8_t uint8_t;
#endif
+ #endif
#ifndef _UINT16_T
#define _UINT16_T
+ #ifndef __uint16_t_defined
+ #define __uint16_t_defined
typedef unsigned $acx_cv_type_int16_t uint16_t;
#endif
+ #endif
#ifndef _UINT32_T
#define _UINT32_T
+ #ifndef __uint32_t_defined
+ #define __uint32_t_defined
typedef unsigned $acx_cv_type_int32_t uint32_t;
#endif
+ #endif
#ifndef _INT8_T
#define _INT8_T
+ #ifndef __int8_t_defined
+ #define __int8_t_defined
typedef $acx_cv_type_int8_t int8_t;
#endif
+ #endif
#ifndef _INT16_T
#define _INT16_T
+ #ifndef __int16_t_defined
+ #define __int16_t_defined
typedef $acx_cv_type_int16_t int16_t;
#endif
+ #endif
#ifndef _INT32_T
#define _INT32_T
+ #ifndef __int32_t_defined
+ #define __int32_t_defined
typedef $acx_cv_type_int32_t int32_t;
#endif
+ #endif
EOF
elif test "$ac_cv_type_u_int32_t" = yes; then
sed 's/^ *//' >> tmp-stdint.h <<EOF
@@ -262,18 +280,27 @@
#ifndef _UINT8_T
#define _UINT8_T
+ #ifndef __uint8_t_defined
+ #define __uint8_t_defined
typedef u_int8_t uint8_t;
#endif
+ #endif
#ifndef _UINT16_T
#define _UINT16_T
+ #ifndef __uint16_t_defined
+ #define __uint16_t_defined
typedef u_int16_t uint16_t;
#endif
+ #endif
#ifndef _UINT32_T
#define _UINT32_T
+ #ifndef __uint32_t_defined
+ #define __uint32_t_defined
typedef u_int32_t uint32_t;
#endif
+ #endif
EOF
else
sed 's/^ *//' >> tmp-stdint.h <<EOF
@@ -321,8 +348,11 @@
#endif
#ifndef _UINT64_T
#define _UINT64_T
+ #ifndef __uint64_t_defined
+ #define __uint64_t_defined
typedef u_int64_t uint64_t;
#endif
+ #endif
EOF
elif test -n "$acx_cv_type_int64_t"; then
sed 's/^ *//' >> tmp-stdint.h <<EOF
@@ -334,8 +364,11 @@
#endif
#ifndef _UINT64_T
#define _UINT64_T
+ #ifndef __uint64_t_defined
+ #define __uint64_t_defined
typedef unsigned $acx_cv_type_int64_t uint64_t;
#endif
+ #endif
EOF
else
sed 's/^ *//' >> tmp-stdint.h <<EOF
@@ -344,8 +377,10 @@
#if defined __STDC_VERSION__ && (__STDC_VERSION__-0) >= 199901L
#ifndef _INT64_T
#define _INT64_T
+ #ifndef __int64_t_defined
typedef long long int64_t;
#endif
+ #endif
#ifndef _UINT64_T
#define _UINT64_T
typedef unsigned long long uint64_t;
@@ -390,8 +425,12 @@
sed 's/^ *//' >> tmp-stdint.h <<EOF
/* Define intptr_t based on sizeof(void*) = $ac_cv_sizeof_void_p */
+ #ifndef __uintptr_t_defined
typedef u$acx_cv_type_intptr_t uintptr_t;
+ #endif
+ #ifndef __intptr_t_defined
typedef $acx_cv_type_intptr_t intptr_t;
+ #endif
EOF
fi
=
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: PATCH: libdecimal builts with types.h using __(xxx)_t_defined clauses
2007-03-16 13:41 ` Kai Tietz
@ 2007-03-16 15:15 ` Paolo Bonzini
0 siblings, 0 replies; 11+ messages in thread
From: Paolo Bonzini @ 2007-03-16 15:15 UTC (permalink / raw)
To: Kai Tietz; +Cc: gcc-patches
>> I'd prefer that you define them anyway, in case some other header is
>> relying on them. You never know.
>>
>> Paolo
Okay. By the way, looking at this mail it is not necessary that you
inline patch but only that you rename patches to .txt.
Paolo
^ permalink raw reply [flat|nested] 11+ messages in thread
* PING: Re: PATCH: libdecimal builts with types.h using __(xxx)_t_defined clauses
2007-03-16 12:49 ` Paolo Bonzini
@ 2007-03-28 9:19 ` Kai Tietz
2007-03-28 9:34 ` Paolo Bonzini
0 siblings, 1 reply; 11+ messages in thread
From: Kai Tietz @ 2007-03-28 9:19 UTC (permalink / raw)
To: bonzini, gcc-patches
Hello Paolo,
did you missed to commit ? May your were waiting for my FSF contract. This
is done.
Regards,
i.A. Kai Tietz
Paolo Bonzini <paolo.bonzini@lu.unisi.ch>
16.03.2007 13:46
Please respond to
bonzini@gnu.org
To
Kai Tietz <Kai.Tietz@onevision.com>
cc
gcc-patches@gcc.gnu.org, Ben Elliston <bje@au1.ibm.com>
Subject
Re: PATCH: libdecimal builts with types.h using __(xxx)_t_defined clauses
> ChangLog entry:
>
> 2007-03-01 Kai Tietz <kai.tietz@onevision.com>
>
> * config/stdint.m4: Make template compatible with older cygwin
> types.h (for __(xxx)_t_defined clauses),...)
Ok, thanks.
Paolo
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: PING: Re: PATCH: libdecimal builts with types.h using __(xxx)_t_defined clauses
2007-03-28 9:19 ` PING: " Kai Tietz
@ 2007-03-28 9:34 ` Paolo Bonzini
0 siblings, 0 replies; 11+ messages in thread
From: Paolo Bonzini @ 2007-03-28 9:34 UTC (permalink / raw)
To: Kai Tietz; +Cc: bonzini, gcc-patches
Kai Tietz wrote:
> Hello Paolo,
>
> did you missed to commit ? May your were waiting for my FSF contract. This
> is done.
I'll commit it soon.
Thanks,
Paolo
^ permalink raw reply [flat|nested] 11+ messages in thread
end of thread, other threads:[~2007-03-28 8:48 UTC | newest]
Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-03-01 13:26 PATCH: libdecimal builts with types.h using __(xxx)_t_defined clauses Kai Tietz
2007-03-02 3:07 ` Ben Elliston
2007-03-14 9:05 ` Ping: " Kai Tietz
2007-03-16 12:49 ` Paolo Bonzini
2007-03-28 9:19 ` PING: " Kai Tietz
2007-03-28 9:34 ` Paolo Bonzini
2007-03-16 12:53 ` Paolo Bonzini
2007-03-16 13:20 ` Kai Tietz
2007-03-16 13:33 ` Paolo Bonzini
2007-03-16 13:41 ` Kai Tietz
2007-03-16 15:15 ` Paolo Bonzini
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 read-only IMAP folder(s) and NNTP newsgroup(s).