diff --git a/include/sigar_util.h b/include/sigar_util.h index 0f56aeec..81b24bc8 100644 --- a/include/sigar_util.h +++ b/include/sigar_util.h @@ -41,6 +41,9 @@ #define sigar_isalpha(c) \ (isalpha(((unsigned char)(c)))) +#define sigar_isupper(c) \ + (isupper(((unsigned char)(c)))) + #ifndef PROC_FS_ROOT #define PROC_FS_ROOT "/proc/" #endif diff --git a/src/sigar_ptql.c b/src/sigar_ptql.c index 774fe6e9..c3a080b5 100644 --- a/src/sigar_ptql.c +++ b/src/sigar_ptql.c @@ -899,7 +899,7 @@ static int ptql_branch_parse(char *query, ptql_parse_branch_t *branch) if (*query) { char flag; - while (isupper((flag = *query))) { + while (sigar_isupper((flag = *query))) { switch (flag) { case 'P': branch->op_flags |= PTQL_OP_FLAG_PARENT;