(
Jump to the original submission)
Tue 07 Apr 2015 11:52:32 AM UTC, comment #10:
Pushed http://hg.octave.org/mxe-octave/rev/d7b2bb282421
|
Mon 06 Apr 2015 02:10:51 PM UTC, comment #9:
I believe I found the issue in mingw-w64 and have submitted a patch to mingw-w64. [1]
In the mean time, I will probally add a patch to mxe-octave when compiling mingw-w64.
[1] http://sourceforge.net/p/mingw-w64/mailman/message/33732797/
|
Sat 04 Apr 2015 06:53:08 PM UTC, comment #8:
Someone can report the bug upstream to gnulib. For Octave, marking this as 'Won't Fix" and closing.
|
Sat 04 Apr 2015 06:36:02 PM UTC, comment #7:
I think we should just report the problem to the gnulib maintainers and let them decide whether they want to try to provide a workaround for it. It makes sense for the fix to go in gnulib since that's the whole purpose of gnulib. But they may not be particularly interested in mingw-w64.
|
Sat 04 Apr 2015 03:55:54 PM UTC, comment #6:
Do we need to do anything at all? Or can we mark this as an upstream bug?
|
Fri 03 Apr 2015 11:39:44 PM UTC, comment #5:
If we decide to try to work around this problem, then it seems like something that should be done in gnulib, not directly in Octave.
|
Fri 03 Apr 2015 03:00:19 PM UTC, comment #4:
An report issue with mingw-w64 printf:
http://sourceforge.net/p/mingw-w64/bugs/362/
|
Fri 03 Apr 2015 02:07:53 PM UTC, comment #3:
Creating a small c++ program:
With define _GNU_SOURCE, in Linux prints 3 characters, in windows prints 2.
With the undef, prints 3 characters for both Linux and windows.
|
Fri 03 Apr 2015 12:15:52 PM UTC, comment #2:
I see the same on my windows build - cant remember what hg id it was, but am building a new one now to verify it is still an issue.
|
Fri 03 Apr 2015 09:40:00 AM UTC, comment #1:
works fine with rc2
hg id
cf9b94a89620 tip
>> sprintf('%03g', 20)
ans = 020
>> sprintf('%03g', 30)
ans = 030
|
Fri 03 Apr 2015 03:08:31 AM UTC, original submission:
sprintf('%03g', 1)
ans = 001
sprintf('%03g', 20) % only 2-char for 10, 20, 30 etc
ans = 20
sprintf('%03g', 21)
ans = 021
The same problem exists for printf and fprintf.
sprintf('%03.0f', 20) % work fine
ans = 020
I tested this under Windows only, so don't know the behavior under Linux.
|
(Note: upload size limit is set to 16384 kB, after insertion of the required
escape characters.)
Attach File(s):
Comment:
No files currently attached
Depends on the following items: None found
Items that depend on this one: None found
Follow 3 latest changes.