From: | Michael Paquier <michael(at)paquier(dot)xyz> |
---|---|
To: | David Rowley <dgrowleyml(at)gmail(dot)com> |
Cc: | Alvaro Herrera <alvherre(at)alvh(dot)no-ip(dot)org>, Andres Freund <andres(at)anarazel(dot)de>, PostgreSQL Developers <pgsql-hackers(at)lists(dot)postgresql(dot)org> |
Subject: | Re: Reduce the number of special cases to build contrib modules on windows |
Date: | 2021-01-12 07:18:24 |
Message-ID: | X/1NQMYTubd/G33r@paquier.xyz |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On Wed, Dec 30, 2020 at 10:07:29AM +1300, David Rowley wrote:
> -#ifdef LOWER_NODE
> +/*
> + * Below we ignore the fact that LOWER_NODE is defined when compiling with
> + * MSVC. The reason for this is that earlier versions of the MSVC build
> + * scripts failed to define LOWER_NODE. More recent version of the MSVC
> + * build scripts parse makefiles which results in LOWER_NODE now being
> + * defined. We check for _MSC_VER here so as not to break pg_upgrade when
> + * upgrading from versions MSVC versions where LOWER_NODE was not defined.
> + */
> +#if defined(LOWER_NODE) && !defined(_MSC_VER)
> #include <ctype.h>
> #define TOLOWER(x) tolower((unsigned char) (x))
> #else
While on it, do you think that it would be more readable if we remove
completely LOWER_NODE and use only a check based on _MSC_VER for those
two files in ltree? This could also be handled as a separate change.
> + foreach my $line (split /\n/, $mf)
> + {
> + if ($line =~ /^[A-Za-z0-9_]*\.o:\s(.*)/)
> + {
> + foreach my $file (split /\s+/, $1)
> + {
> + foreach my $proj (@projects)
> + {
> + $proj->AddFileConditional("$subdir/$n/$file");
> + }
> + }
> + }
> + }
Looking closer at this change, I don't think that this is completely
correct and that could become a trap. This is adding quite a bit of
complexity to take care of contrib_extrasource getting empty, and it
actually overlaps with the handling of OBJS done in AddDir(), no?
--
Michael
From | Date | Subject | |
---|---|---|---|
Next Message | Michael Paquier | 2021-01-12 07:21:18 | Re: Fix a typo in SearchCatCache function comment |
Previous Message | osumi.takamichi@fujitsu.com | 2021-01-12 07:09:28 | RE: Disable WAL logging to speed up data loading |