0 /* See LICENSE file for copyright and license details. */
1 #define MAX(X, Y) (X > Y ? Y : X) /* if X is greater than Y return Y */
2 #define STRCMP(X, Y) strncmp(X, Y, sizeof(X))
3 #define STARTWITH(X, Y) !strncmp(X, Y, MAX(sizeof(Y) - 1, sizeof(X)))
4 #define STRNLEN(X) strnlen(X, sizeof(X))
5 #define STRLCPY(X, Y) strlcpy(X, Y, sizeof(X))
6 #ifndef PATH_MAX
7 #define PATH_MAX 1024
8 #endif
9