Re: BUG #18219: libpq does not take into consideration UNICODE define
| От | Thomas Munro |
|---|---|
| Тема | Re: BUG #18219: libpq does not take into consideration UNICODE define |
| Дата | |
| Msg-id | CA+hUKGJPn7+Uxz2Y5o=O6+1Hwmg7e272onsnzhODmDc0vJggUg@mail.gmail.com обсуждение исходный текст |
| Ответ на | BUG #18219: libpq does not take into consideration UNICODE define (PG Bug reporting form <noreply@postgresql.org>) |
| Ответы |
Re: BUG #18219: libpq does not take into consideration UNICODE define
Re: BUG #18219: libpq does not take into consideration UNICODE define |
| Список | pgsql-bugs |
On Fri, Dec 1, 2023 at 10:10 AM Jan Březina <2janbrezina@gmail.com> wrote: > I defined UNICODE for the whole project and it's propagated also to the dependencies. Vcpkg is just the package manager.You can see it's port in the public repository: https://github.com/Microsoft/vcpkg/blob/master/ports/libpq/portfile.cmake I see. Well, generally speaking PostgreSQL just isn't going to work if some external thing #defines a bunch of stuff that changes the meaning of system headers. For example on Unix systems there are various headers that will tell some systems to use various ancient standards instead of the modern POSIX semantics, and if you #define those, surprise!, PostgreSQL will not work. But I'm not a Windows person so I have no real opinion on whether that particular thing would be reasonably expected to work and is something that people typically go around doing. What would you suggest? Should we explicitly #undef it, is that what people do? My guess is that there is 0% chance that we'll ever modify our OWN behaviour due to UNICODE (that is, our C functions are not going to have a wchar_t version that UNICODE silently selects that you can call, you'll always have to talk to our code with char strings AFAICS), but as for how our own .c files internally talk to the system headers, that's kinda private to our source tree, so I guess it would at least be theoretically possible for us to nail that down with a well placed #undef. I just don't know how sensible or typical that would be.
В списке pgsql-bugs по дате отправления: