add cplusplus extern
typo in CFLAGS
curl: cherry-pick two bugfixes from upstream

From 21aafd09f6758352cf2d70cbe5cc8ea018354d63 Mon Sep 17 00:00:00 2001
From: Daniel Stenberg <daniel@haxx.se>
Date: Sun, 4 May 2014 00:50:10 +0200
Subject: [PATCH 01/16] openssl: biomem->data is not zero terminated
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

So printf(%s) on it or reading before bounds checking is wrong, fixing
it. Could previously lead to reading out of boundary.

Reported-by: Török Edwin

From 812da4190f8ac2f548f3bea09b85164b78d33347 Mon Sep 17 00:00:00 2001
From: Daniel Stenberg <daniel@haxx.se>
Date: Sun, 4 May 2014 23:37:24 +0200
Subject: [PATCH 05/16] mprintf: allow %.s with data not being zero terminated
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

If the precision is indeed shorter than the string, don't strlen() to
find the end because that's not how the precision operator works.

I also added a unit test for curl_msnprintf to make sure this works and
that the fix doesn't a few other basic use cases. I found a POSIX
compliance problem that I marked TODO in the unit test, and I figure we
need to add more tests in the future.

Reported-by: Török Edwin
use CERT_LIST_HEAD instead

there is only one certificate, and CERT_LIST_TAIL doesn't exist on older NSS