Hi On Sat, May 29, 2021 at 5:44 AM Gert Doering <g...@greenie.muc.de> wrote: > > Hi, > > On Thu, May 27, 2021 at 11:40:59AM -0400, Selva Nair wrote: > > > (I do wonder if "support ansi builds" is really something we want, if > > > that makes the code so complicated - "always UNICODE" seems to be much > > > simpler. What is the drawback of not supporting "ansi" builds?) > > > > I prefer to write all new Windows code as unicode without any dependency on > > the defines UNICODE and _UNICODE --- i.e no TCHARs, explicit API calls, > > no _tprintfs. > > > > For old code, an easy option would be to retain the TCHARs, but assume > > we only build with UNICODE (TCHAR=WCHAR) and going forward don't care > > to support ANSI builds. As we did with the service. > > I'm not the person who writes and debugs most of the windows code, I just > see patches pass by, and some bits are "more readable" and others less > so :-) > > So my "vote" would be towards what you propose - always build unicode, > and for older code, assume (or force-#define) UNICODE. > > Plus, document this somewhere. On our styleguide page, maybe?
I have added a section named "Windows specific" to the codestyle in the wiki. Not very polished -- please take a look and feel free to pull it apart. https://community.openvpn.net/openvpn/wiki/CodeStyle#Windowsspecific Selva _______________________________________________ Openvpn-devel mailing list Openvpn-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/openvpn-devel