From: Urban Wallasch Date: Thu, 23 Apr 2020 08:24:08 +0000 (+0200) Subject: * Fix __cplusplus macro usage. X-Git-Url: https://git.packet-gain.de/?a=commitdiff_plain;h=c59776c4d4e02c59cc5a607b8d6909505b2304f1;p=oddbits.git * Fix __cplusplus macro usage. --- diff --git a/dict/dict.h b/dict/dict.h index cdadc74..9239aff 100644 --- a/dict/dict.h +++ b/dict/dict.h @@ -12,7 +12,7 @@ #ifndef DICT_H_INCLUDED #define DICT_H_INCLUDED -#ifdef cplusplus +#ifdef __cplusplus extern "C" { #endif @@ -112,7 +112,7 @@ const char *dict_getstr(dict_t *d, const char *key); int dict_remove(dict_t *d, const char *key); -#ifdef cplusplus +#ifdef __cplusplus } #endif diff --git a/mkdirp/mkdirp.h b/mkdirp/mkdirp.h index 35a71d6..271e9f8 100644 --- a/mkdirp/mkdirp.h +++ b/mkdirp/mkdirp.h @@ -12,7 +12,7 @@ #ifndef MKDIRP_H_INCLUDED #define MKDIRP_H_INCLUDED -#ifdef cplusplus +#ifdef __cplusplus extern "C" { #endif @@ -35,7 +35,7 @@ extern "C" { extern int mkdirp(const char *pathname, mode_t mode); -#ifdef cplusplus +#ifdef __cplusplus } #endif diff --git a/net/net.h b/net/net.h index a57f50b..8dd5a82 100644 --- a/net/net.h +++ b/net/net.h @@ -34,7 +34,7 @@ #ifndef NET_H_ #define NET_H_ -#ifdef cplusplus +#ifdef __cplusplus extern "C" { #endif @@ -249,7 +249,7 @@ extern ssize_t sendto_tm(int fd, const void *buf, size_t len, int flags, extern int64_t sendfile_tm(int out_fd, int in_fd, int64_t count, int timeout); -#ifdef cplusplus +#ifdef __cplusplus } #endif diff --git a/str/str.h b/str/str.h index 86d299f..0005b8b 100644 --- a/str/str.h +++ b/str/str.h @@ -64,7 +64,7 @@ #ifndef STR_H_ #define STR_H_ -#ifdef cplusplus +#ifdef __cplusplus extern "C" { #endif @@ -577,7 +577,7 @@ static inline char *str_napp(char **s1, const char *s2, size_t n) { } -#ifdef cplusplus +#ifdef __cplusplus } #endif diff --git a/tmalloc/tmalloc.c b/tmalloc/tmalloc.c index 8269b5c..b661b2a 100644 --- a/tmalloc/tmalloc.c +++ b/tmalloc/tmalloc.c @@ -25,7 +25,7 @@ * */ -#ifdef cplusplus +#ifdef __cplusplus #warning "You probably do not want to use this code in a C++ project!" #endif diff --git a/tmalloc/tmalloc.h b/tmalloc/tmalloc.h index 7dbef6c..76e2bfb 100644 --- a/tmalloc/tmalloc.h +++ b/tmalloc/tmalloc.h @@ -14,7 +14,7 @@ #ifndef TMALLOC_H_INCLUDED #define TMALLOC_H_INCLUDED -#ifdef cplusplus +#ifdef __cplusplus #warning "You probably do not want to use this code in a C++ project!" extern "C" { #endif @@ -66,7 +66,7 @@ extern int tmalloc_check(void); extern void tmalloc_stat(void); -#ifdef cplusplus +#ifdef __cplusplus } #endif