From: "flichtenheld (Code Review)"
Date: Wed, 8 Jan 2025 13:02:38 +0000
In-Reply-To:
References:
Reply-To: frank@...2641..., arne-openvpn@...1227...,
openvpn-devel@lists.sourceforge.net
Message-ID: <9dcb4e762549c0f6f535d728791d279eb95ecaf7-EmailReplacePatchSet-HTML@...2715...>
MIME-Version: 1.0
Content-Transfer-Encoding: 8bit
Content-Disposition: inline
Content-Type: multipart/alternative; boundary="6bgYFd6wMko="; charset=UTF-8
Subject: [Openvpn-devel] [M] Change in openvpn[master]: Post tchar.h removal
cleanup
List-Id:
List-Unsubscribe: ,
List-Archive:
List-Post:
List-Help:
List-Subscribe: ,
To: plaisthos
Cc: openvpn-devel
--6bgYFd6wMko=
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
Attention is currently required from: plaisthos.
Hello plaisthos,
I'd like you to reexamine a change. Please visit
http://gerrit.openvpn.net/c/openvpn/+/854?usp=3Demail
to look at the new patch set (#2).
Change subject: Post tchar.h removal cleanup
......................................................................
Post tchar.h removal cleanup
Change-Id: Ib3a166ead912beb2a591105c84d96d342664c05f
Signed-off-by: Frank Lichtenheld
---
D dev-tools/text-removal.sh
M src/openvpnserv/service.h
M src/tapctl/basic.h
3 files changed, 4 insertions(+), 62 deletions(-)
git pull ssh://gerrit.openvpn.net:29418/openvpn refs/changes/54/854/2
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 daa48d7..9f3c150 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%02hh=
X%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]
--
To view, visit http://gerrit.openvpn.net/c/openvpn/+/854?usp=3Demail
To unsubscribe, or for help writing mail filters, visit http://gerrit.openv=
pn.net/settings
Gerrit-Project: openvpn
Gerrit-Branch: master
Gerrit-Change-Id: Ib3a166ead912beb2a591105c84d96d342664c05f
Gerrit-Change-Number: 854
Gerrit-PatchSet: 2
Gerrit-Owner: flichtenheld
Gerrit-Reviewer: plaisthos
Gerrit-CC: openvpn-devel
Gerrit-Attention: plaisthos
Gerrit-MessageType: newpatchset
--6bgYFd6wMko=
Content-Type: text/html; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
Attention is currently required from: plaisthos.
flichtenheld uploaded patch set #2 to this change.
<=
p>View Ch=
ange
Post tchar.h removal cleanup
Change-Id: Ib3a166ead912beb2a5=
91105c84d96d342664c05f
Signed-off-by: Frank Lichtenheld <frank@...2716...=
1...>
---
D dev-tools/text-removal.sh
M src/openvpnserv/service=
.h
M src/tapctl/basic.h
3 files changed, 4 insertions(+), 62 deletion=
s(-)
git pull ssh://gerrit.openvpn.net:29418/openvpn refs/changes=
/54/854/2
diff --git a/dev-tools/text-removal.sh b/dev-tools/text-r=
emoval.sh
deleted file mode 100755
index 7b=
4e863..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/TEX=
T\(("[^"]*")\)/L\1/g' \
- -e 's/TEXT\(([^)]*)\)/L\1/g' \
- -e 's/_T\(/_L(/g' \<=
/span>
- -e 's/" LPRI=
sLPTSTR L"/ls/g' \
- -e 's/" LPRIsLPTSTR/ls"/g' \
- -e 's/LPRIsLPTSTR L"/L"ls/g&=
#39; \
- -e 's/&quo=
t; LPRIsLPOLESTR L"/ls/g' \
- -e 's/LPRIsLPOLESTR L"/L"ls/g' \- -e 's/" LPRIsLPOLEST=
R/ls"/g' \
- -=
e 's/" PRIsLPTSTR "/ls/g' \
- -e 's/" PRIsLPOLESTR "/ls/g' \=
span>
- -e 's/TCHAR/WCHAR/=
g' \
- -e 's/LP=
TSTR/LPWSTR/g' \
- =
-e 's/LPCTSTR/LPCWSTR/g' \
- -e 's/LPRIXGUID/_L(PRIXGUID)/g' \
- -e 's/LTAP_WIN_COMPONENT_ID/_L(TAP_W=
IN_COMPONENT_ID)/g' \
- -e 's/LPACKAGE_(VERSION|NAME)/_L(PACKAGE_\1)/g' \
- -e 's/LPACKAGE /_L(PAC=
KAGE) /g' \
- -e =
39;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 &=
#39;s/_tcszistr/wcszistr/g' \
- -e 's/_tcscpy/wcscpy/g' \
- -e 's/_tcsicmp/wcsicmp/g' \=
- -e 's/_tc=
sdup/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] \=
span>
- src/tapctl/*.[c=
h]
-
-# manual cleanup for complicated cases=
span>
-sed -i -E \
<=
span style=3D"color: hsl(0, 100%, 40%);">- -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&qu=
ot;,/g' \
- src/=
openvpnserv/service.c
diff --git a/src/openvpnserv/service.=
h b/src/openvpnserv/service.h
index daa48d7..9f3c150 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 */
-#ifn=
def UNICODE
-#define UN=
ICODE
-#endif
-
#ifdef HAVE_C=
ONFIG_H
#include "config.h"
#en=
dif
diff --git a/src/tapctl/basic.h b/src/tapctl/basic.h
index ca5c6d4..49a3cf6 100644
--- a/src/tapct=
l/basic.h
+++ b/src/tapctl/basic.h
@@ -22,1=
3 +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-unic=
ode builds */
+#ifnde=
f UNICODE
+#define UN=
ICODE
#endif
+
#define PRIXGUID "{%08lX-%04hX-%04h=
X-%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]
To view, visit change 854. To unsubscribe, or for help writing mail filters,=
visit settings.
Gerrit-Project: openvpn
Gerrit-Branch: master
Gerrit-Change-Id: Ib3a166ead912beb2a591105c84d=
96d342664c05f
Gerrit-Change-Number: 854
Gerrit-PatchSet: 2
Gerrit-Owner: flichtenheld <frank@...2723...=
.>
Gerrit-Reviewer: plaisthos <arne-openvpn@...1186...=
.1227...>
Gerrit-CC: openvpn-devel <openvpn-devel@...1484...=
ts.sourceforge.net>
Gerrit-Attention: plaisthos <arne-openvpn@...220...=
..1227...>
Gerrit-MessageType: newpatchset
--6bgYFd6wMko=--