summaryrefslogtreecommitdiff
path: root/src/include/lib.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/include/lib.h')
-rw-r--r--src/include/lib.h19
1 files changed, 15 insertions, 4 deletions
diff --git a/src/include/lib.h b/src/include/lib.h
index 6eb67952..03038951 100644
--- a/src/include/lib.h
+++ b/src/include/lib.h
@@ -43,6 +43,12 @@ int is_prime(unsigned);
#include <strings.h>
#endif
+#ifndef HAVE_MKSTEMP
+/* since mkstemp() is defined as a real C++ function if taken from
+ groff's mkstemp.cc we need a declaration */
+int mkstemp(char *tmpl);
+#endif /* HAVE_MKSTEMP */
+
int mksdir(char *tmpl);
FILE *xtmpfile(char **namep = 0,
@@ -51,15 +57,11 @@ FILE *xtmpfile(char **namep = 0,
char *xtmptemplate(const char *postfix_long, const char *postfix_short);
#ifdef NEED_DECLARATION_POPEN
-
extern "C" { FILE *popen(const char *, const char *); }
-
#endif /* NEED_DECLARATION_POPEN */
#ifdef NEED_DECLARATION_PCLOSE
-
extern "C" { int pclose (FILE *); }
-
#endif /* NEED_DECLARATION_PCLOSE */
size_t file_name_max(const char *fname);
@@ -73,6 +75,15 @@ inline int illegal_input_char(int c)
return c >= 0 && illegal_char_table[c];
}
+#ifdef HAVE_STRCASECMP
+#ifdef NEED_DECLARATION_STRCASECMP
+extern "C" {
+ // Ultrix's string.h fails to declare this.
+ int strcasecmp(const char *, const char *);
+}
+#endif /* NEED_DECLARATION_STRCASECMP */
+#endif /* HAVE_STRCASECMP */
+
#if !defined(_AIX) && !defined(sinix) && !defined(__sinix__)
#ifdef HAVE_STRNCASECMP
#ifdef NEED_DECLARATION_STRNCASECMP