On 24/10/18 14:39, Selva Nair wrote:
> On Wed, Oct 24, 2018 at 6:23 AM Antonio Quartulli <a...@unstable.cc> wrote:
>>
>> Hi,
>>
>> On 23/10/18 22:51, Lev Stipakov wrote:
>>> From: Lev Stipakov <l...@openvpn.net>
>>>
>>> Commit 43a5a4f3b4e411419639c195fee8a76495fdc88e added
>>> vswprintf() call which turned to me missing in OpenBSD 4.9.
>>>
>>> Since that call is inside openvpn_swprintf() function which
>>> is only used by Windows, wrap that function info #ifdef _WIN32.
>>>
>>> Signed-off-by: Lev Stipakov <l...@openvpn.net>
>>
>> This patch introduces another ifdef, but it is enclosing a whole
>> function to prevent it from being compiled on non-windows platforms,
>> therefore I consider it "acceptable" for the time being.
>>
>> This patch fixes building openvpn on OpenBSD <= 4.9 (maybe this info
>> should be added to the commit message).
> 
> Also there is a misplaced and mismatched comment added to
> buffer.c that says
> 
> +        /* vswprintf is missing in OpenBSD 4.2 */
>          len = vswprintf(str, size, format, arglist);
> 
> Makes little sense in that context and why 4.2..
> That one could be removed.
I'd say we should have such a reference in right below the #ifdef _WIN32 a few
lines higher up.  And it could be slightly more informative (and should
reference OpenBSD 4.9, which is the distro exploding without this patch.

Primary reason for this message is to explain why we do not provide this
function to "everyone", if someone has a use case for it later on in a
non-Windows code path.  If this is needed elsewhere, we at least know
instantly what might break and we can evaluate if it's worth keeping OpenBSD
4.9 support.

I suggest the comment below the #ifdef _WIN32 to be something like:

/*
 * openvpn_swprintf() is currently only used by Windows code paths
 * and when enabled for all platforms it will currently break
 * OpenBSD 4.9 which lacks vswprintf(3) support in its libc.
 */


-- 
kind regards,

David Sommerseth
OpenVPN Inc


Attachment: signature.asc
Description: OpenPGP digital signature

_______________________________________________
Openvpn-devel mailing list
Openvpn-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/openvpn-devel

Reply via email to