From: Mathieu Desnoyers Date: Thu, 23 Feb 2012 12:19:33 +0000 (-0500) Subject: bsd compat headers: #elif -> #elif defined X-Git-Url: http://git.efficios.com/?p=lttng-tools.git;a=commitdiff_plain;h=7657ae75b85d728d84c2f540df6a3739a167090c bsd compat headers: #elif -> #elif defined Also update warning messages. Signed-off-by: Mathieu Desnoyers --- diff --git a/src/common/compat/clone.h b/src/common/compat/clone.h index 08aa10dcd..6685c6f6e 100644 --- a/src/common/compat/clone.h +++ b/src/common/compat/clone.h @@ -28,7 +28,7 @@ int lttng_clone_files(int (*fn)(void *), void *child_stack, void *arg) return clone(fn, child_stack, CLONE_FILES | SIGCHLD, arg); } -#elif __FreeBSD__ +#elif defined(__FreeBSD__) #include @@ -39,7 +39,7 @@ int lttng_clone_files(int (*fn)(void *), void *child_stack, void *arg) } #else -#error "Please add support for your OS into compat/clone.h." +#error "Please add support for your OS." #endif /* __linux__ , __FreeBSD__ */ #endif /* _COMPAT_CLONE_H */ diff --git a/src/common/compat/fcntl.h b/src/common/compat/fcntl.h index 575495fe5..f1c07a4f2 100644 --- a/src/common/compat/fcntl.h +++ b/src/common/compat/fcntl.h @@ -28,7 +28,7 @@ extern int compat_sync_file_range(int fd, off64_t offset, off64_t nbytes, #define lttng_sync_file_range(fd, offset, nbytes, flags) \ compat_sync_file_range(fd, offset, nbytes, flags) -#elif __FreeBSD__ +#elif defined(__FreeBSD__) typedef long int off64_t; typedef off64_t loff_t; @@ -70,7 +70,7 @@ static inline int posix_fadvise(int fd, off_t offset, off_t len, int advice) } #else -#error "Please add support for your OS into compat/fcntl.h." +#error "Please add support for your OS." #endif /* __linux__ , __FreeBSD__ */ #endif /* _COMPAT_FCNTL_H */ diff --git a/src/common/compat/mman.h b/src/common/compat/mman.h index ede8c5883..7002e167c 100644 --- a/src/common/compat/mman.h +++ b/src/common/compat/mman.h @@ -22,13 +22,13 @@ #ifdef __linux__ -#elif __FreeBSD__ +#elif defined(__FreeBSD__) #define MAP_GROWSDOWN 0 #define MAP_ANONYMOUS MAP_ANON #else -#error "Please add support for your OS into compat/mman.h." +#error "Please add support for your OS." #endif /* __linux__ , __FreeBSD__ */ #endif /* _COMPAT_MMAN_H */ diff --git a/src/common/compat/socket.h b/src/common/compat/socket.h index 0eaf87a77..ec8d3ea67 100644 --- a/src/common/compat/socket.h +++ b/src/common/compat/socket.h @@ -38,7 +38,7 @@ typedef struct ucred lttng_sock_cred; #define LTTNG_SOCK_GET_GID_CRED(c) LTTNG_REF(c)->gid #define LTTNG_SOCK_GET_PID_CRED(c) LTTNG_REF(c)->pid -#elif __FreeBSD__ +#elif defined(__FreeBSD__) #undef SO_PASSCRED #define SO_PASSCRED 0 @@ -57,7 +57,7 @@ typedef struct cmsgcred lttng_sock_cred; #define LTTNG_SOCK_GET_PID_CRED(c) LTTNG_REF(c)->cmcred_pid #else -#error "Please add support for your OS into lttng/ust-endian.h." +#error "Please add support for your OS." #endif /* __linux__ , __FreeBSD__ */ #endif /* _COMPAT_SOCKET_H */