Re: [Mingw-w64-public] sizeof long
-Original Message- From: Vincent Torri Sent: Wednesday, April 18, 2018 1:12 AM To: mingw-w64-public@lists.sourceforge.net Subject: Re: [Mingw-w64-public] sizeof long https://msdn.microsoft.com/ro-ro/library/s3f49ktz.aspx https://en.wikipedia.org/wiki/64-bit_computing#64-bit_data_models Thanks for those links, and the additional links/info provided by others. Is it therefore the case that porting gcc's "-mlong64" switch (I think currently available for MIPS only) to Windows would, under *no* circumstances, provide anything useful ? In fact, would it inevitably be unusable because of the incompatibility with the Windows API ? Cheers, Rob -- Check out the vibrant tech community on one of the world's most engaging tech sites, Slashdot.org! http://sdm.link/slashdot ___ Mingw-w64-public mailing list Mingw-w64-public@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/mingw-w64-public
Re: [Mingw-w64-public] sizeof long
That's the way it for Windows and the behavior is the same for Microsoft Visual C++.And since it's been that way for so long, changing it would break a lot of code even if it were possible. This behavior is different than in Linux where types would grow to 8 bytes. -Original Message- From: sisyph...@optusnet.com.auSent: Tuesday, April 17, 2018 9:58 AM To: mingw-w64-public@lists.sourceforge.net Subject: [Mingw-w64-public] sizeof long Hi, Why is it that on our x86_64 compilers sizeof long is only 4 ? Does it absolutely have to be that way ? Would it be possible to design a switch that would enable 8 byte longs ? The mismatch between linux and windows in this regard is a real pita, and I'm curious about the reason(s) that it exists. (A link to relevant explanation would be fine.) Cheers, Rob -- Check out the vibrant tech community on one of the world's most engaging tech sites, Slashdot.org! http://sdm.link/slashdot ___ Mingw-w64-public mailing list Mingw-w64-public@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/mingw-w64-public -- Check out the vibrant tech community on one of the world's most engaging tech sites, Slashdot.org! http://sdm.link/slashdot ___ Mingw-w64-public mailing list Mingw-w64-public@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/mingw-w64-public
Re: [Mingw-w64-public] Shell is stripping curly braces
在 2018/4/17 7:08, Robert Dailey 写道: > I have been trying to chase down a [bug I found][1] over on the Git > for Windows project. The short version of the issue is that specifying > a parameter like "@{-1}" with a git alias gets converted to "@-1". > Visit link #1 for more detail on that. > > I had started a [discussion over on the MinGW mailing list][2] about > this and someone found a [bug in glob][3] that was corrected. I had > reported the specific issue I found [on the MinGW64 project][4] as > well. > > Could I get the developers of this project to help out here too? To be > completely honest, I'm not all too familiar with MinGW myself or how > all of these dependencies tie up together, so I'm relying on help I > get here to move things forward. I was able to verify this isn't a bug > with Git, and it's not reproducible on Linux, so I think I've isolated > it to MinGW. > > Sorry to throw a bunch of URLs at everyone. Let me know if there's > more I can do. Thanks a bunch. > Using the master branch I wrote a small `echo` utility and failed to reproduce the problem: ```c #include int main(int argc, char **argv){ for(int i = 1; i < argc; ++i){ fputs(argv[i], stdout); if(argc - i != 1){ putchar(' '); } } putchar('\n'); } ``` Running `a.exe *` in CMD printed a list of all files, but running `a.exe stash@{0}` merely prints `stash@{0}`. The globbing feature is not provided by us, but by MSVCRT. You can look into our source code to tell how we involve `__getmainargs()`, which is imported from MSVCRT and out of our control. However it does not strip braces. MSYS2's 'echo.exe' suffers from this problem, anyway: ```text C:\Users\lh_mouse>"echo.exe" stash@{-1} stash@-1 ``` But I have no idea what they did to the CRT. -- Best regards, LH_Mouse -- Check out the vibrant tech community on one of the world's most engaging tech sites, Slashdot.org! http://sdm.link/slashdot ___ Mingw-w64-public mailing list Mingw-w64-public@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/mingw-w64-public
Re: [Mingw-w64-public] sizeof long
Sorry typo: the LP64 data modell is valid for the cygwin64 toolchain. That means long is 8 bytes. 2018-04-17 17:17 GMT+02:00 Carl Kleffner: > The 64-bit compiler within cygwin64 supports the ILP64 data model, see > https://cygwin.com/cygwin-ug-net/programming.html > > 2018-04-17 17:12 GMT+02:00 Vincent Torri : > >> On Tue, Apr 17, 2018 at 4:58 PM, wrote: >> > Hi, >> > >> > Why is it that on our x86_64 compilers sizeof long is only 4 ? >> > Does it absolutely have to be that way ? Would it be possible to >> design >> > a switch that would enable 8 byte longs ? >> > >> > The mismatch between linux and windows in this regard is a real pita, >> and >> > I'm curious about the reason(s) that it exists. >> > (A link to relevant explanation would be fine.) >> >> https://msdn.microsoft.com/ro-ro/library/s3f49ktz.aspx >> https://en.wikipedia.org/wiki/64-bit_computing#64-bit_data_models >> >> Vincent Torri >> >> >> -- >> Check out the vibrant tech community on one of the world's most >> engaging tech sites, Slashdot.org! http://sdm.link/slashdot >> ___ >> Mingw-w64-public mailing list >> Mingw-w64-public@lists.sourceforge.net >> https://lists.sourceforge.net/lists/listinfo/mingw-w64-public >> > > -- Check out the vibrant tech community on one of the world's most engaging tech sites, Slashdot.org! http://sdm.link/slashdot ___ Mingw-w64-public mailing list Mingw-w64-public@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/mingw-w64-public
Re: [Mingw-w64-public] sizeof long
The 64-bit compiler within cygwin64 supports the ILP64 data model, see https://cygwin.com/cygwin-ug-net/programming.html 2018-04-17 17:12 GMT+02:00 Vincent Torri: > On Tue, Apr 17, 2018 at 4:58 PM, wrote: > > Hi, > > > > Why is it that on our x86_64 compilers sizeof long is only 4 ? > > Does it absolutely have to be that way ? Would it be possible to > design > > a switch that would enable 8 byte longs ? > > > > The mismatch between linux and windows in this regard is a real pita, and > > I'm curious about the reason(s) that it exists. > > (A link to relevant explanation would be fine.) > > https://msdn.microsoft.com/ro-ro/library/s3f49ktz.aspx > https://en.wikipedia.org/wiki/64-bit_computing#64-bit_data_models > > Vincent Torri > > > -- > Check out the vibrant tech community on one of the world's most > engaging tech sites, Slashdot.org! http://sdm.link/slashdot > ___ > Mingw-w64-public mailing list > Mingw-w64-public@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/mingw-w64-public > -- Check out the vibrant tech community on one of the world's most engaging tech sites, Slashdot.org! http://sdm.link/slashdot ___ Mingw-w64-public mailing list Mingw-w64-public@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/mingw-w64-public
Re: [Mingw-w64-public] sizeof long
On Tue, Apr 17, 2018 at 4:58 PM,wrote: > Hi, > > Why is it that on our x86_64 compilers sizeof long is only 4 ? > Does it absolutely have to be that way ? Would it be possible to design > a switch that would enable 8 byte longs ? > > The mismatch between linux and windows in this regard is a real pita, and > I'm curious about the reason(s) that it exists. > (A link to relevant explanation would be fine.) https://msdn.microsoft.com/ro-ro/library/s3f49ktz.aspx https://en.wikipedia.org/wiki/64-bit_computing#64-bit_data_models Vincent Torri -- Check out the vibrant tech community on one of the world's most engaging tech sites, Slashdot.org! http://sdm.link/slashdot ___ Mingw-w64-public mailing list Mingw-w64-public@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/mingw-w64-public
Re: [Mingw-w64-public] sizeof long
http://en.cppreference.com/w/cpp/language/types#Data_models On Tue, Apr 17, 2018 at 3:59 PMwrote: > Hi, > > Why is it that on our x86_64 compilers sizeof long is only 4 ? > Does it absolutely have to be that way ? Would it be possible to > design > a switch that would enable 8 byte longs ? > > The mismatch between linux and windows in this regard is a real pita, and > I'm curious about the reason(s) that it exists. > (A link to relevant explanation would be fine.) > > Cheers, > Rob > > > > -- > Check out the vibrant tech community on one of the world's most > engaging tech sites, Slashdot.org! http://sdm.link/slashdot > ___ > Mingw-w64-public mailing list > Mingw-w64-public@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/mingw-w64-public > -- Check out the vibrant tech community on one of the world's most engaging tech sites, Slashdot.org! http://sdm.link/slashdot ___ Mingw-w64-public mailing list Mingw-w64-public@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/mingw-w64-public
[Mingw-w64-public] sizeof long
Hi, Why is it that on our x86_64 compilers sizeof long is only 4 ? Does it absolutely have to be that way ? Would it be possible to design a switch that would enable 8 byte longs ? The mismatch between linux and windows in this regard is a real pita, and I'm curious about the reason(s) that it exists. (A link to relevant explanation would be fine.) Cheers, Rob -- Check out the vibrant tech community on one of the world's most engaging tech sites, Slashdot.org! http://sdm.link/slashdot ___ Mingw-w64-public mailing list Mingw-w64-public@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/mingw-w64-public