From: Marco van Wieringen Date: Sat, 5 Feb 2011 00:07:47 +0000 (+0100) Subject: Small change to exporting functions not found in include files X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=c47f524667ae6c8f6af0f453f0f7c834d1c5c1d4;p=bacula%2Fbacula Small change to exporting functions not found in include files on some platforms. Wrap it as one extern "C" block just like its done on most platforms in the proper include files. --- diff --git a/bacula/src/baconfig.h b/bacula/src/baconfig.h index 6d2cc473c9..cc258f4404 100644 --- a/bacula/src/baconfig.h +++ b/bacula/src/baconfig.h @@ -540,10 +540,16 @@ extern int thr_setconcurrency(int); #endif -#if defined(HAVE_DARWIN_OS) || defined(HAVE_OSF1_OS) +#ifdef HAVE_DARWIN_OS /* Apparently someone forgot to wrap getdomainname as a C function */ -extern "C" int getdomainname(char *name, int len); -#endif +#ifdef __cplusplus +extern "C" { +#endif /* __cplusplus */ +int getdomainname(char *name, int len); +#ifdef __cplusplus +} +#endif /* __cplusplus */ +#endif /* HAVE_DARWIN_OS */ @@ -582,16 +588,28 @@ extern int h_errno; * the problem is no system headers declares the prototypes for these functions * this is done below */ -extern "C" int getdomainname(char *name, int namelen); -extern "C" int setdomainname(char *name, int namelen); +#ifdef __cplusplus +extern "C" { +#endif /* __cplusplus */ +int getdomainname(char *name, int namelen); +int setdomainname(char *name, int namelen); +#ifdef __cplusplus +} +#endif /* __cplusplus */ #endif /* HAVE_HPUX_OS */ #ifdef HAVE_OSF1_OS -extern "C" int fchdir(int filedes); -extern "C" long gethostid(void); -extern "C" int mknod(const char *path, int mode, dev_t device ); -#endif +#ifdef __cplusplus +extern "C" { +#endif /* __cplusplus */ +int fchdir(int filedes); +long gethostid(void); +int getdomainname(char *name, int len); +#ifdef __cplusplus +} +#endif /* __cplusplus */ +#endif /* HAVE_OSF1_OS */ /** Disabled because it breaks internationalisation...