diff --git a/libips.h b/libips.h index c62ee39..990fafb 100644 --- a/libips.h +++ b/libips.h @@ -5,6 +5,10 @@ #include "global.h" +#ifdef __cplusplus +extern "C" { +#endif + enum ipserror { ips_ok,//Patch applied or created successfully. @@ -39,3 +43,8 @@ void ips_free(struct mem mem); struct ipsstudy; enum ipserror ips_study(struct mem patch, struct ipsstudy * study); enum ipserror ips_apply_study(struct mem patch, struct ipsstudy * study, struct mem in, struct mem * out); + +#ifdef __cplusplus +} +#endif + diff --git a/libups.h b/libups.h index 63a4fff..f9f6441 100644 --- a/libups.h +++ b/libups.h @@ -5,6 +5,10 @@ #include "global.h" +#ifdef __cplusplus +extern "C" { +#endif + //Several of those are unused, but remain there so the remaining ones match bpserror. enum upserror { ups_ok,//Patch applied or created successfully. @@ -33,3 +37,8 @@ enum upserror ups_create(struct mem source, struct mem target, struct mem * patc // input, nor on anything you got from anywhere else. ups_free is guaranteed to be equivalent to // calling stdlib.h's free() on mem.ptr. void ups_free(struct mem mem); + +#ifdef __cplusplus +} +#endif +