From patchwork Wed Jan 8 12:58:51 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "plaisthos (Code Review)" X-Patchwork-Id: 4038 Return-Path: Delivered-To: patchwork@openvpn.net Received: by 2002:a05:7000:1539:b0:5e7:b9eb:58e8 with SMTP id a25csp711080mar; Wed, 8 Jan 2025 04:59:14 -0800 (PST) X-Forwarded-Encrypted: i=2; AJvYcCW1qHLKG+1IS5chfAwztkRaGVDyfDALZCbXizZEwAskaq0bMDnuqp1bWr42aUQR71F33sxRF+F0O78=@openvpn.net X-Google-Smtp-Source: AGHT+IGrAgzeKUR0VIagKdgxeJgYtvUuA6/x18oaKR8aJHp7z0L9RxxVKxUALm33mYmsio5Mu0kS X-Received: by 2002:a05:6871:a50d:b0:2a3:c5fe:29b9 with SMTP id 586e51a60fabf-2aa06923007mr1286377fac.29.1736341153801; Wed, 08 Jan 2025 04:59:13 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1736341153; cv=none; d=google.com; s=arc-20240605; b=lTanDkM/cAbwLz5UXZGBrQTzI+io+YplC0tpIGCFFwPeyiWd5Y6p3T9R/NEd7gJ9Jm XowykZZujBevu0DVMm82mD4UAvRsKk/zVEb5w9A6/xMvcYZbR4CdKKOmHnQQPNgBjpBy lCvMKNIFlmF0vJ8H03N18zdOeAmEQjiJKXTYb3obZJSBEldm+WiPP85mP7pELgs9pIF9 GaKX50zjhtJ/9AiUlNuW/9K0Z0dhwdnJL+y0YERfj5uj+qy+aiAF776Vi/ScsOHSGqHx EGgKYFSuFeaHjeEOivaXo2sVaRWZds53EKpiqgdWHOt8nz7tLb71r/ICbGrnlaBhRn05 KBQA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; h=errors-to:cc:reply-to:list-subscribe:list-help:list-post :list-archive:list-unsubscribe:list-id:precedence:subject:user-agent :mime-version:message-id:references:auto-submitted:to:date:from :dkim-signature:dkim-signature:dkim-signature; bh=yUdpDdadosaZ+5PePtAfTVoM0sm449CODLTV1KV2TOY=; fh=GFP4qDxgyJ2WEPo/oeLZg3Mj4NqvY1j2nTvTt7psNwg=; b=FRJW8Tsp2kq5Ii4gYpzoSmeFqjy/++xJSU4KelIeKJqMyZbbwq320mwb2LxqIem0kM 53BGE6cRlTGNOvAE3d/ysSesfx6jn4b4DFxq5B/xz60w9YaRf5OWoJYvh8Fq0Fb7hsih BMlbQ9ZzalULBF5l2aGTAG1XDpHSTfXql0gxBe00/33qCH40B1fMabuisbBfr+A04XFU Yglxkx4btIUFEokhfJ774TrTCHwCID7Mcq15Sk82BpjYOpgmOwE/snzK25K4cw5z3qsu gbX8/4ZEQ6ucQUXHQTACUn0gek5+0WcPpxmAWAUHRLu2Oqh9iL+daRRxF1URWaltkDZR El0g==; 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=IiVJO6T3; dkim=neutral (body hash did not verify) header.i=@sf.net header.s=x header.b=VHcAK8p9; dkim=neutral (body hash did not verify) header.i=@openvpn.net header.s=google header.b=IEReb47e; 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=openvpn.net; dara=fail header.i=@openvpn.net Received: from lists.sourceforge.net (lists.sourceforge.net. [216.105.38.7]) by mx.google.com with ESMTPS id 586e51a60fabf-2a7d74fcfc1si23380622fac.93.2025.01.08.04.59.13 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Wed, 08 Jan 2025 04:59:13 -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=IiVJO6T3; dkim=neutral (body hash did not verify) header.i=@sf.net header.s=x header.b=VHcAK8p9; dkim=neutral (body hash did not verify) header.i=@openvpn.net header.s=google header.b=IEReb47e; 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=openvpn.net; dara=fail header.i=@openvpn.net 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 1tVVeN-000437-Pc; Wed, 08 Jan 2025 12:59:07 +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 1tVVeL-000430-A5 for openvpn-devel@lists.sourceforge.net; Wed, 08 Jan 2025 12:59:04 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=sourceforge.net; s=x; h=Content-Type:Content-Transfer-Encoding:MIME-Version :Message-ID:Reply-To:References:Subject:List-Unsubscribe:List-Id:Cc:To:Date: From:Sender:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:List-Help: List-Subscribe:List-Post:List-Owner:List-Archive; bh=2GYX0waANLJj0EOW6ZjVhoPYX6ehg6cZHStQelImX0I=; b=IiVJO6T3xuBhbu15fSipsZI065 QrZ1cZdDmW9p+ZtJEuRFfFe31KXFpYfzgIUAlLe9NYE2qg3uHT2catesCYQnc3gbEFmsyYfsbJeWP eVyAcM1q7+r+Fw3cyRog+TRAOuV7tlp74TSLfdcc7FgOx+nDcyDSeNXV9IFuxI7jCy6k=; DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=sf.net; s=x ; h=Content-Type:Content-Transfer-Encoding:MIME-Version:Message-ID:Reply-To: References:Subject:List-Unsubscribe:List-Id:Cc:To:Date:From:Sender:Content-ID :Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To: Resent-Cc:Resent-Message-ID:In-Reply-To:List-Help:List-Subscribe:List-Post: List-Owner:List-Archive; bh=2GYX0waANLJj0EOW6ZjVhoPYX6ehg6cZHStQelImX0I=; b=V HcAK8p95stLYsQiP/P8hUY8WXra11uip4kKlsVmsT27PIA+1MgJOpOGpc3T3/gRikRteaH6lD7qlQ wh1aJTPuwCddCwqg7NoJ0A1n7ipyjHK2HuHx4stoM5pXGS1ZfIGmGlFR9rQuG5ytIGHXC9rorBj68 gI8meACEB7yoHdms=; Received: from mail-wr1-f53.google.com ([209.85.221.53]) by sfi-mx-2.v28.lw.sourceforge.com with esmtps (TLS1.2:ECDHE-RSA-AES128-GCM-SHA256:128) (Exim 4.95) id 1tVVeJ-00020S-LW for openvpn-devel@lists.sourceforge.net; Wed, 08 Jan 2025 12:59:04 +0000 Received: by mail-wr1-f53.google.com with SMTP id ffacd0b85a97d-38637614567so7633221f8f.3 for ; Wed, 08 Jan 2025 04:59:03 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=openvpn.net; s=google; t=1736341132; x=1736945932; darn=lists.sourceforge.net; h=user-agent:content-disposition:content-transfer-encoding :mime-version:message-id:reply-to:references:subject :list-unsubscribe:list-id:auto-submitted:cc:to:date:from:from:to:cc :subject:date:message-id:reply-to; bh=2GYX0waANLJj0EOW6ZjVhoPYX6ehg6cZHStQelImX0I=; b=IEReb47ezCNirb1/ls4yLd9i6WRIDMBy7JDHbdS97hRwAbTMA8ZDlkKS+cGlMTQANJ 2di4NFy4brqpaGjAOX0g5rnjH3MmKYt6bAkRDzmd9p+c7dHwVUKZpWhp1JvJOQLXtq1m UnJuNOItWWo4+AUp2BGbGMZHSSdnhdbOZoxUG+m1yaCOdN1hL5FP6Da4W42nYbDgrph4 B1sKq95iaIBFVcgjZWJjdV3bf00bBwQdOYtySKG/U8vMa9fqPXMQ/xSMHTuuC755EamW HtcyM6a7ZUDVG8gieQpbEpTETX6cDqEW5kF+F+QRl/8ktdB58VqIAm9Q9JN0lqDMRDVW xKmQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1736341132; x=1736945932; h=user-agent:content-disposition:content-transfer-encoding :mime-version:message-id:reply-to:references:subject :list-unsubscribe:list-id:auto-submitted:cc:to:date:from :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=2GYX0waANLJj0EOW6ZjVhoPYX6ehg6cZHStQelImX0I=; b=TZ30ARiAacWGpVvZk9mvo9S8OvUCj1LAN0oXPbYy+JWBStcxDITVVYorDljtCgPI/A 9kIKRH7dlQAG4VXeHPktaC5OgntZLibsta+oD+byxS9P7Y2xOV/ln5U9iGIhtwJEdjBN /5aObLsfThOLdFK20kNmQK41wHm4geX0qSt8cSqclw7+gEZSbUv2KBXG7G4OunESqu/r HAJ7k64S9RstcngKvCGMeR8OJTNv+AUfFBHFHVWRklLJODQ4P7R3Bhd2FrrBUxGTtaZ3 N5uWKv+lLX01yS69XPsLmu7QKkXFpxRduj1/oBvuVVaqCG/v+A0mgbOzoKZGSN81BvUK cWow== X-Gm-Message-State: AOJu0YyBDdw5xr0IjFSOppUHs6T4WALWurVO1B8dY/8KYpJ6ttPuear6 lcEmd3e2l+NYh7F/aFEcbVu/DRibu6ScxNXrKeol9pEUK7s1VlccGIn5W82/fb8raZT92U7UNvs K X-Gm-Gg: ASbGncs+UKDpxZ68hYW/KhmadxUvGm3LmW3SgsqlEBLdX6vMTnFFJYA+kG3f+zOVkL/ 6QnewJ6deUpZRbuDE670buHQO+HjBtFoYP2kN2mG8UZM6nm4OicFeVliHreUfzlTukWz30PdgAI WwLDkqeXvQbcu0o2o9ANpI8lC5hoSlR1lMzHeKEPDMnlt8cwG4gvR/DErc3+mors6U4PSyqkT+O 5P3IU2sbQHOlhsVKe81e6gUOHRuy9raNWc09tzvEYIULa89U4FCaVYrvxnqyt1DRjFU9SvrBtxO qhlT6vk1mZlTmbMYdUshtAqxS7K0TJIQLf2E9hqCh/2GUjDm X-Received: by 2002:a05:6000:1fac:b0:386:41bd:53b4 with SMTP id ffacd0b85a97d-38a87313120mr1982065f8f.34.1736341131969; Wed, 08 Jan 2025 04:58:51 -0800 (PST) Received: from gerrit.openvpn.in (ec2-18-159-0-78.eu-central-1.compute.amazonaws.com. [18.159.0.78]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-436e2dc14ebsm19920975e9.17.2025.01.08.04.58.51 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 08 Jan 2025 04:58:51 -0800 (PST) From: "flichtenheld (Code Review)" X-Google-Original-From: "flichtenheld (Code Review)" X-Gerrit-PatchSet: 1 Date: Wed, 8 Jan 2025 12:58:51 +0000 To: plaisthos Auto-Submitted: auto-generated X-Gerrit-MessageType: newchange X-Gerrit-Change-Id: I4879f983ed6cc035cd6ad8d571e00eb14f9ffdc1 X-Gerrit-Change-Number: 852 X-Gerrit-Project: openvpn X-Gerrit-ChangeURL: X-Gerrit-Commit: 17833a8b094c8ca76c43ddb6c274038c1ed53c2f References: Message-ID: MIME-Version: 1.0 User-Agent: Gerrit/3.8.2 X-Spam-Score: -0.2 (/) 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: Attention is currently required from: plaisthos. Hello plaisthos, I'd like you to do a code review. Please visit Content analysis details: (-0.2 points, 6.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- 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. [209.85.221.53 listed in bl.score.senderscore.com] 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. [209.85.221.53 listed in sa-trusted.bondedsender.org] 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record -0.0 SPF_PASS SPF: sender matches SPF record -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at https://www.dnswl.org/, no trust [209.85.221.53 listed in list.dnswl.org] -0.0 RCVD_IN_MSPIKE_H2 RBL: Average reputation (+2) [209.85.221.53 listed in wl.mailspike.net] 0.0 WEIRD_PORT URI: Uses non-standard port number for HTTP 0.0 HTML_MESSAGE BODY: HTML included in message 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain -0.1 DKIM_VALID_EF Message has a valid DKIM or DK signature from envelope-from domain 0.0 T_KAM_HTML_FONT_INVALID Test for Invalidly Named or Formatted Colors in HTML X-Headers-End: 1tVVeJ-00020S-LW Subject: [Openvpn-devel] [M] Change in openvpn[master]: dev-tools/text-removal.sh: Script to remove usage of tchar.h 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: , Reply-To: frank@lichtenheld.com, arne-openvpn@rfc2549.org, openvpn-devel@lists.sourceforge.net Cc: openvpn-devel Errors-To: openvpn-devel-bounces@lists.sourceforge.net X-getmail-retrieved-from-mailbox: Inbox X-GMAIL-THRID: =?utf-8?q?1820685661618230359?= X-GMAIL-MSGID: =?utf-8?q?1820685661618230359?= X-getmail-filter-classifier: gerrit message type newchange Attention is currently required from: plaisthos. Hello plaisthos, I'd like you to do a code review. Please visit http://gerrit.openvpn.net/c/openvpn/+/852?usp=email to review the following change. Change subject: dev-tools/text-removal.sh: Script to remove usage of tchar.h ...................................................................... dev-tools/text-removal.sh: Script to remove usage of tchar.h We only support UNICODE builds anyway, so why make some part of the code pretend that they do not. The code is more readable when removing the unused compatibility layer. This script to be removed again once the conversion is completed. Change-Id: I4879f983ed6cc035cd6ad8d571e00eb14f9ffdc1 Signed-off-by: Frank Lichtenheld --- A dev-tools/text-removal.sh 1 file changed, 51 insertions(+), 0 deletions(-) git pull ssh://gerrit.openvpn.net:29418/openvpn refs/changes/52/852/1 diff --git a/dev-tools/text-removal.sh b/dev-tools/text-removal.sh new file mode 100755 index 0000000..7b4e863 --- /dev/null +++ b/dev-tools/text-removal.sh @@ -0,0 +1,51 @@ +#!/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