diff options
author | 2014-01-04 13:40:01 +0000 | |
---|---|---|
committer | 2014-01-04 13:40:01 +0000 | |
commit | c2df3e519a8701a868dc4910744c40b42e3f73e4 (patch) | |
tree | 0c5c44e60bdd39ba559094821ebe7057982aac3b /test-strnlen.c | |
parent | 6d55934c65607a0db77403b6b364af25e7ae1a70 (diff) | |
download | mandoc-c2df3e519a8701a868dc4910744c40b42e3f73e4.tar.gz mandoc-c2df3e519a8701a868dc4910744c40b42e3f73e4.tar.zst mandoc-c2df3e519a8701a868dc4910744c40b42e3f73e4.zip |
Even though strnlen(3) is required by POSIX 2008,
Matthias Scheler reports than Solaris 10 lacks it.
While here, sort the declarations in config.h
and move the headers to the top.
Diffstat (limited to 'test-strnlen.c')
-rw-r--r-- | test-strnlen.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/test-strnlen.c b/test-strnlen.c new file mode 100644 index 00000000..0bb69791 --- /dev/null +++ b/test-strnlen.c @@ -0,0 +1,8 @@ +#include <string.h> + +int +main(void) +{ + const char s[1] = { 'a' }; + return(1 != strnlen(s, 1)); +} |