edbrowse-dev - development list for edbrowse
 help / color / mirror / Atom feed
From: Paul Onyschuk <ptmelville@gmail.com>
To: Edbrowse-dev@lists.the-brannons.com
Subject: Re: [Edbrowse-dev] Using C99?
Date: Thu, 7 Aug 2014 12:49:34 +0200	[thread overview]
Message-ID: <20140807124934.fe7553a73d3b4b800caf39f3@gmail.com> (raw)
In-Reply-To: <20140807103036.GA2499@toaster.adamthompson.me.uk>

On Thu, 7 Aug 2014 11:30:36 +0100
Adam Thompson wrote:

> Perhaps, though as ms aren't updating C support any more I'm not sure
> about the idea of targeting vs. At the end of the day mingw or sigwin
> are probably better targets for Windows porting in my opinion.

A lot of software is doing that already.  Some IDEs for Windows like
Code::Blocks are targeting mingw by default, since GCC is on-part if
not better than compilers provided by Microsoft.

> As for the move to C++, I think if we allow ourselves to use the
> extensions provided by C99 and other common non-standard extensions
> (e.g. asprintf), we can get many of the benefits of such a move
> without the massive rewrite.

asprintf() is definitly nice to have if you looking for string
manipulation with dynamic allocation.

snprintf() returns the number of characters that would have been output
if the size were unlimited, so that truncation can be detected.  This
way buffer overflows can be detected and prevented compared to strcat()
and strcpy().
 
> That's a good point, I'll have a look into this as I've got an
> up-to-date mac system at home.
> Perhaps I may even be able to put together a homebrew package as well,
> but first I need to work out if smjs will compile and is packaged for
> this to happen.

Mac OS X shouldn't be a problem.  What differs is location of includes
and libraries for linking.  Their libc isn't so modern, but I wouldn't
worry about it. Beside that default compiler is Clang.

-- 
Paul Onyschuk

  reply	other threads:[~2014-08-07 10:50 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-08-06 20:45 Karl Dahlke
2014-08-07 10:30 ` Adam Thompson
2014-08-07 10:49   ` Paul Onyschuk [this message]
2014-08-07 15:37     ` Adam Thompson
  -- strict thread matches above, loose matches on Subject: below --
2014-08-06 18:05 Paul Onyschuk

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=20140807124934.fe7553a73d3b4b800caf39f3@gmail.com \
    --to=ptmelville@gmail.com \
    --cc=Edbrowse-dev@lists.the-brannons.com \
    /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).