diff --git a/libdicl/configure.ac b/libdicl/configure.ac index c64c86f..8965cad 100644 --- a/libdicl/configure.ac +++ b/libdicl/configure.ac @@ -1,6 +1,6 @@ AC_PREREQ(2.65) AC_INIT([libdicl], - [0.1.12], + [0.1.13], [daniel.hams@gmail.com]) AC_SUBST(ACLOCAL_AMFLAGS, "-I macros") diff --git a/libdicl/src/repl_headers/fnmatch.h b/libdicl/src/repl_headers/fnmatch.h index f274166..642ef59 100644 --- a/libdicl/src/repl_headers/fnmatch.h +++ b/libdicl/src/repl_headers/fnmatch.h @@ -7,6 +7,10 @@ #include "/usr/include/fnmatch.h" #endif +#if defined(__cplusplus) +extern "C" { +#endif + /* We #undef these before defining them because some losing systems (HP-UX A.08.07 for example) define these in . */ #undef FNM_PATHNAME @@ -37,4 +41,8 @@ #define fnmatch rpl_fnmatch extern int rpl_fnmatch(const char *, const char *, int); +#if defined(__cplusplus) +} +#endif + #endif diff --git a/libdicl/src/repl_headers/repl_select.h b/libdicl/src/repl_headers/repl_select.h index 4d5b4f0..fa06cbe 100644 --- a/libdicl/src/repl_headers/repl_select.h +++ b/libdicl/src/repl_headers/repl_select.h @@ -1,8 +1,16 @@ #ifndef LIBDICL_REPL_SELECT_H #define LIBDICL_REPL_SELECT_H +#if defined(__cplusplus) +extern "C" { +#endif + #undef select #define select rpl_select extern int rpl_select(int, fd_set *, fd_set *, fd_set *, struct timeval *); +#if defined(__cplusplus) +} +#endif + #endif diff --git a/libdicl/src/repl_headers/stdio.h b/libdicl/src/repl_headers/stdio.h index 031acf6..c0b8bb8 100644 --- a/libdicl/src/repl_headers/stdio.h +++ b/libdicl/src/repl_headers/stdio.h @@ -7,6 +7,10 @@ #include "/usr/include/stdio.h" #endif +#if defined(__cplusplus) +extern "C" { +#endif + extern int asprintf(char **,const char *, ...); #undef sprintf @@ -42,4 +46,8 @@ ssize_t rpl_getline(char **lineptr, size_t *n, FILE *stream); ssize_t getdelim(char **lineptr, size_t *n, int delim, FILE *stream); +#if defined(__cplusplus) +} +#endif + #endif diff --git a/libdicl/src/repl_headers/stdlib.h b/libdicl/src/repl_headers/stdlib.h index f700e64..d7634e0 100644 --- a/libdicl/src/repl_headers/stdlib.h +++ b/libdicl/src/repl_headers/stdlib.h @@ -6,6 +6,11 @@ #else #include "/usr/include/stdlib.h" #endif + +#if defined(__cplusplus) +extern "C" { +#endif + #undef strtod #define strtod rpl_strtod extern double rpl_strtod(const char *, char **); @@ -20,10 +25,14 @@ int unsetenv(const char *name); const char *getprogname(void); void setprogname(const char *progname); -char *mkdtemp(char *template); +char *mkdtemp(char *ftemplate); void qsort_r(void *, size_t, size_t, int(*)(const void*,const void*, void*), void *); +#if defined(__cplusplus) +} +#endif + #endif diff --git a/libdicl/src/repl_headers/string.h b/libdicl/src/repl_headers/string.h index af453cb..2dffc58 100644 --- a/libdicl/src/repl_headers/string.h +++ b/libdicl/src/repl_headers/string.h @@ -7,6 +7,10 @@ #include "/usr/include/string.h" #endif +#if defined(__cplusplus) +extern "C" { +#endif + /* Missing pieces */ char *stpcpy(char *, const char*); char *stpncpy(char *, const char*, size_t); @@ -19,4 +23,8 @@ char *strndup(const char*, size_t); char *strsep(char **, char*); +#if defined(__cplusplus) +} +#endif + #endif diff --git a/libdicl/src/repl_headers/unistd.h b/libdicl/src/repl_headers/unistd.h index 203ce6b..2948789 100644 --- a/libdicl/src/repl_headers/unistd.h +++ b/libdicl/src/repl_headers/unistd.h @@ -8,6 +8,10 @@ #endif #include "repl_select.h" +#if defined(__cplusplus) +extern "C" { +#endif + # define AT_FDCWD (-3041965) # define AT_SYMLINK_NOFOLLOW 4096 @@ -20,4 +24,8 @@ int faccessat(int, const char*, int, int); +#if defined(__cplusplus) +} +#endif + #endif