summaryrefslogtreecommitdiff
path: root/ccache.h
diff options
context:
space:
mode:
authorJoel Rosdahl <joel@rosdahl.net>2016-07-27 11:22:12 +0200
committerJoel Rosdahl <joel@rosdahl.net>2016-07-27 20:13:00 +0200
commitd2cf8765aaef9271693e68ecbf26b2ddb2c24d7c (patch)
tree40dae39ef8dfad79f9d20403dd8aef0187540d51 /ccache.h
parent3f41319d8e457010106b2f87b123fe3beb302183 (diff)
downloadccache-d2cf8765aaef9271693e68ecbf26b2ddb2c24d7c.tar.gz
Bail out on -P at end of -Wp, as well
Diffstat (limited to 'ccache.h')
-rw-r--r--ccache.h6
1 files changed, 5 insertions, 1 deletions
diff --git a/ccache.h b/ccache.h
index 3081d34e..7ab03212 100644
--- a/ccache.h
+++ b/ccache.h
@@ -69,7 +69,11 @@ enum stats {
#define SLOPPY_NO_SYSTEM_HEADERS 64
#define str_eq(s1, s2) (strcmp((s1), (s2)) == 0)
-#define str_startswith(s, p) (strncmp((s), (p), strlen((p))) == 0)
+#define str_startswith(s, prefix) \
+ (strncmp((s), (prefix), strlen((prefix))) == 0)
+#define str_endswith(s, suffix) \
+ (strlen(s) >= strlen(suffix) \
+ && str_eq((s) + strlen(s) - strlen(suffix), (suffix)))
// ----------------------------------------------------------------------------
// args.c