diff options
author | Stef Walter <stefw@collabora.co.uk> | 2011-03-31 18:37:31 +0200 |
---|---|---|
committer | Stef Walter <stefw@collabora.co.uk> | 2011-03-31 18:37:31 +0200 |
commit | 579d40eff31c7a17cc4e4f07d26c6189619fee31 (patch) | |
tree | fcb97fc78bfaefdd488ca170ec2725a4b66a2811 /p11-kit | |
parent | cf988aa7858d249887ea0818301c7211bb3cab38 (diff) |
Add C++ header guards, and require API instability acknowledgement.
Diffstat (limited to 'p11-kit')
-rw-r--r-- | p11-kit/Makefile.am | 3 | ||||
-rw-r--r-- | p11-kit/p11-kit-uri.h | 23 | ||||
-rw-r--r-- | p11-kit/p11-kit.h | 17 |
3 files changed, 40 insertions, 3 deletions
diff --git a/p11-kit/Makefile.am b/p11-kit/Makefile.am index 989f482..a5a9195 100644 --- a/p11-kit/Makefile.am +++ b/p11-kit/Makefile.am @@ -1,4 +1,7 @@ +INCLUDES = \ + -DP11_KIT_API_SUBJECT_TO_CHANGE + incdir = $(includedir)/p11-kit inc_HEADERS = \ diff --git a/p11-kit/p11-kit-uri.h b/p11-kit/p11-kit-uri.h index a3e52ed..f5bf3d5 100644 --- a/p11-kit/p11-kit-uri.h +++ b/p11-kit/p11-kit-uri.h @@ -32,10 +32,23 @@ * 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 */ diff --git a/p11-kit/p11-kit.h b/p11-kit/p11-kit.h index b035f56..b3de330 100644 --- a/p11-kit/p11-kit.h +++ b/p11-kit/p11-kit.h @@ -35,8 +35,21 @@ #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__ */ |