libcli: allow ntstatus.h to be used by openchange
authorAndrew Tridgell <tridge@samba.org>
Wed, 25 Nov 2009 04:30:20 +0000 (15:30 +1100)
committerAndrew Tridgell <tridge@samba.org>
Wed, 25 Nov 2009 04:30:20 +0000 (15:30 +1100)
apparently ntstatus.h is used by openchange, but they don't include
replace.h. This makes that possible again.

libcli/util/ntstatus.h

index 88b4353c1d1c02439a3387df11ebdbe3a31aab08..c60e424f68ac96bd56bdabd5126c8c0ebcdc140c 100644 (file)
@@ -637,6 +637,14 @@ NTSTATUS nt_status_string_to_code(const char *nt_status_str);
 /** Used by ntstatus_dos_equal: */
 extern bool ntstatus_check_dos_mapping;
 
+/* we need these here for openchange */
+#ifndef likely
+#define likely(x) (x)
+#endif
+#ifndef unlikely
+#define unlikely(x) (x)
+#endif
+
 #define NT_STATUS_IS_OK(x) (likely(NT_STATUS_V(x) == 0))
 #define NT_STATUS_IS_ERR(x) (unlikely((NT_STATUS_V(x) & 0xc0000000) == 0xc0000000))
 /* checking for DOS error mapping here is ugly, but unfortunately the