Patchwork [libstdc++] : Enable use of 'long long' for mingw targets

login
register
mail settings
Submitter Kai Tietz
Date Sept. 13, 2013, 6:51 a.m.
Message ID <CAEwic4aN0OT=sMTq7KEWE+Pf9SZiWi3UPcE8SEx5-1HA7BFFaw@mail.gmail.com>
Download mbox | patch
Permalink /patch/274664/
State New
Headers show

Comments

Kai Tietz - Sept. 13, 2013, 6:51 a.m.
Hello,

this patch enables the 'long long' use in libstdc++ for Windows native targets.

ChangeLog

2013-09-13  Kai Tietz  <ktietz@redhat.com>

    * config/os/mingw32/os_defines.h (_GLIBCXX_USE_LONG_LONG):
    Enable feature.
    * config/os/mingw-w64/os_defines.h (_GLIBCXX_USE_LONG_LONG):
    Likewise.

Tested for i686-w64-mingw32, and x86_64-w64-mingw32. I will apply
soon, if there are no objections.

Regards,
Kai
Paolo Carlini - Sept. 13, 2013, 9:25 a.m.
Hi,

On 09/13/2013 08:51 AM, Kai Tietz wrote:
> Hello,
>
> this patch enables the 'long long' use in libstdc++ for Windows native targets.
>
> ChangeLog
>
> 2013-09-13  Kai Tietz  <ktietz@redhat.com>
>
>      * config/os/mingw32/os_defines.h (_GLIBCXX_USE_LONG_LONG):
>      Enable feature.
>      * config/os/mingw-w64/os_defines.h (_GLIBCXX_USE_LONG_LONG):
>      Likewise.
>
> Tested for i686-w64-mingw32, and x86_64-w64-mingw32. I will apply
> soon, if there are no objections.
Not a real objection, but I don't understand why you need this. The 
configure routine is called as:

     GLIBCXX_ENABLE_LONG_LONG([yes])

thus is on by default (of course) and then it doesn't carry out any 
special test, you can really assume _GLIBCXX_USE_LONG_LONG to be 
defined, unless whoever runs configure explicitly wants it undefined.

Paolo.
Kai Tietz - Sept. 13, 2013, 9:27 a.m.
2013/9/13 Paolo Carlini <paolo.carlini@oracle.com>:
> Hi,
>
>
> On 09/13/2013 08:51 AM, Kai Tietz wrote:
>>
>> Hello,
>>
>> this patch enables the 'long long' use in libstdc++ for Windows native
>> targets.
>>
>> ChangeLog
>>
>> 2013-09-13  Kai Tietz  <ktietz@redhat.com>
>>
>>      * config/os/mingw32/os_defines.h (_GLIBCXX_USE_LONG_LONG):
>>      Enable feature.
>>      * config/os/mingw-w64/os_defines.h (_GLIBCXX_USE_LONG_LONG):
>>      Likewise.
>>
>> Tested for i686-w64-mingw32, and x86_64-w64-mingw32. I will apply
>> soon, if there are no objections.
>
> Not a real objection, but I don't understand why you need this. The
> configure routine is called as:
>
>     GLIBCXX_ENABLE_LONG_LONG([yes])
>
> thus is on by default (of course) and then it doesn't carry out any special
> test, you can really assume _GLIBCXX_USE_LONG_LONG to be defined, unless
> whoever runs configure explicitly wants it undefined.
>
> Paolo.

The check for this is broken for some Windows targets, due printf
doesn't support in all cases the %ll width modifier.
So why probing, if we know it works.

Kai
Paolo Carlini - Sept. 13, 2013, 9:37 a.m.
On 09/13/2013 11:27 AM, Kai Tietz wrote:
> The check for this is broken for some Windows targets, due printf 
> doesn't support in all cases the %ll width modifier. So why probing, 
> if we know it works.
Which check? I don't see any, this is my point.

Paolo.
Kai Tietz - Sept. 13, 2013, 9:48 a.m.
Yes, you are right.  Patch rejected due it is pretty useless.  Now it
makes me wonder why I have this in my tree as this default got set
already at rev 70194.

Thanks,
Kai

Patch

Index: config/os/mingw32/os_defines.h
===================================================================
--- config/os/mingw32/os_defines.h    (Revision 202553)
+++ config/os/mingw32/os_defines.h    (Arbeitskopie)
@@ -75,4 +75,7 @@ 
 #define _GLIBCXX_LLP64 1
 #endif

+#undef _GLIBCXX_USE_LONG_LONG
+#define _GLIBCXX_USE_LONG_LONG 1
+
 #endif
Index: config/os/mingw32-w64/os_defines.h
===================================================================
--- config/os/mingw32-w64/os_defines.h    (Revision 202553)
+++ config/os/mingw32-w64/os_defines.h    (Arbeitskopie)
@@ -78,4 +78,7 @@ 
 #define _GLIBCXX_LLP64 1
 #endif

+#undef _GLIBCXX_USE_LONG_LONG
+#define _GLIBCXX_USE_LONG_LONG 1
+
 #endif