Hi, I'd like to use the filemode module in a C++ file but found that it does not have extern "C" magic. I started to submit a patch, but stopped when I saw that filemode.h has
# if HAVE_DECL_STRMODE # include <string.h> /* FreeBSD, OpenBSD */ # include <unistd.h> /* NetBSD */ # else void strmode (mode_t mode, char *str); # endif void filemodestring (struct stat const *statp, char *str); and remembered there is a recommendation in the gnulib manual to not surround system header files with an extern "C" block. What's the best way to get declare these two functions extern "C" and be consistent with gnulib conventions? Is it safe to assume that if HAVE_DECL_STRMODE is true, strmode will be declared extern "C"? Thanks, jwe