[TRE-general] Bug in TRE 0.7.5: Undefined HAVE_MBSTATE_T strips essential declaration
Sebastian Pipping
webmaster at hartwork.org
Fri Mar 23 03:33:48 EET 2007
Ville Laurikari wrote:
> Actually, the HAVE_MBSTATE_T and HAVE_MBRTOWC macros aren't
> orthogonal. If HAVE_MBRTOWC is defined, then HAVE_MBSTATE_T must also
> be defined. This is admittedly not very clean and certainly not
> documented anywhere. Anyway, this has the effect that if
> HAVE_MBSTATE_T is not defined, then tre_mbrtowc will ignore its last
> argument. You can confirm this by reading the definition for
> tre_mbrtowc in tre-internal.h.
-------------------------------------------------------------------
If they are not independent I suggest also adding checks
and #error for that.
-------------------------------------------------------------------
> From your posts I'm guessing you're porting TRE to a system which is
> not UNIX-like (otherwise you could just run the configure script) and
> not Windows either (you could then just use the win32/tre.dsw project
> file). Or, you're porting it for Windows and you're just not using
> Visual Studio.
-------------------------------------------------------------------
I'm not porting it, I was just playing around with the input
callback feature which in my eyes is the best thing in TRE
over all. I used Code::Blocks and MinGW for that and since
the project files started at zero I stumbled upon the
definition problems.
Btw I tried to build with the VC60 project files using VS2k3
on another machine and that resulted in non-executable code
because of that explicit runtime lib thing you set up.
Sebastian
More information about the TRE-general
mailing list