Re: VS 2015 support in src/tools/msvc
От | Michael Paquier |
---|---|
Тема | Re: VS 2015 support in src/tools/msvc |
Дата | |
Msg-id | CAB7nPqT8mfN6GoRt4WcNh8WiK==sSh3VkVonRFMzOi6oXefTQw@mail.gmail.com обсуждение исходный текст |
Ответ на | Re: VS 2015 support in src/tools/msvc (Michael Paquier <michael.paquier@gmail.com>) |
Ответы |
Re: VS 2015 support in src/tools/msvc
Re: VS 2015 support in src/tools/msvc Re: VS 2015 support in src/tools/msvc |
Список | pgsql-hackers |
On Fri, Mar 4, 2016 at 3:54 PM, Michael Paquier <michael.paquier@gmail.com> wrote: > I still need to dig into that in more details. For the time being the > patch attached is useful IMO to plug in VS 2015 with the existing > infrastructure. So if anybody has a Windows environment, feel free to > play with it and dig into those problems. I'll update this thread once > I have a more advanced status. OK, attached are a set of patches that allowed me to compile Postgres using VS2015, in more details: - 0001, as mentioned by Petr upthread, psed is removed from the core distribution of Perl in 5.22, so when installing ActivePerl it is not possible to create probes.h, and the code compilation would fail. I bumped into that so here is a patch. What I am proposing here is to replace psed by sed, sed being available in MSYS like bison and flex, so when building using MSVC the environment to set up is normally already good to go even with this additional dependency. Now, it is important to mention that probes.h is not part of a source tarball. I think that we would want probes.h to be part of a source tarball so as it would be possible to compile the code on Windows using MSVC without having to install MSYS. I haven't done that in this patch, thoughts on the matter are welcome. - 0002, which adds support for VS2015 in src/tools/scripts - 0003, to address a compilation failure that I bumped into when compiling ecpg. In src/port, TIMEZONE_GLOBAL and TZNAME_GLOBAL refer to respectively timezone and tzname, however for win32, those should be _timezone and _tzname. See here: https://msdn.microsoft.com/en-us/library/htb3tdkc.aspx - 0004, which is to address the problem of the missing lc_codepage from locale.h in src/port/. I have been pondering about the use of more fancy routines like GetLocaleInfoEx as mentioned by Petr upthread. However, I think that we had better avoid any kind of complication and just fall back to the old code path should _MSC_VER >= 1900. We could always reuse lc_codepage if it gets reintroduced in a future version of VS. This set of patches is clearly a work-in-progress, but I am at the point where feedback is welcome, and the code can compile. The issue wit psed is something I think could be backpatched a bit more than the VS2015 core patches, support for perl 5.22 happening on all the supported branches. Note that I did not bump into the stdbool issues. Note as well that VS has complained about a couple of warnings. I am attaching them in the file named VS2015_warnings.txt. Those are quite interesting as well. -- Michael
Вложения
В списке pgsql-hackers по дате отправления: