diff options
author | wlemb <wlemb> | 2001-08-13 12:18:26 +0000 |
---|---|---|
committer | wlemb <wlemb> | 2001-08-13 12:18:26 +0000 |
commit | 1cce6a2ecf0c58357b5e2187ea459bc165810ad8 (patch) | |
tree | bb3fb7887ee938f7ae90ab10f139c8a87931f22e /src/include/lib.h | |
parent | 53b5abaf04f16b21b2358c6848d3264a1ebdd37e (diff) | |
download | groff-1cce6a2ecf0c58357b5e2187ea459bc165810ad8.tar.gz |
* aclocal.m4 (GROFF_MKSTEMP): Define HAVE_MKSTEMP.
* configure.ac: Add declaration test for strcasecmp().
* Makefile.in: Updated.
* configure: Regenerated.
* src/include/lib.h [!HAVE_MKSTEMP]: Add prototype for mkstemp() --
this is necessary because groff's mkstemp.cc is C++.
Add declaration conditionally for strcasecmp().
Diffstat (limited to 'src/include/lib.h')
-rw-r--r-- | src/include/lib.h | 19 |
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 |