]> granicus.if.org Git - p11-kit/commitdiff
Add C++ header guards, and require API instability acknowledgement.
authorStef Walter <stefw@collabora.co.uk>
Thu, 31 Mar 2011 16:37:31 +0000 (18:37 +0200)
committerStef Walter <stefw@collabora.co.uk>
Thu, 31 Mar 2011 16:37:31 +0000 (18:37 +0200)
p11-kit/Makefile.am
p11-kit/p11-kit-uri.h
p11-kit/p11-kit.h
tests/Makefile.am

index 989f4822ab00e2239e1ef5b7776615e5ff224313..a5a9195a65a87f56fdeff39907cce951ab25e64b 100644 (file)
@@ -1,4 +1,7 @@
 
+INCLUDES = \
+       -DP11_KIT_API_SUBJECT_TO_CHANGE
+
 incdir = $(includedir)/p11-kit
 
 inc_HEADERS = \
index a3e52ed3f4ddc5fd08e066a990bba829e7ea8cc2..f5bf3d59e7e5f3f26aef5c3b9586c71903c254ba 100644 (file)
  * Author: Stef Walter <stefw@collabora.co.uk>
  */
 
+#ifndef P11_KIT_URI_H
+#define P11_KIT_URI_H
+
+/*
+ * To use this API, you need to be prepared for changes to the API,
+ * and add the C flag: -DP11_KIT_API_SUBJECT_TO_CHANGE
+ */
+
+#ifndef P11_KIT_API_SUBJECT_TO_CHANGE
+#error "This API has not yet reached stability."
+#endif
+
 #include "pkcs11.h"
 
-#ifndef __P11_KIT_URI_H__
-#define __P11_KIT_URI_H__
+#ifdef __cplusplus
+extern "C" {
+#endif
 
 #define P11_KIT_URI_SCHEME "pkcs11:"
 #define P11_KIT_URI_SCHEME_LEN 7
@@ -102,4 +115,8 @@ int                 p11_kit_uri_parse                       (const char *string,
 
 void                p11_kit_uri_free                        (P11KitUri *uri);
 
-#endif /* __P11_KIT_URI_H__ */
+#ifdef __cplusplus
+} /* extern "C" */
+#endif
+
+#endif /* P11_KIT_URI_H */
index b035f56c369daa4c8a3771b5e7026456b59aad6a..b3de330c857a0f07e76220a74e2c710da5982d45 100644 (file)
 #ifndef __P11_KIT_H__
 #define __P11_KIT_H__
 
+/*
+ * To use this API, you need to be prepared for changes to the API,
+ * and add the C flag: -DP11_KIT_API_SUBJECT_TO_CHANGE
+ */
+
+#ifndef P11_KIT_API_SUBJECT_TO_CHANGE
+#error "This API has not yet reached stability."
+#endif
+
 #include "pkcs11.h"
 
+#ifdef __cplusplus
+extern "C" {
+#endif
+
 CK_RV                    p11_kit_initialize_registered     (void);
 
 CK_RV                    p11_kit_finalize_registered       (void);
@@ -56,4 +69,8 @@ CK_RV                    p11_kit_finalize_module           (CK_FUNCTION_LIST_PTR
 
 const char*              p11_kit_strerror                  (CK_RV rv);
 
+#ifdef __cplusplus
+} /* extern "C" */
+#endif
+
 #endif /* __P11_KIT_H__ */
index 3719a64d962d6d2b3a27068d00004ec7d85f8911..bb4bce364a9badb103cc773ed8e8879884dcaa07 100644 (file)
@@ -3,7 +3,8 @@ INCLUDES = \
        -I$(top_srcdir) \
        -I$(top_srcdir)/p11-kit \
        -Icutest \
-       -DSRCDIR=\"$(srcdir)\"
+       -DSRCDIR=\"$(srcdir)\" \
+       -DP11_KIT_API_SUBJECT_TO_CHANGE
 
 noinst_PROGRAMS = \
        hash-test \