bugGNUstep - Bugs: bug #10791, NSLog() does not support long long...

Group
 
 

bug #10791: NSLog() does not support long long int correctly

Submitter:  Fred Kiefer <FredKiefer>
Submitted:  Sun 24 Oct 2004 06:33:24 PM UTC
   
 
Category:  Base/Foundation Severity:  2 - Minor
Item Group:  Bug Status:  Fixed
Privacy:  Public Assigned to:  CaS
Open/Closed:  Closed
* Mandatory Fields

Add a New Comment Rich Markup
   

Mon 01 Nov 2004 01:21:21 PM UTC, comment #4: 

That black magic of moving the include statements did the trick! The long long number is now outputed correctly on my system.

Thank you!

Fred Kiefer <FredKiefer>
Group Member
Mon 01 Nov 2004 08:27:04 AM UTC, comment #3: 

I have tried moving around the order of including headers in GSFormat.m to
exactly mirror the way it's done in the autoconf tests ...
hopefully this will fix things on your system (as you report that the autoconf test produces the correct result).

Richard Frith-Macdonald <CaS>
Group Member
Sun 31 Oct 2004 05:53:13 PM UTC, comment #2: 

I also think that it is a system specific problem, but not that easy this time. It used to be the case that LONG_LONG_MAX was not found on SuSE systems, but we already corrected this and config.log correctly reports that it is found (LLONG_MAX isn't found).
In config.h I see the line:
#define HANDLE_LONG_LONG_MAX 1

We need another idea, what may go wrong here. Or perhaps this constant is found in the confic code, beacuse we use
#define _GNU_SOURCE
and a similar line is missing, when the constant gets used? But than the compiler should complain about a missing definition. No, just checked GSFormat.m has this define as well.



Fred Kiefer <FredKiefer>
Group Member
Sun 31 Oct 2004 10:01:40 AM UTC, comment #1: 

I'm afraid this looks like a system specific problem.

I thing the configure.ac and/or the code in GSFormat.m is failing to find a definition of LONG_LONG_MAX on your system for some reason.
Please could you check this ...
If I've guessed the problem correctly, and you can figure out why the define is not being found, we can include the appropriate fields or define whatever other preprocessor constants we need to have it work on suse.

Richard Frith-Macdonald <CaS>
Group Member
Sun 24 Oct 2004 06:33:24 PM UTC, original submission:  

While debugging the output of a keyed decoding conversion from binary to XML, which did not handle a long long int value correctly I noticed that NSLog() does not handle this type correctly using %lli as template. Looks like
the value gets treated as an int.
I tried the same with printf() and this gave the correct output. I am using SuSE Linux 9.1 on Intel hardware.

Fred Kiefer <FredKiefer>
Group Member

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach Files:
   
   
Comment:
   

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

CC list is empty

 

There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

Only logged-in users can vote.

 

Follow 3 latest changes.

Date Changed by Updated Field Previous Value => Replaced by
2004-11-01 FredKiefer StatusNone Fixed
    Open/ClosedOpen Closed
2004-10-31 CaS Assigned toNone CaS

Back to the top

Powered by Savane 3.13-758e.
Corresponding source code