From patchwork Tue Mar 18 17:50:29 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Gert Doering X-Patchwork-Id: 4186 Return-Path: Delivered-To: patchwork@openvpn.net Received: by 2002:a05:7000:7046:b0:60a:d70a:d3c7 with SMTP id t6csp2984029mat; Tue, 18 Mar 2025 10:51:02 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCVAoBuvGjn+xW6p2CPJOy+Esm/JK8FSJtLzdiLxlNYpCMBMefsps8MJmxOrrdFsiQpR6EUvh1DZrT4=@openvpn.net X-Google-Smtp-Source: AGHT+IEpSOYuSOIMweEMJk5V0EVA30LY74mGIZibi++bY4bnlWsDKIJRu5FqIs+8WfDyMsKBofy8 X-Received: by 2002:a05:6870:e0d3:b0:2c1:5fcd:acc5 with SMTP id 586e51a60fabf-2c690f87b20mr9855805fac.10.1742320262281; Tue, 18 Mar 2025 10:51:02 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1742320262; cv=none; d=google.com; s=arc-20240605; b=SJhIpAHOx5hj9mWJCzjH+apwqjxET/ke6/1EYAf2/8iUtlrZm/jp6yOGmJwbF+d5/b 7uM/qLMLwLwIRVLdU3QXRjL/dted9nP6x6vg+kvIrrzQR6qUoZYiCvNj1HS7f+crlUy6 xSEVTp3tzVdIgpkh7b0g+8D+B2b6gX4pGVjKUimhi88wGs99lPpcaRtnEMWEO2wYQ/5F b2a6cchjUvfN74509riUQICPXsIbg4BxbYhoML8fMRITT6BAvhT+sUWgOxiEuwKGt0EE Kjf/E7r1VUG606+le8ZAYtOJy+tIpVgQHBGRsZgJfTYCQOAqcg0q9NHCsXrzmOkxwcXS 8j6Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; 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=4zBYd6AUpD5lhCIlkPHeIdCviMEBBUQ7QnmOjHtWyBI=; fh=4NbAC/LsuMLI0S0hprUlLSLCiHwg6SCAifhH718Jh0Q=; b=YDn3EfQ1tzT/PYK2kSl+/Pr4pwzz8Gu22aJE4fANBOpBDmZFa6XvgDpQQNbBmtd5AD 32kuPBcswc+j19SbD2o80bvVKn697+PNLQ4bEfPiokeyZUheMki8MedXr4qXuDuQILAu qyumT8rH4Sevyr7uSAXTsEWIPK41Mjitb+Uf2rFRqsdkB5w5XiX/j78cBfjabb21sWPy 2BH3PRnVbh9Qohwl+gmBX9ohnEAkQH3Wrc6xYu7Dq99scNGSNAwgBHY2mVdnPkltgWYv QR4rydflEGg8hZBsptp59ymm+QLnVe2IM6mEv4tPvXUSazp4Vea01til3AfbglXjONKI UHkg==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@sourceforge.net header.s=x header.b="TVeY/udk"; dkim=neutral (body hash did not verify) header.i=@sf.net header.s=x header.b=Ku8iDM6O; 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 586e51a60fabf-2c67127794fsi7600376fac.151.2025.03.18.10.51.01 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Tue, 18 Mar 2025 10:51:02 -0700 (PDT) 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="TVeY/udk"; dkim=neutral (body hash did not verify) header.i=@sf.net header.s=x header.b=Ku8iDM6O; 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-3.v29.lw.sourceforge.com) by sfs-ml-3.v29.lw.sourceforge.com with esmtp (Exim 4.95) (envelope-from ) id 1tub5g-0002PH-PP; Tue, 18 Mar 2025 17:51:00 +0000 Received: from [172.30.29.66] (helo=mx.sourceforge.net) by sfs-ml-3.v29.lw.sourceforge.com with esmtps (TLS1.2) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.95) (envelope-from ) id 1tub5g-0002PB-0Z for openvpn-devel@lists.sourceforge.net; Tue, 18 Mar 2025 17:50:59 +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=f2sNLk16/pr8KizR2W96arxb/YxOzthEAI3ra8wNCEc=; b=TVeY/udkZEn+colZQJcop0A0i2 ikR60WBw/xCTxF06PDRwPVDDCZUVc/BaH20p2BemtgND4YxtkmIiRIeUZNB6gjC5WccLOk53RYPlp QncHeUyo1vOpi8VlbnBt5bwLIO1Z9Q/RLHWf/aDW6MO4ktreuPYIEmpmRmP+SIO8Z1m8=; 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=f2sNLk16/pr8KizR2W96arxb/YxOzthEAI3ra8wNCEc=; b=Ku8iDM6OzxECJXsn+be0fmah+n C1CYTStZEgA7c+tmzhJ5ZRDIgGDSnQ3dugo16tjpIGPI5A3KbyI5g1ir/pIg9vtZbsl5TDqxS3IkU 1LbLpLmIyCfsxaz2w5s22GbyUJCtfWU1dqahng6vOtomAFFFI5osV4+MimDUcC7GtULk=; 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 1tub5U-0004F0-79 for openvpn-devel@lists.sourceforge.net; Tue, 18 Mar 2025 17:50:59 +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 52IHoajo026688 for ; Tue, 18 Mar 2025 18:50:36 +0100 Received: (from gert@localhost) by blue.greenie.muc.de (8.17.1.9/8.17.1.9/Submit) id 52IHoa1a026687 for openvpn-devel@lists.sourceforge.net; Tue, 18 Mar 2025 18:50:36 +0100 From: Gert Doering To: openvpn-devel@lists.sourceforge.net Date: Tue, 18 Mar 2025 18:50:29 +0100 Message-ID: <20250318175036.26655-1-gert@greenie.muc.de> X-Mailer: git-send-email 2.45.2 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-2.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: Frank Lichtenheld Change-Id: Ib3a166ead912beb2a591105c84d96d342664c05f Signed-off-by: Frank Lichtenheld Acked-by: Lev Stipakov --- Content analysis details: (0.0 points, 6.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 SPF_HELO_PASS SPF: HELO matches SPF record 0.0 RCVD_IN_VALIDITY_CERTIFIED_BLOCKED RBL: ADMINISTRATOR NOTICE: The query to Validity was blocked. See https://knowledge.validity.com/hc/en-us/articles/20961730681243 for more information. [193.149.48.174 listed in sa-accredit.habeas.com] 0.0 RCVD_IN_VALIDITY_RPBL_BLOCKED RBL: ADMINISTRATOR NOTICE: The query to Validity was blocked. See https://knowledge.validity.com/hc/en-us/articles/20961730681243 for more information. [193.149.48.174 listed in bl.score.senderscore.com] -0.0 SPF_PASS SPF: sender matches SPF record X-Headers-End: 1tub5U-0004F0-79 Subject: [Openvpn-devel] [PATCH v3] Post tchar.h removal cleanup 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?1826955211626617367?= X-GMAIL-MSGID: =?utf-8?q?1826955211626617367?= From: Frank Lichtenheld Change-Id: Ib3a166ead912beb2a591105c84d96d342664c05f Signed-off-by: Frank Lichtenheld Acked-by: Lev Stipakov --- 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/+/854 This mail reflects revision 3 of this Change. Acked-by according to Gerrit (reflected above): Lev Stipakov diff --git a/dev-tools/text-removal.sh b/dev-tools/text-removal.sh deleted file mode 100755 index 7b4e863..0000000 --- a/dev-tools/text-removal.sh +++ /dev/null @@ -1,51 +0,0 @@ -#!/bin/bash - -# Replace all occurences of TEXT() in our codebase -# to convert it to simpler Unicode-only code. - -set -x - -sed -i -E \ - -e 's/TEXT\(("[^"]*")\)/L\1/g' \ - -e 's/TEXT\(([^)]*)\)/L\1/g' \ - -e 's/_T\(/_L(/g' \ - -e 's/" LPRIsLPTSTR L"/ls/g' \ - -e 's/" LPRIsLPTSTR/ls"/g' \ - -e 's/LPRIsLPTSTR L"/L"ls/g' \ - -e 's/" LPRIsLPOLESTR L"/ls/g' \ - -e 's/LPRIsLPOLESTR L"/L"ls/g' \ - -e 's/" LPRIsLPOLESTR/ls"/g' \ - -e 's/" PRIsLPTSTR "/ls/g' \ - -e 's/" PRIsLPOLESTR "/ls/g' \ - -e 's/TCHAR/WCHAR/g' \ - -e 's/LPTSTR/LPWSTR/g' \ - -e 's/LPCTSTR/LPCWSTR/g' \ - -e 's/LPRIXGUID/_L(PRIXGUID)/g' \ - -e 's/LTAP_WIN_COMPONENT_ID/_L(TAP_WIN_COMPONENT_ID)/g' \ - -e 's/LPACKAGE_(VERSION|NAME)/_L(PACKAGE_\1)/g' \ - -e 's/LPACKAGE /_L(PACKAGE) /g' \ - -e 's/_tcslen/wcslen/g' \ - -e 's/_tcszlen/wcszlen/g' \ - -e 's/_tcsrchr/wcsrchr/g' \ - -e 's/_tcschr/wcschr/g' \ - -e 's/_tcsstr/wcsstr/g' \ - -e 's/_tcszistr/wcszistr/g' \ - -e 's/_tcscpy/wcscpy/g' \ - -e 's/_tcsicmp/wcsicmp/g' \ - -e 's/_tcsdup/wcsdup/g' \ - -e 's/_istspace/iswspace/g' \ - -e 's/_stprintf/swprintf/g' \ - -e 's/_ftprintf/fwprintf/g' \ - -e 's/_tmain/wmain/g' \ - -e 's/tchar\.h/wchar.h/g' \ - src/openvpnmsica/*.[ch] \ - src/openvpnserv/*.[ch] \ - src/tapctl/*.[ch] - -# manual cleanup for complicated cases -sed -i -E \ - -e 's/error 0x%x.\\n"\),/error 0x%x).\\n",/g' \ - src/tapctl/main.c -sed -i -E \ - -e 's/" is optional\\n"\),/") is optional\\n",/g' \ - src/openvpnserv/service.c diff --git a/src/openvpnserv/service.h b/src/openvpnserv/service.h index b2b706b..7112f26 100644 --- a/src/openvpnserv/service.h +++ b/src/openvpnserv/service.h @@ -24,11 +24,6 @@ #ifndef _SERVICE_H #define _SERVICE_H -/* We do not support non-unicode builds */ -#ifndef UNICODE -#define UNICODE -#endif - #ifdef HAVE_CONFIG_H #include "config.h" #endif diff --git a/src/tapctl/basic.h b/src/tapctl/basic.h index ca5c6d4..49a3cf6 100644 --- a/src/tapctl/basic.h +++ b/src/tapctl/basic.h @@ -22,13 +22,11 @@ #ifndef BASIC_H #define BASIC_H -#ifdef _UNICODE -#define PRIsLPWSTR "ls" -#define PRIsLPOLESTR "ls" -#else -#define PRIsLPWSTR "s" -#define PRIsLPOLESTR "ls" +/* We do not support non-unicode builds */ +#ifndef UNICODE +#define UNICODE #endif + #define PRIXGUID "{%08lX-%04hX-%04hX-%02hhX%02hhX-%02hhX%02hhX%02hhX%02hhX%02hhX%02hhX}" #define PRIGUID_PARAM(g) \ (g).Data1, (g).Data2, (g).Data3, (g).Data4[0], (g).Data4[1], (g).Data4[2], (g).Data4[3], (g).Data4[4], (g).Data4[5], (g).Data4[6], (g).Data4[7]