Using size_t should be safe. Most string functions use it. Is strncasecmp defined in your string.h?