Markus Gerwinski wrote:
Waldek Hebisch wrote:
Markus Gerwinski wrote:
does GPC have a data type that corresponds to the wchar_t data type of gcc? If not, is there an easy way to port it and make sure it always has the same size as in gcc?
AFAICS we have no corresponding type. Adding such type to GPC is trivial, the hardest thing is choosing name -- 'WideChar' would be natural choice but in Delphi 'WideChar' is different (Windows insists on 16-bit chars). Hmm, `WcharInt' ?
I think in that case I'll rather work around the wchar, just treating any `WideString' as a pointer.
That's certainly possible, if you can afford to treat it in an opaque way.
By the way, I belive that GNU autoconf have tests for size of wchar_t, so if you use autotools you should be able to define Pascal equivalent at configure time.
Wouldn't using this test mean passing its result to my units via a build argument? That's a thing I want to avoid. I want the units to be compilable with as little special arguments in the build command as possible.
FWIW, I agree, that's why I try to let the RTS do as much autoconf'ing (in other areas) as possible. And for `wchar_t', as I wrote before, we probably don't even need autoconf since the backend gives us the type already.
Frank