From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wi0-x22d.google.com (mail-wi0-x22d.google.com [IPv6:2a00:1450:400c:c05::22d]) by hurricane.the-brannons.com (Postfix) with ESMTPS id 32DC377ACF for ; Thu, 7 Aug 2014 08:38:11 -0700 (PDT) Received: by mail-wi0-f173.google.com with SMTP id f8so10916938wiw.6 for ; Thu, 07 Aug 2014 08:37:19 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=date:from:to:cc:subject:message-id:references:mime-version :content-type:content-disposition:in-reply-to:user-agent; bh=E5nVsUnxVmyLrCwYYH0vH9p9ApW+Ezf1GQrnv+lF3gs=; b=O5RsjXUugA7ej/48RAeAQ2FraY9uPSlm2DXIbOrq/mkHZrWOry78tVQuc/Spm3mdXR dNUXdEzsHN1CJMndsD664/aUxX9wor3LYnzKWjkzCqyjNYFH9vqD8wJOvWtkt3tp1iaA dyGhJFMkD3P8IEamQE3BpkIVCBdceV8MgYLJj7kQHQW4OeZpf1NB+In6rxk+qBucWPaq XQ4tOWd1th7mSlXrcfCZuqIFTCDjJ9GPCklP/JBUISHYFfIszUlKM+LMXwUJSSG1xMJ6 hAJNP7Swkae+NwuxA274vg5EFuYva/Kmw2euJ8p54Xjv9GSG3gCNTPaIxZ3cfzhRgdgN 0Avg== X-Received: by 10.194.104.97 with SMTP id gd1mr24297690wjb.77.1407425839129; Thu, 07 Aug 2014 08:37:19 -0700 (PDT) Received: from toaster.adamthompson.me.uk (toaster.adamthompson.me.uk. [2001:8b0:1142:9042::2]) by mx.google.com with ESMTPSA id y10sm679023wie.18.2014.08.07.08.37.17 for (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Thu, 07 Aug 2014 08:37:18 -0700 (PDT) Date: Thu, 7 Aug 2014 16:37:15 +0100 From: Adam Thompson To: Paul Onyschuk Message-ID: <20140807153715.GC2708@toaster.adamthompson.me.uk> References: <20140706164544.eklhad@comcast.net> <20140807103036.GA2499@toaster.adamthompson.me.uk> <20140807124934.fe7553a73d3b4b800caf39f3@gmail.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="orO6xySwJI16pVnm" Content-Disposition: inline In-Reply-To: <20140807124934.fe7553a73d3b4b800caf39f3@gmail.com> User-Agent: Mutt/1.5.23 (2014-03-12) Cc: Edbrowse-dev@lists.the-brannons.com Subject: Re: [Edbrowse-dev] Using C99? X-BeenThere: edbrowse-dev@lists.the-brannons.com X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: Edbrowse Development List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 07 Aug 2014 15:38:11 -0000 --orO6xySwJI16pVnm Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable 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: >=20 > > 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. >=20 > 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 Windo= ws 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. >=20 > 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. >=20 > 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 t= hus 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 j= ust be a case of fixing include locations and possibly compiler flags. Cheers, Adam. --orO6xySwJI16pVnm Content-Type: application/pgp-signature; name="signature.asc" Content-Description: Digital signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iQEcBAEBAgAGBQJT450rAAoJELZ22lNQBzHOccsH/0C7hwv7fxB+Y1UVFA3SuD86 4n/DGfvwtxQ6ktXUZfjM8gBa5U16kdl706seueOf/FNbydgXNCXfQulQnMCnOWDA orEwxcLbpmpzbtYgdojZCMs0RspGzh6AMoJ0VwO1lvZzGZ07lp2y4ACnVTB2BiC7 FyO45Rs7gnEmPC3UdTvwdLXnp29lW+ZdHiEyC4ZZHJwzDCchpFtOwpSVry0Av6jn 3tOvGldtqedg0JBn+wIxJbZcYQAFsO72FfsbxlWoDiXY0MRPgct/0K67KvJPuDnT CrRygCV2tj9h6i9AREXRn6PGQw2uLI+mYn7mnu5JFXjmmWoNafVtFyMSaKcIy2Q= =vHfv -----END PGP SIGNATURE----- --orO6xySwJI16pVnm--