bsd compat headers: #elif -> #elif defined
authorMathieu Desnoyers <mathieu.desnoyers@efficios.com>
Thu, 23 Feb 2012 12:19:33 +0000 (07:19 -0500)
committerMathieu Desnoyers <mathieu.desnoyers@efficios.com>
Thu, 23 Feb 2012 12:19:33 +0000 (07:19 -0500)
Also update warning messages.

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
src/common/compat/clone.h
src/common/compat/fcntl.h
src/common/compat/mman.h
src/common/compat/socket.h

index 08aa10dcd199a0431845bc0a279fc9b4b30896f8..6685c6f6e9ed084ac5817beb5abe4c4f635a0e9f 100644 (file)
@@ -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 <unistd.h>
 
@@ -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 */
index 575495fe55b3818a4aba8e5af3c41872aab91e74..f1c07a4f27f1e1d7bcc4660ce1ba6231c0388e67 100644 (file)
@@ -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 */
index ede8c5883c805211dc29da84bc64b0eaea6651d5..7002e167c403587d677bbfc14e8094118abf45d3 100644 (file)
 
 #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 */
index 0eaf87a77248dc910b9d77fb1b3647696edbebea..ec8d3ea671f69d74b8b803cc5f35fa8be9d67165 100644 (file)
@@ -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 */
This page took 0.027079 seconds and 4 git commands to generate.