aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/config.h.post
diff options
context:
space:
mode:
authorIngo Schwarze <schwarze@openbsd.org>2014-01-04 13:40:01 +0000
committerIngo Schwarze <schwarze@openbsd.org>2014-01-04 13:40:01 +0000
commitc2df3e519a8701a868dc4910744c40b42e3f73e4 (patch)
tree0c5c44e60bdd39ba559094821ebe7057982aac3b /config.h.post
parent6d55934c65607a0db77403b6b364af25e7ae1a70 (diff)
downloadmandoc-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 'config.h.post')
-rw-r--r--config.h.post19
1 files changed, 10 insertions, 9 deletions
diff --git a/config.h.post b/config.h.post
index 0a700426..fe8f015e 100644
--- a/config.h.post
+++ b/config.h.post
@@ -1,5 +1,3 @@
-#include <sys/types.h>
-
#if !defined(__BEGIN_DECLS)
# ifdef __cplusplus
# define __BEGIN_DECLS extern "C" {
@@ -15,6 +13,13 @@
# endif
#endif
+#ifndef HAVE_FGETLN
+extern char *fgetln(FILE *, size_t *);
+#endif
+#ifndef HAVE_GETSUBOPT
+extern int getsubopt(char **, char * const *, char **);
+extern char *suboptarg;
+#endif
#ifndef HAVE_STRCASESTR
extern char *strcasestr(const char *, const char *);
#endif
@@ -24,15 +29,11 @@ extern size_t strlcat(char *, const char *, size_t);
#ifndef HAVE_STRLCPY
extern size_t strlcpy(char *, const char *, size_t);
#endif
+#ifndef HAVE_STRNLEN
+extern size_t strnlen(const char *, size_t);
+#endif
#ifndef HAVE_STRSEP
extern char *strsep(char **, const char *);
#endif
-#ifndef HAVE_GETSUBOPT
-extern int getsubopt(char **, char * const *, char **);
-extern char *suboptarg;
-#endif
-#ifndef HAVE_FGETLN
-extern char *fgetln(FILE *, size_t *);
-#endif
#endif /* MANDOC_CONFIG_H */