make/test_memrchr.c

Sun, 30 Nov 2025 15:50:36 +0100

author
Mike Becker <universe@uap-core.de>
date
Sun, 30 Nov 2025 15:50:36 +0100
changeset 1534
38d3f40a50ec
parent 1413
c5a225d7228c
permissions
-rw-r--r--

instead of including stdalign.h, check if the macro is defined (Solaris does not have the header)

1413
c5a225d7228c improve feature test for memrchr() making it also available on BSD
Mike Becker <universe@uap-core.de>
parents:
diff changeset
1 #include <string.h>
c5a225d7228c improve feature test for memrchr() making it also available on BSD
Mike Becker <universe@uap-core.de>
parents:
diff changeset
2
c5a225d7228c improve feature test for memrchr() making it also available on BSD
Mike Becker <universe@uap-core.de>
parents:
diff changeset
3 int main() {
c5a225d7228c improve feature test for memrchr() making it also available on BSD
Mike Becker <universe@uap-core.de>
parents:
diff changeset
4 const char *r = memrchr("tester", 'e', 6);
c5a225d7228c improve feature test for memrchr() making it also available on BSD
Mike Becker <universe@uap-core.de>
parents:
diff changeset
5 return !(r != NULL);
c5a225d7228c improve feature test for memrchr() making it also available on BSD
Mike Becker <universe@uap-core.de>
parents:
diff changeset
6 }

mercurial