From patchwork Wed May 26 12:49:19 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Selva Nair X-Patchwork-Id: 1839 Return-Path: Delivered-To: patchwork@openvpn.net Delivered-To: patchwork@openvpn.net Received: from director14.mail.ord1d.rsapps.net ([172.31.255.6]) by backend30.mail.ord1d.rsapps.net with LMTP id kH9mEcLQrmAKbAAAIUCqbw (envelope-from ) for ; Wed, 26 May 2021 18:50:42 -0400 Received: from proxy9.mail.iad3b.rsapps.net ([172.31.255.6]) by director14.mail.ord1d.rsapps.net with LMTP id iK4SEcLQrmDDHQAAeJ7fFg (envelope-from ) for ; Wed, 26 May 2021 18:50:42 -0400 Received: from smtp34.gate.iad3b ([172.31.255.6]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) by proxy9.mail.iad3b.rsapps.net with LMTPS id KJPhCMLQrmDeDgAAC4PSzw (envelope-from ) for ; Wed, 26 May 2021 18:50:42 -0400 X-Spam-Threshold: 95 X-Spam-Score: 0 X-Spam-Flag: NO X-Virus-Scanned: OK X-Orig-To: openvpnslackdevel@openvpn.net X-Originating-Ip: [216.105.38.7] Authentication-Results: smtp34.gate.iad3b.rsapps.net; iprev=pass policy.iprev="216.105.38.7"; spf=pass smtp.mailfrom="openvpn-devel-bounces@lists.sourceforge.net" smtp.helo="lists.sourceforge.net"; dkim=fail (signature verification failed) header.d=sourceforge.net; dkim=fail (signature verification failed) header.d=sf.net; dkim=fail (signature verification failed) header.d=gmail.com; dmarc=fail (p=none; dis=none) header.from=gmail.com X-Suspicious-Flag: YES X-Classification-ID: cbefbf28-be74-11eb-b148-5254005e8ddb-1-1 Received: from [216.105.38.7] ([216.105.38.7:32974] helo=lists.sourceforge.net) by smtp34.gate.iad3b.rsapps.net (envelope-from ) (ecelerity 4.2.38.62370 r(:)) with ESMTPS (cipher=DHE-RSA-AES256-GCM-SHA384) id 07/A7-15191-1C0DEA06; Wed, 26 May 2021 18:50:41 -0400 Received: from [127.0.0.1] (helo=sfs-ml-4.v29.lw.sourceforge.com) by sfs-ml-4.v29.lw.sourceforge.com with esmtp (Exim 4.90_1) (envelope-from ) id 1lm2LM-0004Qd-Fl; Wed, 26 May 2021 22:49:40 +0000 Received: from [172.30.20.202] (helo=mx.sourceforge.net) by sfs-ml-4.v29.lw.sourceforge.com with esmtps (TLSv1.2:ECDHE-RSA-AES256-GCM-SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lm2LL-0004QV-HA for openvpn-devel@lists.sourceforge.net; Wed, 26 May 2021 22:49:39 +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:Message-Id: Date:Subject:Cc:To:From:Sender:Reply-To:Content-Type:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:In-Reply-To:References:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=xOMw2NKjPuPDT8TFDhPtxVq2b94137+90Irdrs9QDj0=; b=YdkeHYLd0f3CNZg72lw9AKlbEI dY2Q6sOdeF8fo395xOEr6Z5GFc90o84YTdDMT4xEmwgMiwOLVdez1nRJ8OGJKmcpJOuXhs52/3+rI MmAl3hHTId6cBRLHE1EynQvvaCuBfJZE+BI1o9pXunpA1JvC2SCB6rIsCda+br4eGp7k=; DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=sf.net; s=x ; h=Content-Transfer-Encoding:MIME-Version:Message-Id:Date:Subject:Cc:To:From :Sender:Reply-To:Content-Type:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To: References:List-Id:List-Help:List-Unsubscribe:List-Subscribe:List-Post: List-Owner:List-Archive; bh=xOMw2NKjPuPDT8TFDhPtxVq2b94137+90Irdrs9QDj0=; b=M 5wjegxDHbxN0hUJc8aQnjCneXcyGbbcCmnuzCTsCVkQcMTGhoHHB3yuYKsahyBst7F+HI9LlwpMo9 4GlGn4z1vzjFIZwPjQaHWabDqDCboRJWkzWrqkQ4RuSLhpo3qUitMsNCX7O1hq6A0p5YszAXA0Jyk KOtwDWmBgoQ7sioc=; Received: from mail-il1-f170.google.com ([209.85.166.170]) by sfi-mx-1.v28.lw.sourceforge.com with esmtps (TLSv1.2:ECDHE-RSA-AES128-GCM-SHA256:128) (Exim 4.92.2) id 1lm2LA-0071X1-9v for openvpn-devel@lists.sourceforge.net; Wed, 26 May 2021 22:49:42 +0000 Received: by mail-il1-f170.google.com with SMTP id b5so2371098ilc.12 for ; Wed, 26 May 2021 15:49:28 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=xOMw2NKjPuPDT8TFDhPtxVq2b94137+90Irdrs9QDj0=; b=ghTyqCsGtIgrRzrLSGF9vXxOUVSSJpid6p/wgGhHFIpudi7rC+VNaRKw3yMjw/2Pvf kI7WEZxmAmyVy41Zth1SQmZkTM8rfdgItAo8vQI4y8uFiloZ6Rt8BbiKBDIRD8t3NM6Q NwAJ0i0EptXyQgHMjDq+yzWwJw9dZt2b8fmeEwtQ+B/DzLSDEbZvCrlncsO1EPteSmLh 99XZUddRkJ/Mc8kMsZbsu5AS3usLQY4kWHwGzfMyd9BQyRXh9ZxbORngwDTL+zwqk11P 21Yd6qg/XRGeBfe1mMWlcm0EaMBGqmx0EXPpp0/UfVhfBDIfnqS0AMebRLyYR+7VQHMd HwkQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=xOMw2NKjPuPDT8TFDhPtxVq2b94137+90Irdrs9QDj0=; b=fe5D9l5Xfsipwyz2TdW/rJy6/k0I4LjzkP+RCe7fsb/TawpoC23OdCFHKbn+5VVvPi SwpyC4I+bw2rvhKCRwwhyPdl1zQry9fvJAV2kI3ZdnmYs0AKDLbLEBSjYzi5IMMhUPlO bRO3+n1yZtwwRmfvMlagpXsl+KIcFWU9m0kd0+hiH+tCIanJgsZ/M/ySvOH8rtsvOhNd +jRPuqHMF+pW3IPwJm6U9RZc9bOebrwbWsODJq8hj0BYL8aLtdF11Oax7OlJsw/y+nGX Ith6iXIr0mgGp3zppBgjLnffIHgbnDIRS7zURm5fDsKMdHS8kGgvrMZvOozEtH01lASI AYug== X-Gm-Message-State: AOAM533ULMdOzd0mTHkBjFIbG3zyjhSGLxCnarINTWmmREh/4d9R+9FM WAaboKo7VRj8tz/bpeey2dP6fZI+TDhDYg== X-Google-Smtp-Source: ABdhPJyvS1/SEIYWBKfi4gAAIsISpDjoR54bFXcj1Bt1vlictxROQ5I0tcw0Jr2d0+uUhPYbtg6tYw== X-Received: by 2002:a92:c794:: with SMTP id c20mr503199ilk.288.1622069362414; Wed, 26 May 2021 15:49:22 -0700 (PDT) Received: from uranus.home.sansel.ca (bras-vprn-tnhlon4053w-lp130-01-70-51-222-236.dsl.bell.ca. [70.51.222.236]) by smtp.gmail.com with ESMTPSA id z21sm186465ioj.15.2021.05.26.15.49.21 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 26 May 2021 15:49:22 -0700 (PDT) From: selva.nair@gmail.com To: openvpn-devel@lists.sourceforge.net Date: Wed, 26 May 2021 18:49:19 -0400 Message-Id: <20210526224919.511-1-selva.nair@gmail.com> X-Mailer: git-send-email 2.20.1 MIME-Version: 1.0 X-Spam-Report: Spam Filtering performed by mx.sourceforge.net. See http://spamassassin.org/tag/ for more details. 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider (selva.nair[at]gmail.com) -0.0 SPF_PASS SPF: sender matches SPF record 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at https://www.dnswl.org/, no trust [209.85.166.170 listed in list.dnswl.org] -0.0 RCVD_IN_MSPIKE_H2 RBL: Average reputation (+2) [209.85.166.170 listed in wl.mailspike.net] -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid X-Headers-End: 1lm2LA-0071X1-9v Subject: [Openvpn-devel] [PATCH] Replace TEXT(__FUNCTION__) by __FUNCTION__ in openvpnmscia.c 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 From: Selva Nair TEXT(__FUNCTION__) does not work in mingw as __FUNCTION__ is not a macro. Instead, use __FUNCTION__ as a narrow string in both UNICODE and ANSI builds. Signed-off-by: Selva Nair Acked-by: Lev Stipakov --- src/openvpnmsica/openvpnmsica.c | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/src/openvpnmsica/openvpnmsica.c b/src/openvpnmsica/openvpnmsica.c index 5eb2f3c8..977f6813 100644 --- a/src/openvpnmsica/openvpnmsica.c +++ b/src/openvpnmsica/openvpnmsica.c @@ -102,13 +102,13 @@ setup_sequence( * title. */ static void -_debug_popup(_In_z_ LPCTSTR szFunctionName) +_debug_popup(_In_z_ LPCSTR szFunctionName) { TCHAR szTitle[0x100], szMessage[0x100+MAX_PATH], szProcessPath[MAX_PATH]; /* Compose pop-up title. The dialog title will contain function name to ease the process * locating. Mind that Visual Studio displays window titles on the process list. */ - _stprintf_s(szTitle, _countof(szTitle), TEXT("%") TEXT(PRIsLPTSTR) TEXT("v%") TEXT(PRIsLPTSTR), + _stprintf_s(szTitle, _countof(szTitle), TEXT("%hs v%") TEXT(PRIsLPTSTR), szFunctionName, TEXT(PACKAGE_VERSION)); /* Get process name. */ @@ -119,8 +119,8 @@ _debug_popup(_In_z_ LPCTSTR szFunctionName) /* Compose the pop-up message. */ _stprintf_s( szMessage, _countof(szMessage), - TEXT("The %") TEXT(PRIsLPTSTR) TEXT(" process (PID: %u) has started to execute the %") - TEXT(PRIsLPTSTR) TEXT(" custom action.\r\n") + TEXT("The %") TEXT(PRIsLPTSTR) TEXT(" process (PID: %u) has started to execute the %hs") + TEXT(" custom action.\r\n") TEXT("\r\n") TEXT("If you would like to debug the custom action, attach a debugger to this process and set breakpoints before dismissing this dialog.\r\n") TEXT("\r\n") @@ -407,7 +407,7 @@ FindSystemInfo(_In_ MSIHANDLE hInstall) #pragma comment(linker, DLLEXP_EXPORT) #endif - debug_popup(TEXT(__FUNCTION__)); + debug_popup(__FUNCTION__); BOOL bIsCoInitialized = SUCCEEDED(CoInitialize(NULL)); @@ -441,7 +441,7 @@ CloseOpenVPNGUI(_In_ MSIHANDLE hInstall) #endif UNREFERENCED_PARAMETER(hInstall); /* This CA is does not interact with MSI session (report errors, access properties, tables, etc.). */ - debug_popup(TEXT(__FUNCTION__)); + debug_popup(__FUNCTION__); /* Find OpenVPN GUI window. */ HWND hWnd = FindWindow(TEXT("OpenVPN-GUI"), NULL); @@ -463,7 +463,7 @@ StartOpenVPNGUI(_In_ MSIHANDLE hInstall) #pragma comment(linker, DLLEXP_EXPORT) #endif - debug_popup(TEXT(__FUNCTION__)); + debug_popup(__FUNCTION__); UINT uiResult; BOOL bIsCoInitialized = SUCCEEDED(CoInitialize(NULL)); @@ -736,7 +736,7 @@ EvaluateTUNTAPAdapters(_In_ MSIHANDLE hInstall) #pragma comment(linker, DLLEXP_EXPORT) #endif - debug_popup(TEXT(__FUNCTION__)); + debug_popup(__FUNCTION__); UINT uiResult; BOOL bIsCoInitialized = SUCCEEDED(CoInitialize(NULL)); @@ -1065,7 +1065,7 @@ ProcessDeferredAction(_In_ MSIHANDLE hInstall) #pragma comment(linker, DLLEXP_EXPORT) #endif - debug_popup(TEXT(__FUNCTION__)); + debug_popup(__FUNCTION__); UINT uiResult; BOOL bIsCoInitialized = SUCCEEDED(CoInitialize(NULL)); @@ -1265,7 +1265,7 @@ CheckAndScheduleReboot(_In_ MSIHANDLE hInstall) #pragma comment(linker, DLLEXP_EXPORT) #endif - debug_popup(TEXT(__FUNCTION__)); + debug_popup(__FUNCTION__); UINT ret = ERROR_SUCCESS; BOOL bIsCoInitialized = SUCCEEDED(CoInitialize(NULL));