diff options
author | Harshavardhana <harsha@harshavardhana.net> | 2014-05-13 17:42:14 -0700 |
---|---|---|
committer | Anand Avati <avati@redhat.com> | 2014-05-17 11:54:33 -0700 |
commit | f4944449940ee08d8add767ba81cd5ca8f8611a5 (patch) | |
tree | 1301f67913740d4973c401a18aabf384dac34466 /api | |
parent | 98f5f436dd9106819dea8bc6c9a42e03ee1e31be (diff) |
api: non glibc c++ systems do not define __THROW
Let __THROW be defined conditionally for more portability
Change-Id: I6e7cb1eb59b84988e155e9a8b696e842b7ff8f7f
BUG: 1089172
Signed-off-by: Harshavardhana <harsha@harshavardhana.net>
Reviewed-on: http://review.gluster.org/7757
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Emmanuel Dreyfus <manu@netbsd.org>
Reviewed-by: Anand Avati <avati@redhat.com>
Diffstat (limited to 'api')
-rw-r--r-- | api/src/glfs-handles.h | 9 | ||||
-rw-r--r-- | api/src/glfs.h | 9 |
2 files changed, 18 insertions, 0 deletions
diff --git a/api/src/glfs-handles.h b/api/src/glfs-handles.h index 0270897604e..a6c6c0a3443 100644 --- a/api/src/glfs-handles.h +++ b/api/src/glfs-handles.h @@ -60,6 +60,15 @@ * glfs_h_create_from_handle */ #define GFAPI_HANDLE_LENGTH 16 +/* Portability non glibc c++ build systems */ +#ifndef __THROW +# if defined __cplusplus +# define __THROW throw () +# else +# define __THROW +# endif +#endif + __BEGIN_DECLS /* diff --git a/api/src/glfs.h b/api/src/glfs.h index 8f1d09d1094..6d896f0ea13 100644 --- a/api/src/glfs.h +++ b/api/src/glfs.h @@ -42,6 +42,15 @@ #include <dirent.h> #include <sys/statvfs.h> +/* Portability non glibc c++ build systems */ +#ifndef __THROW +# if defined __cplusplus +# define __THROW throw () +# else +# define __THROW +# endif +#endif + __BEGIN_DECLS /* The filesystem object. One object per 'virtual mount' */ |