We are currently migrating Bugzilla to GitHub issues.
Any changes made to the bug tracker now will be lost, so please do not post new bugs or make changes to them.
When we're done, all bug URLs will redirect to their equivalent location on the new bug tracker.

Bug 419 - 1.2-branch iconv changes breaks compilation
Summary: 1.2-branch iconv changes breaks compilation
Status: RESOLVED FIXED
Alias: None
Product: SDL
Classification: Unclassified
Component: main (show other bugs)
Version: HG 1.2
Hardware: x86 Linux
: P2 normal
Assignee: Ryan C. Gordon
QA Contact: Sam Lantinga
URL:
Keywords:
: 407 (view as bug list)
Depends on:
Blocks:
 
Reported: 2007-03-23 01:32 UTC by Ozkan Sezer
Modified: 2007-06-27 23:29 UTC (History)
1 user (show)

See Also:


Attachments
iconv compilation fix (1022 bytes, patch)
2007-03-23 01:33 UTC, Ozkan Sezer
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Ozkan Sezer 2007-03-23 01:32:56 UTC
The const correctness change made on feb 16 (svn: 2984)
seems to have broken the compilation of the 1.2 branch,
at least on my redhat linux 9. The problem is the second
arg of library version iconv() is not const and that
causes a compile error because the const change is done
in the header only, not in the *.c file.

Proposing the attached patch as a fix.
Comment 1 Ozkan Sezer 2007-03-23 01:33:55 UTC
Created attachment 202 [details]
iconv compilation fix
Comment 2 Ryan C. Gordon 2007-03-30 13:10:17 UTC
Fixed in svn revision #3002.

Thanks!

--ryan.

Comment 3 Ryan C. Gordon 2007-04-04 03:48:09 UTC
*** Bug 407 has been marked as a duplicate of this bug. ***
Comment 4 Sam Lantinga 2007-06-27 21:58:25 UTC
Bug 407 actually has the correct fix for this bug.  They're complaining about mismatched SDL prototypes, not mismatched iconv() prototypes.
Comment 5 Sam Lantinga 2007-06-27 23:22:23 UTC
Nevermind...
There are conflicting standards on iconv(), and the current one is char **, not const char **
I'm not sure why this is, but I'm changing the SDL version to be consistent.
For reference: http://lists.debian.org/debian-glibc/2004/05/msg00006.html
Comment 6 Sam Lantinga 2007-06-27 23:29:42 UTC
On second thought, making the parameter const is what we need for SDL's purposes (see SDL_iconv_string())
For those platforms that actually require a writable inbuf, I'm going to copy the string into stack memory.  Hopefully this won't be necessary very often.