edbrowse-dev - development list for edbrowse
 help / color / mirror / Atom feed
From: Adam Thompson <arthompson1990@gmail.com>
To: Paul Onyschuk <ptmelville@gmail.com>
Cc: Edbrowse-dev@lists.the-brannons.com
Subject: Re: [Edbrowse-dev] Using C99?
Date: Thu, 7 Aug 2014 16:37:15 +0100	[thread overview]
Message-ID: <20140807153715.GC2708@toaster.adamthompson.me.uk> (raw)
In-Reply-To: <20140807124934.fe7553a73d3b4b800caf39f3@gmail.com>

[-- Attachment #1: Type: text/plain, Size: 2436 bytes --]

On Thu, Aug 07, 2014 at 12:49:34PM +0200, Paul Onyschuk wrote:
> 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.

Yeah, I've got a friend who uses Code::Blocks and I've compiled under Windows
using mingw before and been happy with the results.

> > 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.

Agreed, I've used it extensively in prior projects.

> 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().

Yeah, which would be useful in various parts of the code.
I also like the idea of being able to use stdbool.h.

> > 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.

The includes stuff isn't really the problem here,
it's more that I'm happy enough to maintain an edbrowse package (or formula in
homebrew speak) but not an smjs one since I'm not a Mozilla developer and thus
keeping up with the changes in smjs would probably be a large amount of work
which I simply don't have time for.

I'm definitely going to look at the osx makefile though since that should just
be a case of fixing include locations and possibly compiler flags.

Cheers,
Adam.

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 473 bytes --]

  reply	other threads:[~2014-08-07 15:38 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
2014-08-07 15:37     ` Adam Thompson [this message]
  -- 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=20140807153715.GC2708@toaster.adamthompson.me.uk \
    --to=arthompson1990@gmail.com \
    --cc=Edbrowse-dev@lists.the-brannons.com \
    --cc=ptmelville@gmail.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).