libdpf/thirdparty/hedley/test/stringify.c
Ryan Henry e4e666f459 Initial import of libdpf.
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-09-24 14:08:32 -06:00

27 lines
421 B
C

#include "../hedley.h"
#define PREFIX foo_
#define BAR bar
static int
my_strcmp(const char* s1, const char* s2) {
while (1) {
if (*s1 < *s2)
return -1;
else if (*s1 > *s2)
return 1;
else if (*s1 == '\0')
return 0;
s1++;
s2++;
}
}
static const char*
foo_bar(void) {
return HEDLEY_STRINGIFY(BAR);
}
int main(void) {
return my_strcmp("bar", HEDLEY_CONCAT(PREFIX, BAR)());
}