diff -up libpst-0.6.75/man/lspst.1 libpst-0.6.75/man/lspst diff -up libpst-0.6.75/man/pst2dii.1 libpst-0.6.75/man/pst2dii diff -up libpst-0.6.75/man/pst2ldif.1 libpst-0.6.75/man/pst2ldif diff -up libpst-0.6.75/man/readpst.1 libpst-0.6.75/man/readpst diff -up libpst-0.6.75/src/define.h.1 libpst-0.6.75/src/define.h --- libpst-0.6.75/src/define.h.1 2020-03-26 18:52:30.000000000 +0100 +++ libpst-0.6.75/src/define.h 2021-02-22 18:25:55.705347052 +0100 @@ -60,6 +60,10 @@ #ifdef _WIN32 #include + #ifdef __cplusplus + extern "C" { + #endif + #define D_MKDIR(x) mkdir(x) #define chdir _chdir #define strcasecmp _stricmp @@ -83,10 +87,20 @@ int __cdecl _fseeki64(FILE *, __int64, int); __int64 __cdecl _ftelli64(FILE *); + #ifdef __cplusplus + } + #endif + #ifdef __MINGW32__ #include #else + #ifdef __cplusplus + extern "C" { + #endif #include "XGetopt.h" + #ifdef __cplusplus + } + #endif #endif #include #undef gmtime_r @@ -102,7 +116,15 @@ #ifdef HAVE_UNISTD_H #include #else + #ifdef __cplusplus + extern "C" { + #endif + #include "XGetopt.h" + + #ifdef __cplusplus + } + #endif #endif #define D_MKDIR(x) mkdir(x, PERM_DIRS) #endif @@ -131,6 +153,9 @@ #include #endif +#ifdef __cplusplus +extern "C" { +#endif void pst_debug_lock(); void pst_debug_unlock(); @@ -258,4 +283,8 @@ void *pst_realloc(void *ptr, size_t size #define MAXDATEFMTLEN 40 +#ifdef __cplusplus +} /* extern "C" */ +#endif + #endif //DEFINEH_H diff -up libpst-0.6.75/src/deltasearch.cpp.1 libpst-0.6.75/src/deltasearch.cpp --- libpst-0.6.75/src/deltasearch.cpp.1 2020-03-26 18:52:30.000000000 +0100 +++ libpst-0.6.75/src/deltasearch.cpp 2021-02-22 18:01:36.962177562 +0100 @@ -1,6 +1,4 @@ -extern "C" { - #include "define.h" -}; +#include "define.h" #include #include diff -up libpst-0.6.75/src/libstrfunc.h.1 libpst-0.6.75/src/libstrfunc.h --- libpst-0.6.75/src/libstrfunc.h.1 2021-02-22 18:35:32.849905730 +0100 +++ libpst-0.6.75/src/libstrfunc.h 2021-02-22 18:35:49.383893089 +0100 @@ -4,9 +4,17 @@ #include "common.h" +#ifdef __cplusplus +extern "C" { +#endif + char *pst_base64_encode(void *data, size_t size); char *pst_base64_encode_single(void *data, size_t size); char *pst_base64_encode_multiple(void *data, size_t size, int *line_count); +#ifdef __cplusplus +} +#endif + #endif diff -up libpst-0.6.75/src/lzfu.h.1 libpst-0.6.75/src/lzfu.h --- libpst-0.6.75/src/lzfu.h.1 2020-03-26 18:52:30.000000000 +0100 +++ libpst-0.6.75/src/lzfu.h 2021-02-22 18:01:36.962177562 +0100 @@ -1,6 +1,10 @@ #ifndef LZFU_H #define LZFU_H +#ifdef __cplusplus +extern "C" { +#endif + /** decompress lz compressed rtf data. The initial lz dictionary is preloaded with rtf specific data. * @param rtfcomp pointer to the rtf compressed data @@ -11,4 +15,8 @@ */ char* pst_lzfu_decompress (char* rtfcomp, uint32_t compsize, size_t *size); +#ifdef __cplusplus +} +#endif + #endif diff -up libpst-0.6.75/src/msg.cpp.1 libpst-0.6.75/src/msg.cpp --- libpst-0.6.75/src/msg.cpp.1 2020-03-26 18:52:30.000000000 +0100 +++ libpst-0.6.75/src/msg.cpp 2021-02-22 18:01:36.962177562 +0100 @@ -1,16 +1,14 @@ -extern "C" { - #include "define.h" - #include "msg.h" - #include +#include "define.h" +#include "msg.h" +#include - #include - #include - #include +#include +#include +#include - #include - #include - #include -} +#include +#include +#include #include #include diff -up libpst-0.6.75/src/msg.h.1 libpst-0.6.75/src/msg.h --- libpst-0.6.75/src/msg.h.1 2021-02-22 18:21:59.812527452 +0100 +++ libpst-0.6.75/src/msg.h 2021-02-22 18:22:17.689513780 +0100 @@ -1,2 +1,10 @@ +#ifdef __cplusplus +extern "C" { +#endif + void write_msg_email(char *fname, pst_item* item, pst_file* pst); + +#ifdef __cplusplus +} +#endif diff -up libpst-0.6.75/src/nick2ldif.cpp.1 libpst-0.6.75/src/nick2ldif.cpp --- libpst-0.6.75/src/nick2ldif.cpp.1 2020-03-26 18:52:30.000000000 +0100 +++ libpst-0.6.75/src/nick2ldif.cpp 2021-02-22 18:01:36.963177561 +0100 @@ -8,9 +8,7 @@ http://www.fsf.org/licenses/gpl.txt #include -extern "C" { - #include "define.h" -} +#include "define.h" char *ldap_base = NULL; char *ldap_org = NULL; diff -up libpst-0.6.75/src/pst2dii.cpp.1 libpst-0.6.75/src/pst2dii.cpp --- libpst-0.6.75/src/pst2dii.cpp.1 2020-03-26 18:54:32.000000000 +0100 +++ libpst-0.6.75/src/pst2dii.cpp 2021-02-22 18:01:36.963177561 +0100 @@ -13,10 +13,8 @@ Based on readpst.c by David Smith using namespace std; -extern "C" { - #include "define.h" - #include "lzfu.h" -} +#include "define.h" +#include "lzfu.h" struct file_ll { string name; diff -up libpst-0.6.75/src/pst2ldif.cpp.1 libpst-0.6.75/src/pst2ldif.cpp --- libpst-0.6.75/src/pst2ldif.cpp.1 2020-03-26 18:52:30.000000000 +0100 +++ libpst-0.6.75/src/pst2ldif.cpp 2021-02-22 18:01:36.963177561 +0100 @@ -15,10 +15,8 @@ using namespace std; #include #include -extern "C" { - #include "define.h" - #include "lzfu.h" -} +#include "define.h" +#include "lzfu.h" void usage(void); void version(void); diff -up libpst-0.6.75/src/vbuf.h.1 libpst-0.6.75/src/vbuf.h --- libpst-0.6.75/src/vbuf.h.1 2021-02-22 18:23:24.020463050 +0100 +++ libpst-0.6.75/src/vbuf.h 2021-02-22 18:23:26.377461247 +0100 @@ -4,6 +4,9 @@ #include "common.h" +#ifdef __cplusplus +extern "C" { +#endif // Variable-length buffers struct pst_varbuf { @@ -25,5 +28,8 @@ size_t pst_vb_utf16to8(pst_vbuf *des size_t pst_vb_utf8to8bit(pst_vbuf *dest, const char *inbuf, int iblen, const char* charset); size_t pst_vb_8bit2utf8(pst_vbuf *dest, const char *inbuf, int iblen, const char* charset); +#ifdef __cplusplus +} +#endif #endif diff -up libpst-0.6.75/src/XGetopt.h.1 libpst-0.6.75/src/XGetopt.h