Code::Blocks Forums

Developer forums (C::B DEVELOPMENT STRICTLY!) => Development => Topic started by: lonesock on October 27, 2005, 03:59:34 am

Title: wxCHECK_VERSION vs wxVERSION_NUMBER
Post by: lonesock on October 27, 2005, 03:59:34 am
Hi, All.

I've been using Code::Blocks for a while now and am extremely impressed...thanks.  So I started using the CVS version to keep up to date, but I'm still using wx version 2.4.2.  A few days ago I had something break in sdk\cbthreadpool.cpp.  The offending section was:

#if wxCHECK_VERSION(2,6,0)
    wxMilliSleep(1);
#else
    wxUSleep(1);
#endif

when I checked through the code I found something similar and used this instead:

#if wxVERSION_NUMBER < 2500
   wxUsleep(1);
#else
   wxMilliSleep(1);
#endif

and now it works just great.  I keep checking the CVS version, but it hasn't been changed as of now, so I thought I'd mention it.

Great work, everybody.

Jonathan

[edit] using MinGW 3.2.3 & 3.4 on Win2K and XP (and I have it working on Ubuntu! but haven't updated it in a while) [/edit]
Title: Re: wxCHECK_VERSION vs wxVERSION_NUMBER
Post by: thomas on October 27, 2005, 09:20:23 am
Updated in cvs. Thanks for pointing out.
Title: Re: wxCHECK_VERSION vs wxVERSION_NUMBER
Post by: mandrav on October 27, 2005, 09:41:34 am
But the problem wasn't with wxCHECK_VERSION, but rather with wxUSleep and it was fixed (i.e. changed to wxUsleep) a few hours later.
 :shock:
Title: Re: wxCHECK_VERSION vs wxVERSION_NUMBER
Post by: thomas on October 27, 2005, 09:54:51 am
Lonesock was right, though. I did a fresh checkout of HEAD and indeed, it still had wxUSleep.

Funnily, my commit does not show in viewcvs, either. If you check out, you get the correct version, though.
Does viewcvs have a delay of a couple of hours, maybe?
Title: Re: wxCHECK_VERSION vs wxVERSION_NUMBER
Post by: mandrav on October 27, 2005, 11:19:24 am
Funnily, my commit does not show in viewcvs, either. If you check out, you get the correct version, though.
Does viewcvs have a delay of a couple of hours, maybe?

Viewcvs uses anonymous cvs to access the repository, so it bears the anon-cvs lag (4-6 hours)...
Title: Re: wxCHECK_VERSION vs wxVERSION_NUMBER
Post by: thomas on October 27, 2005, 12:05:02 pm
Woah... if you commit with svn at BerliOS, you see your changes in WebSVN the next second  :shock:

What a shame SF uses cvs ;)  Όπως έστρωσες θα κοιμηθείς  :P
Title: Re: wxCHECK_VERSION vs wxVERSION_NUMBER
Post by: takeshimiya on October 27, 2005, 07:13:36 pm
I don't think CVS is at fault, but sf.net services I suppose.
Title: Re: wxCHECK_VERSION vs wxVERSION_NUMBER
Post by: TheTuxKeeper on November 04, 2005, 03:19:20 pm
This wxUSleep/wxUsleep typo is also in the RC2 sources, what makes it more difficult to build on Linux with wxGTK < 2.6.0 (for example fedora).

Is this a big enough bug to release a RC2-1 ?
That's only a thought.

Daniel
Title: Re: wxCHECK_VERSION vs wxVERSION_NUMBER
Post by: mandrav on November 04, 2005, 03:49:25 pm
An update to RC2 will be released. We 're just ironing out some bugs...