build: add -std=c++03 (in non C++11 mode) and -pedantic to the default CXXFLAGS

And fix the resulting warnings. The long-long-int warning is explicitly
suppressed because it's not trivial to workaround in a platform-independent
and ISO-conformant way without using C++11.

This commit also includes fix for the advisory check for C++11-enabled
compiler in common.hpp (gcc < 4.7 does not correctly define __cpluplus
macro).

Finally, when custom CXXFLAGS are specified, --with-c++11 does not force
-std=c++11 or -std=c++0x flags, but just performs mandatory checks for
std::shared_ptr and std::function.

Change-Id: Icf44627edfddd34301bd27a05882b62fcbf54329
diff --git a/src/security/security-common.hpp b/src/security/security-common.hpp
index 1bea763..67a2315 100644
--- a/src/security/security-common.hpp
+++ b/src/security/security-common.hpp
@@ -13,7 +13,7 @@
 enum KeyType {
   KEY_TYPE_RSA,
   // KEY_TYPE_DSA,
-  KEY_TYPE_AES,
+  KEY_TYPE_AES
   // KEY_TYPE_DES,
   // KEY_TYPE_RC4,
   // KEY_TYPE_RC2
@@ -24,7 +24,7 @@
   KEY_CLASS_PRIVATE,
   KEY_CLASS_SYMMETRIC
 };
-  
+
 enum DigestAlgorithm {
   // DIGEST_ALGORITHM_MD2,
   // DIGEST_ALGORITHM_MD5,
@@ -34,13 +34,13 @@
 
 enum EncryptMode {
   ENCRYPT_MODE_DEFAULT,
-  ENCRYPT_MODE_CFB_AES,
+  ENCRYPT_MODE_CFB_AES
   // ENCRYPT_MODE_CBC_AES
 };
 
 enum AclType {
   ACL_TYPE_PUBLIC,
-  ACL_TYPE_PRIVATE,
+  ACL_TYPE_PRIVATE
 };
 
 }