From: Werner LEMBERG Date: Sun, 21 Sep 2014 15:10:15 +0000 (+0200) Subject: dirname: support compilation with C++ X-Git-Tag: v1.0~7295 X-Git-Url: https://gitweb.git.savannah.gnu.org/gitweb/?a=commitdiff_plain;h=dc53bac1b409aebc7fd3f5e5f19f7c8e83a3cef6;p=gnulib.git dirname: support compilation with C++ * lib/dirname.h: Add necessary C linkage declarations. --- diff --git a/ChangeLog b/ChangeLog index 58a6511784..9ac551db27 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2014-09-21 Werner Lemberg + + dirname: support compilation with C++ + * lib/dirname.h: Add necessary C linkage declarations. + 2014-09-16 Paul Eggert qsort_r: include diff --git a/lib/dirname.h b/lib/dirname.h index a1b7009326..657d265321 100644 --- a/lib/dirname.h +++ b/lib/dirname.h @@ -31,6 +31,10 @@ # define DOUBLE_SLASH_IS_DISTINCT_ROOT 0 # endif +#ifdef __cplusplus +extern "C" { +#endif + # if GNULIB_DIRNAME char *base_name (char const *file); char *dir_name (char const *file); @@ -43,4 +47,8 @@ char *last_component (char const *file) _GL_ATTRIBUTE_PURE; bool strip_trailing_slashes (char *file); +#ifdef __cplusplus +} /* extern "C" */ +#endif + #endif /* not DIRNAME_H_ */