summaryrefslogtreecommitdiff
blob: 6c083055e1a85eff12e3f79926d60c51c2be49c0 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
#ifndef RELABSD_PERVASIVE_H
#define RELABSD_PERVASIVE_H

#include <string.h>

#define RELABSD__TO_STRING(x) #x
#define RELABSD_TO_STRING(x) RELABSD__TO_STRING(x)

#define RELABSD_ISOLATE(a) do {a} while (0)

/* strncmp stops at '\0' and strlen does not count '\0'. */
#define RELABSD_IS_PREFIX(a, b) (strncmp(a, b, strlen(a)) == 0)

#define RELABSD_STRING_EQUALS(a, b) (strcmp(a, b) == 0)

#endif