diff --git a/proc/diskstats.h b/proc/diskstats.h index 83b8c479..dd718910 100644 --- a/proc/diskstats.h +++ b/proc/diskstats.h @@ -23,9 +23,9 @@ #ifndef PROCPS_DISKSTATS_H #define PROCPS_DISKSTATS_H -#include - -__BEGIN_DECLS +#ifdef __cplusplus +extern "C" { +#endif enum diskstats_item { DISKSTATS_noop, // ( never altered ) @@ -126,5 +126,7 @@ struct diskstats_stack **procps_diskstats_sort ( enum diskstats_item sortitem, enum diskstats_sort_order order); -__END_DECLS +#ifdef __cplusplus +} +#endif #endif diff --git a/proc/meminfo.h b/proc/meminfo.h index 1e363846..238221c6 100644 --- a/proc/meminfo.h +++ b/proc/meminfo.h @@ -19,9 +19,9 @@ #ifndef PROCPS_MEMINFO_H #define PROCPS_MEMINFO_H -#include - -__BEGIN_DECLS +#ifdef __cplusplus +extern "C" { +#endif enum meminfo_item { MEMINFO_noop, // ( never altered ) @@ -171,5 +171,7 @@ struct meminfo_stack *procps_meminfo_select ( enum meminfo_item *items, int numitems); -__END_DECLS +#ifdef __cplusplus +} +#endif #endif diff --git a/proc/namespace.h b/proc/namespace.h index 2885d8d5..f57b060d 100644 --- a/proc/namespace.h +++ b/proc/namespace.h @@ -23,7 +23,9 @@ #ifndef PROC_NAMESPACE_H #define PROC_NAMESPACE_H -__BEGIN_DECLS +#ifdef __cplusplus +extern "C" { +#endif enum namespace_type { PROCPS_NS_IPC, @@ -44,6 +46,8 @@ const char *procps_ns_get_name(const int id); int procps_ns_get_id(const char *name); int procps_ns_read_pid(const int pid, struct procps_namespaces *nsp); -__END_DECLS +#ifdef __cplusplus +} +#endif #endif diff --git a/proc/pids.h b/proc/pids.h index f6c15810..c183c88a 100644 --- a/proc/pids.h +++ b/proc/pids.h @@ -23,9 +23,9 @@ #ifndef PROCPS_PIDS_H #define PROCPS_PIDS_H -#include - -__BEGIN_DECLS +#ifdef __cplusplus +extern "C" { +#endif enum pids_item { PIDS_noop, // ( never altered ) @@ -233,5 +233,7 @@ struct pids_stack **procps_pids_sort ( enum pids_item sortitem, enum pids_sort_order order); -__END_DECLS +#ifdef __cplusplus +} +#endif #endif diff --git a/proc/slabinfo.h b/proc/slabinfo.h index e0c549e9..7454515c 100644 --- a/proc/slabinfo.h +++ b/proc/slabinfo.h @@ -23,9 +23,9 @@ #ifndef PROCPS_SLABINFO_H #define PROCPS_SLABINFO_H -#include - -__BEGIN_DECLS +#ifdef __cplusplus +extern "C" { +#endif enum slabinfo_item { SLABINFO_noop, // ( never altered ) @@ -130,5 +130,7 @@ struct slabinfo_stack **procps_slabinfo_sort ( enum slabinfo_item sortitem, enum slabinfo_sort_order order); -__END_DECLS +#ifdef __cplusplus +} +#endif #endif diff --git a/proc/stat.h b/proc/stat.h index 6151e282..5682773c 100644 --- a/proc/stat.h +++ b/proc/stat.h @@ -19,9 +19,9 @@ #ifndef PROCPS_STAT_H #define PROCPS_STAT_H -#include - -__BEGIN_DECLS +#ifdef __cplusplus +extern "C" { +#endif enum stat_item { STAT_noop, // ( never altered ) @@ -154,5 +154,7 @@ struct stat_stack **procps_stat_sort ( enum stat_item sortitem, enum stat_sort_order order); -__END_DECLS +#ifdef __cplusplus +} +#endif #endif diff --git a/proc/sysinfo.h b/proc/sysinfo.h index 167f892b..9bd8bc55 100644 --- a/proc/sysinfo.h +++ b/proc/sysinfo.h @@ -3,13 +3,16 @@ #include #include -#include -__BEGIN_DECLS +#ifdef __cplusplus +extern "C" { +#endif long procps_cpu_count(void); long procps_hertz_get(void); int procps_loadavg(double *av1, double *av5, double *av15); unsigned int procps_pid_length(void); -__END_DECLS -#endif /* SYSINFO_H */ +#ifdef __cplusplus +} +#endif +#endif diff --git a/proc/uptime.h b/proc/uptime.h index 8d00854d..dc14be8c 100644 --- a/proc/uptime.h +++ b/proc/uptime.h @@ -25,13 +25,15 @@ #ifndef PROC_UPTIME_H #define PROC_UPTIME_H -#include -__BEGIN_DECLS +#ifdef __cplusplus +extern "C" { +#endif int procps_uptime(double *uptime_secs, double *idle_secs); char *procps_uptime_sprint(void); char *procps_uptime_sprint_short(void); -__END_DECLS - +#ifdef __cplusplus +} +#endif #endif diff --git a/proc/version.h b/proc/version.h index 3cde808c..dd9e7d77 100644 --- a/proc/version.h +++ b/proc/version.h @@ -23,10 +23,9 @@ #ifndef PROC_VERSION_H #define PROC_VERSION_H -#include -__BEGIN_DECLS - -int procps_linux_version(void); +#ifdef __cplusplus +extern "C" { +#endif /* Convenience macros for composing/decomposing version codes */ #define LINUX_VERSION(x,y,z) (0x10000*((x)&0x7fff) + 0x100*((y)&0xff) + ((z)&0xff)) @@ -34,6 +33,9 @@ int procps_linux_version(void); #define LINUX_VERSION_MINOR(x) (((x)>> 8) & 0xFF) #define LINUX_VERSION_PATCH(x) ( (x) & 0xFF) -__END_DECLS +int procps_linux_version(void); -#endif /* PROC_VERSION_H */ +#ifdef __cplusplus +} +#endif +#endif diff --git a/proc/vmstat.h b/proc/vmstat.h index 98e0cc69..4db14b09 100644 --- a/proc/vmstat.h +++ b/proc/vmstat.h @@ -24,9 +24,9 @@ #ifndef PROCPS_VMSTAT_H #define PROCPS_VMSTAT_H -#include - -__BEGIN_DECLS +#ifdef __cplusplus +extern "C" { +#endif enum vmstat_item { VMSTAT_noop, // ( never altered ) @@ -308,5 +308,7 @@ struct vmstat_stack *procps_vmstat_select ( enum vmstat_item *items, int numitems); -__END_DECLS +#ifdef __cplusplus +} +#endif #endif