#14158: zstream.cpp does not compile with zlib 1.1.4

4 views
Skip to first unread message

wxTrac

unread,
Mar 30, 2012, 5:22:29 AM3/30/12
to wx-...@googlegroups.com
Ticket URL: <http://trac.wxwidgets.org/ticket/14158>

#14158: zstream.cpp does not compile with zlib 1.1.4
---------------------------+------------------------------------------------
Reporter: aasselin | Owner:
Type: build error | Status: new
Priority: normal | Milestone:
Component: base | Version: 2.9-svn
Keywords: zlib, zstream | Blockedby:
Patch: 1 | Blocking:
---------------------------+------------------------------------------------
(I know zlib 1.1.4 is pretty old but this is the one delivered with
original Solaris 10 x86)

there was no ZLIB_VERNUM at that time, so I join a patch which extracts
the version number from ZLIB_VERSION.

btw, is it really logical to use ZLIB_VERNUM or ZLIB_VERSION, isn't the
user code more interested in the run-time version rather than the version
wx was built against?


--
Ticket URL: <http://trac.wxwidgets.org/ticket/14158>

wxTrac

unread,
Mar 30, 2012, 6:37:02 AM3/30/12
to wx-...@googlegroups.com
Ticket URL: <http://trac.wxwidgets.org/ticket/14158#comment:1>

#14158: zstream.cpp does not compile with zlib 1.1.4
---------------------------+------------------------------------------------
Reporter: aasselin | Owner:

Type: build error | Status: confirmed
Priority: normal | Milestone: 2.9.4

Component: base | Version: 2.9-svn
Keywords: zlib, zstream | Blockedby:
Patch: 1 | Blocking:
---------------------------+------------------------------------------------

Changes (by vadz):

* cc: troelsk (added)
* status: new => confirmed
* milestone: => 2.9.4


Comment:

Does this version of zlib have `ZLIB_VER_MAJOR`, `ZLIB_VER_MINOR` and
`ZLIB_VER_REVISION` or do we really have no other solution than parsing
`ZLIB_VERSION`?

And FWIW I agree that it would make more sense to use `zlibVersion()` and
then it looks like we're limited to parsing its output anyhow.

Troeslk, what do you think?


--
Ticket URL: <http://trac.wxwidgets.org/ticket/14158#comment:1>

wxTrac

unread,
Mar 30, 2012, 6:48:59 AM3/30/12
to wx-...@googlegroups.com
Ticket URL: <http://trac.wxwidgets.org/ticket/14158#comment:2>

#14158: zstream.cpp does not compile with zlib 1.1.4
---------------------------+------------------------------------------------
Reporter: aasselin | Owner:

Type: build error | Status: confirmed
Priority: normal | Milestone: 2.9.4

Component: base | Version: 2.9-svn
Keywords: zlib, zstream | Blockedby:
Patch: 1 | Blocking:
---------------------------+------------------------------------------------

Comment(by aasselin):

there is just ZLIB_VERSION


--
Ticket URL: <http://trac.wxwidgets.org/ticket/14158#comment:2>

wxTrac

unread,
Mar 30, 2012, 7:10:54 AM3/30/12
to wx-...@googlegroups.com
Ticket URL: <http://trac.wxwidgets.org/ticket/14158#comment:3>

#14158: zstream.cpp does not compile with zlib 1.1.4
---------------------------+------------------------------------------------
Reporter: aasselin | Owner:

Type: build error | Status: confirmed
Priority: normal | Milestone: 2.9.4

Component: base | Version: 2.9-svn
Keywords: zlib, zstream | Blockedby:
Patch: 1 | Blocking:
---------------------------+------------------------------------------------

Comment(by troelsk):

Runtime version seems better indeed. This works for me:

{{{
wxVersionInfo wxGetZlibVersionInfo()
{
int maj = 0, min = 0, build = 0;
sscanf(zlibVersion(), "%d.%d.%d", &maj, &min, &build);
return wxVersionInfo("zlib", maj, min, build);
}

}}}


--
Ticket URL: <http://trac.wxwidgets.org/ticket/14158#comment:3>

wxTrac

unread,
Mar 30, 2012, 8:17:00 AM3/30/12
to wx-...@googlegroups.com
Ticket URL: <http://trac.wxwidgets.org/ticket/14158#comment:4>

#14158: zstream.cpp does not compile with zlib 1.1.4

--------------------------+-------------------------------------------------
Reporter: aasselin | Owner:
Type: build error | Status: closed

Priority: normal | Milestone: 2.9.4
Component: base | Version: 2.9-svn

Resolution: fixed | Keywords: zlib, zstream
Blockedby: | Patch: 1
Blocking: |
--------------------------+-------------------------------------------------
Changes (by VZ):

* status: confirmed => closed
* resolution: => fixed


Comment:

(In [71056]) Return run-time zlib version from wxGetZlibVersionInfo().

Return the version really used instead of the version the code was
compiled
against.

Incidentally, this avoids the use of ZLIB_VERNUM not available in old
(1.1)
versions of zlib, thus fixing compilation under Solaris 10.

Closes #14158.


--
Ticket URL: <http://trac.wxwidgets.org/ticket/14158#comment:4>

wxTrac

unread,
Mar 30, 2012, 8:23:45 AM3/30/12
to wx-...@googlegroups.com
Ticket URL: <http://trac.wxwidgets.org/ticket/14158#comment:5>

#14158: zstream.cpp does not compile with zlib 1.1.4

--------------------------+-------------------------------------------------
Reporter: aasselin | Owner:

Type: build error | Status: closed
Priority: normal | Milestone: 2.9.4
Component: base | Version: 2.9-svn

Resolution: fixed | Keywords: zlib, zstream
Blockedby: | Patch: 1
Blocking: |
--------------------------+-------------------------------------------------

Comment(by troelsk):

My version, above, is flexible enough to handle a string such "1.2"
correctly, unlike yours.


--
Ticket URL: <http://trac.wxwidgets.org/ticket/14158#comment:5>

wxTrac

unread,
Mar 30, 2012, 8:30:40 AM3/30/12
to wx-...@googlegroups.com
Ticket URL: <http://trac.wxwidgets.org/ticket/14158#comment:6>

#14158: zstream.cpp does not compile with zlib 1.1.4

--------------------------+-------------------------------------------------
Reporter: aasselin | Owner:

Type: build error | Status: closed
Priority: normal | Milestone: 2.9.4
Component: base | Version: 2.9-svn

Resolution: fixed | Keywords: zlib, zstream
Blockedby: | Patch: 1
Blocking: |
--------------------------+-------------------------------------------------

Comment(by vadz):

We don't expect such strings, do we?

I think it's better to update this code when/if we notice that it doesn't
behave correctly.


--
Ticket URL: <http://trac.wxwidgets.org/ticket/14158#comment:6>

Reply all
Reply to author
Forward
0 new messages