From patchwork Tue Jan 16 13:18:31 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Gert Doering X-Patchwork-Id: 3569 Return-Path: Delivered-To: patchwork@openvpn.net Received: by 2002:a05:7300:a213:b0:100:d2e5:60d with SMTP id bs19csp4177483dyb; Tue, 16 Jan 2024 05:19:17 -0800 (PST) X-Google-Smtp-Source: AGHT+IGcbnK8hjUNXypN7217BlNIDLR/kxZQlBPb2ezgb3M1+XXieL31H+r8t3t9YlQ50qjRaMma X-Received: by 2002:a05:6a00:939d:b0:6da:83a2:1d9a with SMTP id ka29-20020a056a00939d00b006da83a21d9amr15687027pfb.1.1705411157431; Tue, 16 Jan 2024 05:19:17 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1705411157; cv=none; d=google.com; s=arc-20160816; b=X7e6eRHW40TYaGs4RT3tYydr5Yis4FNb4tM4nzb2IRF5W0IQsLX4tACZBIBdxbJl6o bft7FLmcPEkoybvG3vPGRAhzoi9p9ezYQhtUAPIj6YTm9HjZzTFjhjcO6xgpcfUwkFyv WVfwO8RO0AUio+2XgDNQgCqb9jNmo7f+7muYYBE31x84vsrvFXxD4u6lxfBoEcm7/hjv kdL8Fz8Taa0jOymrzDgw6Yufj9Ilr16j1DpVNSr+eRAXbBPOZaCFetSHliUsbKADfJtD 8y+KRlo1CRVp63Cosa+wGCBQDL++mu+N3GXrnjkg+OL0b7ih7ShPQFbqZZ/kJcPdDlxC 3ekA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=errors-to:content-transfer-encoding:list-subscribe:list-help :list-post:list-archive:list-unsubscribe:list-id:precedence:subject :mime-version:references:in-reply-to:message-id:date:to:from :dkim-signature:dkim-signature; bh=geC6YfLVEJZoVcnGDrYDWQZxQ1TDhXAAc1eNAIDGv20=; fh=4NbAC/LsuMLI0S0hprUlLSLCiHwg6SCAifhH718Jh0Q=; b=fSLnS1WLWwYca5fXQBz8woSLuOgsBxXDkdm2AKtU4tpEznHSk72mVJfdaMsadk6xbP 03rZlXQCRm3Rik98Ax+/aW+ueJoaW5rNF/wCnMpTSRR/FvJHHxO9bt5Os8kZsCmlY93M NL0+UBnQyCJnnFHPznKa8TQJeiXwVg7sqtkB+gbBTYDGNuqZodzPOUTtirszS3QB2RJA M/8d/DfEuLPI/XrxWwR/NrsxPo57v+vtWGNkZEvoDQb7VPd864+lEnTyjHOkZ+MlsHGW nk35nJnCcyncpyWFjCliSf5mA++YH5FhH+nyhCfnNbxbvV6m1Rqi4rNR/atAQ2Iw1LjA lGIA== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@sourceforge.net header.s=x header.b=OwkEsiSl; dkim=neutral (body hash did not verify) header.i=@sf.net header.s=x header.b=Ac4mSvSr; spf=pass (google.com: domain of openvpn-devel-bounces@lists.sourceforge.net designates 216.105.38.7 as permitted sender) smtp.mailfrom=openvpn-devel-bounces@lists.sourceforge.net; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=muc.de Received: from lists.sourceforge.net (lists.sourceforge.net. [216.105.38.7]) by mx.google.com with ESMTPS id f1-20020a056a0022c100b006daa9f122d0si11518636pfj.332.2024.01.16.05.19.17 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Tue, 16 Jan 2024 05:19:17 -0800 (PST) Received-SPF: pass (google.com: domain of openvpn-devel-bounces@lists.sourceforge.net designates 216.105.38.7 as permitted sender) client-ip=216.105.38.7; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@sourceforge.net header.s=x header.b=OwkEsiSl; dkim=neutral (body hash did not verify) header.i=@sf.net header.s=x header.b=Ac4mSvSr; spf=pass (google.com: domain of openvpn-devel-bounces@lists.sourceforge.net designates 216.105.38.7 as permitted sender) smtp.mailfrom=openvpn-devel-bounces@lists.sourceforge.net; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=muc.de Received: from [127.0.0.1] (helo=sfs-ml-1.v29.lw.sourceforge.com) by sfs-ml-1.v29.lw.sourceforge.com with esmtp (Exim 4.95) (envelope-from ) id 1rPjL5-0008W4-TZ; Tue, 16 Jan 2024 13:18:47 +0000 Received: from [172.30.20.202] (helo=mx.sourceforge.net) by sfs-ml-1.v29.lw.sourceforge.com with esmtps (TLS1.2) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.95) (envelope-from ) id 1rPjL4-0008Vy-PK for openvpn-devel@lists.sourceforge.net; Tue, 16 Jan 2024 13:18:46 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=sourceforge.net; s=x; h=Content-Transfer-Encoding:MIME-Version:References: In-Reply-To:Message-ID:Date:Subject:To:From:Sender:Reply-To:Cc:Content-Type: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=wr/a67PSTifdT/2UL18jwAp+sbKO4YRYNTyvElTab6A=; b=OwkEsiSl9WgO9QNgj0K4W88uGt PZgbVMBf628Hgh8Omcng77srx3CShdTfhMFGSfAdaOmPopNuIJPL9T8WXD/TD8BwdaRHoYXxTk7IB yUkckVj9BlKmBcqdPDZPf/1ElMSBRYy2W029CzraIROPV68ODO+m/Ab9wjH9aaJLUstU=; DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=sf.net; s=x ; h=Content-Transfer-Encoding:MIME-Version:References:In-Reply-To:Message-ID: Date:Subject:To:From:Sender:Reply-To:Cc:Content-Type:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Id:List-Help:List-Unsubscribe:List-Subscribe: List-Post:List-Owner:List-Archive; bh=wr/a67PSTifdT/2UL18jwAp+sbKO4YRYNTyvElTab6A=; b=Ac4mSvSrt7AUdrnnAW3fvp988y OVkp3dNoeFqDvShw5QWeS5zy62V7jLxFezuhGoD2HAsRtgesBmX3qSCiB6vJLuIQgDPrHKpG4nsgo 3C3PXJ5xZ4VKp39mfiIF0EZupULmqxzQldb2o19LmaCy+j0ggwDRFP2pjRlMcbk6WMo0=; Received: from dhcp-174.greenie.muc.de ([193.149.48.174] helo=blue.greenie.muc.de) by sfi-mx-2.v28.lw.sourceforge.com with esmtps (TLS1.2:ECDHE-RSA-AES256-GCM-SHA384:256) (Exim 4.95) id 1rPjL2-0006MG-3v for openvpn-devel@lists.sourceforge.net; Tue, 16 Jan 2024 13:18:46 +0000 Received: from blue.greenie.muc.de (localhost [127.0.0.1]) by blue.greenie.muc.de (8.17.1.9/8.17.1.9) with ESMTP id 40GDIWeb031229 for ; Tue, 16 Jan 2024 14:18:32 +0100 Received: (from gert@localhost) by blue.greenie.muc.de (8.17.1.9/8.17.1.9/Submit) id 40GDIWwF031226 for openvpn-devel@lists.sourceforge.net; Tue, 16 Jan 2024 14:18:32 +0100 From: Gert Doering To: openvpn-devel@lists.sourceforge.net Date: Tue, 16 Jan 2024 14:18:31 +0100 Message-ID: <20240116131831.31217-1-gert@greenie.muc.de> X-Mailer: git-send-email 2.43.0 In-Reply-To: References: MIME-Version: 1.0 X-Spam-Score: -0.0 (/) X-Spam-Report: Spam detection software, running on the system "util-spamd-1.v13.lw.sourceforge.com", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: From: Arne Schwabe Currently we only apply the defines for windows APIs and Unicode to OpenVPN itself. We should rather treat the unit tests the same as our main binary to reduce potential differences. Content analysis details: (-0.0 points, 6.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 SPF_PASS SPF: sender matches SPF record -0.0 SPF_HELO_PASS SPF: HELO matches SPF record -0.0 T_SCC_BODY_TEXT_LINE No description available. X-Headers-End: 1rPjL2-0006MG-3v Subject: [Openvpn-devel] [PATCH v4] Use mingw compile definition also to unit tests X-BeenThere: openvpn-devel@lists.sourceforge.net X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: openvpn-devel-bounces@lists.sourceforge.net X-getmail-retrieved-from-mailbox: Inbox X-GMAIL-THRID: =?utf-8?q?1788253209679220684?= X-GMAIL-MSGID: =?utf-8?q?1788253209679220684?= From: Arne Schwabe Currently we only apply the defines for windows APIs and Unicode to OpenVPN itself. We should rather treat the unit tests the same as our main binary to reduce potential differences. Change-Id: Ie5aa643ab6190262f7c8b9e614bedb398e85859b Signed-off-by: Arne Schwabe Acked-by: Frank Lichtenheld --- This change was reviewed on Gerrit and approved by at least one developer. I request to merge it to master. Gerrit URL: https://gerrit.openvpn.net/c/openvpn/+/469 This mail reflects revision 4 of this Change. Acked-by according to Gerrit (reflected above): Frank Lichtenheld diff --git a/CMakeLists.txt b/CMakeLists.txt index bc46c27..6f370c3 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -290,6 +290,13 @@ endif () + if (MINGW) + target_compile_definitions(${target} PRIVATE + -DWIN32_LEAN_AND_MEAN + -DNTDDI_VERSION=NTDDI_VISTA -D_WIN32_WINNT=_WIN32_WINNT_VISTA + ) + endif() + # optional dependencies target_link_libraries(${target} PUBLIC $ @@ -545,11 +552,7 @@ add_library_deps(openvpn) -if (MINGW) - target_compile_options(openvpn PRIVATE - -DWIN32_LEAN_AND_MEAN - -DNTDDI_VERSION=NTDDI_VISTA -D_WIN32_WINNT=_WIN32_WINNT_VISTA - ) +if(MINGW) target_compile_options(openvpn PRIVATE -municode -UUNICODE) target_link_options(openvpn PRIVATE -municode) endif()