summaryrefslogtreecommitdiffstats
path: root/daemon/daemon.h
diff options
context:
space:
mode:
authorJim Meyering <meyering@redhat.com>2009-11-09 19:50:22 +0100
committerJim Meyering <meyering@redhat.com>2009-11-09 22:34:16 +0100
commit7cd4b6aeee3693463b03608a31cf53f21152c2e8 (patch)
tree4b05909a6d950e687088b4dfc238d80ac8b81acd /daemon/daemon.h
parente645763007e7097c14c1c3ba94010f2e32e536bf (diff)
downloadlibguestfs-7cd4b6aeee3693463b03608a31cf53f21152c2e8.tar.gz
libguestfs-7cd4b6aeee3693463b03608a31cf53f21152c2e8.tar.xz
libguestfs-7cd4b6aeee3693463b03608a31cf53f21152c2e8.zip
define STREQ, STRNEQ, STREQLEN, STRCASEQ, etc.
* src/guestfs.h: Define STREQ and company. * daemon/daemon.h: Likewise. * hivex/hivex.h: Likewise.
Diffstat (limited to 'daemon/daemon.h')
-rw-r--r--daemon/daemon.h10
1 files changed, 10 insertions, 0 deletions
diff --git a/daemon/daemon.h b/daemon/daemon.h
index 89128402..3f4c4807 100644
--- a/daemon/daemon.h
+++ b/daemon/daemon.h
@@ -234,4 +234,14 @@ extern void reply (xdrproc_t xdrp, char *ret);
# define ATTRIBUTE_UNUSED __attribute__ ((__unused__))
#endif
+#define STREQ(a,b) (strcmp((a),(b)) == 0)
+#define STRCASEEQ(a,b) (strcasecmp((a),(b)) == 0)
+#define STRNEQ(a,b) (strcmp((a),(b)) != 0)
+#define STRCASENEQ(a,b) (strcasecmp((a),(b)) != 0)
+#define STREQLEN(a,b,n) (strncmp((a),(b),(n)) == 0)
+#define STRCASEEQLEN(a,b,n) (strncasecmp((a),(b),(n)) == 0)
+#define STRNEQLEN(a,b,n) (strncmp((a),(b),(n)) != 0)
+#define STRCASENEQLEN(a,b,n) (strncasecmp((a),(b),(n)) != 0)
+#define STRPREFIX(a,b) (strncmp((a),(b),strlen((b))) == 0)
+
#endif /* GUESTFSD_DAEMON_H */