9fans - fans of the OS Plan 9 from Bell Labs
 help / color / mirror / Atom feed
From: "Kyohei Kadota via 9fans" <9fans@9fans.net>
To: Fans of the OS Plan 9 from Bell Labs <9fans@9fans.net>
Subject: [9fans] pcc: new option to convert implicitly between char* and uchar*
Date: Wed, 26 May 2021 05:57:54 +0900	[thread overview]
Message-ID: <CAFMepckyDA4+9onk8EwFek5ROnpitOvbZpbT0i_9n3+8Tj5KcA@mail.gmail.com> (raw)

Hi.

I'm trying to add a new option for pcc as -u to convert implicitly
between char* and uchar*.

In sources of LibreSSL Portable (actually, a lot of the sources is a
copy of a part of OpenBSD), there are many many assignments that is
uchar* to char*, or char* to uchar* without type casting. Two years
ago, because I wanted to use Git, I created a patch[^1] to compile the
sources in native Plan 9 + APE. its patch was containing many type
castings like:

    pwri_tmp = (unsigned char*)strdup((char*)pwri_pass);

[^1]: The patch in that time here.
https://github.com/libressl-portable/portable/pull/510.diff

However I realized it was hard to update the patch continuously with
tracking changes of sources of LibreSSL. So I'm trying to add the -u
option to pcc.
https://github.com/lufia/plan9/pull/10.diff

Do you have any good ideas for this?

------------------------------------------
9fans: 9fans
Permalink: https://9fans.topicbox.com/groups/9fans/T457d94e5a0449e88-Md48e4d04ab2d959ac864eaf7
Delivery options: https://9fans.topicbox.com/groups/9fans/subscription

                 reply	other threads:[~2021-05-25 20:58 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CAFMepckyDA4+9onk8EwFek5ROnpitOvbZpbT0i_9n3+8Tj5KcA@mail.gmail.com \
    --to=9fans@9fans.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).