bug-groff
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: can't compile latest groff with gcc-3.0.2


From: Werner LEMBERG
Subject: Re: can't compile latest groff with gcc-3.0.2
Date: Thu, 01 Nov 2001 23:18:42 +0100 (CET)

> In file included from font.cc:27:
> /opt1/home/ingber/groff/src/include/lib.h:53: previous declaration of `int 
>    mkstemp(char*)' with C++ linkage
> /usr/include/stdlib.h:150: conflicts with new declaration with C linkage
> 
> [...]
>
> I'd guess some code was written not too C++ standard?

I'm aware of this problem, and I think I've already a fix for it (see
below; you must regenerate `configure' with autoconf 2.52) which has
not yet been committed due to personal computer problems.  Thanks for
the report.


    Werner


======================================================================

--- aclocal.m4  Sun Aug 19 15:53:51 2001
+++ aclocal.m4.new      Fri Sep 21 20:42:08 2001
@@ -504,12 +504,15 @@
 dnl If mkstemp() isn't available, use our own mkstemp.cc file.
 dnl
 AC_DEFUN(GROFF_MKSTEMP,
-[AC_LANG_PUSH(C++)
+[AC_MSG_CHECKING([for mkstemp])
+AC_LANG_PUSH(C++)
 AC_LIBSOURCE(mkstemp.cc)
-AC_CHECK_FUNC(mkstemp,
-             [AC_DEFINE(HAVE_MKSTEMP, 1,
-                        [Define if you have mkstemp().])],
-             [_AC_LIBOBJ(mkstemp)])
+AC_TRY_LINK([#include <stdlib.h>
+int (*f) (char *);],
+[f = mkstemp;],
+AC_MSG_RESULT(yes);AC_DEFINE(HAVE_MKSTEMP, 1,
+                            [Define if you have mkstemp().]),
+AC_MSG_RESULT(no);_AC_LIBOBJ(mkstemp))
 AC_LANG_POP(C++)])dnl
 dnl
 dnl



reply via email to

[Prev in Thread] Current Thread [Next in Thread]