diff options
author | Thiago Macieira <thiago@macieira.org> | 2013-05-06 20:55:27 -0700 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2013-05-06 20:56:39 -0700 |
commit | 265376db067156356d208e1d36b420199a162c54 (patch) | |
tree | 9bfc4dd3e335baa63ab880ab82fffbdc95d41327 /statistics.h | |
parent | 1240455a9a1f23284af2b8859b2ca2d1f363e0c6 (diff) | |
download | subsurface-265376db067156356d208e1d36b420199a162c54.tar.gz |
Add #include guards to statistics.h and the extern "C" for C++
If the extern "C" is missing, the C++ compiler will try to find a
function by its mangled name. Since the function is in a .c file,
there will be no mangled name.
Signed-off-by: Thiago Macieira <thiago@macieira.org>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'statistics.h')
-rw-r--r-- | statistics.h | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/statistics.h b/statistics.h index 95f2957e8..732a287e1 100644 --- a/statistics.h +++ b/statistics.h @@ -4,6 +4,14 @@ * core logic functions called from statistics UI * common types and variables */ + +#ifndef STATISTICS_H +#define STATISTICS_H + +#ifdef __cplusplus +extern "C" { +#endif + typedef struct { int period; duration_t total_time; @@ -32,3 +40,9 @@ extern char *get_minutes(int seconds); extern void process_all_dives(struct dive *dive, struct dive **prev_dive); extern void get_selected_dives_text(char *buffer, int size); extern volume_t get_gas_used(struct dive *dive); + +#ifdef __cplusplus +} +#endif + +#endif |