After that first false start, here is the correct patch. ---Kayvan -- Kayvan A. Sylvan | Proud husband of | Father to my kids: Sylvan Associates, Inc. | Laura Isabella Sylvan | Katherine Yelena http://www.successlinks.com/kayvan | Reach your goals now! | Robin Gregory
Index: acconfig.h =================================================================== RCS file: /usr/local/lyx/cvsroot/lyx-devel/acconfig.h,v retrieving revision 1.15 diff -u -r1.15 acconfig.h --- acconfig.h 2000/09/27 15:43:49 1.15 +++ acconfig.h 2000/11/24 20:00:51 @@ -44,6 +44,9 @@ #undef USE_PSPELL +/* Define as 1 if the MKSTEMP function is declared */ +#undef HAVE_DECL_mkstemp + @BOTTOM@ /************************************************************ Index: configure.in =================================================================== RCS file: /usr/local/lyx/cvsroot/lyx-devel/configure.in,v retrieving revision 1.54 diff -u -r1.54 configure.in --- configure.in 2000/11/22 15:51:34 1.54 +++ configure.in 2000/11/24 20:00:52 @@ -264,6 +264,10 @@ # SunOS 4.1.3 does not have strerror and atexit AC_REPLACE_FUNCS(strerror atexit) +# Check for mkstemp declaration +lyx_CHECK_DECL(mkstemp, unistd.h) +lyx_CHECK_DECL(mkstemp, stdlib.h) + ### and now some special lyx flags. AC_ARG_ENABLE(assertions, [ --enable-assertions add runtime sanity checks in the program],, Index: config/libtool.m4 =================================================================== RCS file: /usr/local/lyx/cvsroot/lyx-devel/config/libtool.m4,v retrieving revision 1.1 diff -u -r1.1 libtool.m4 --- config/libtool.m4 2000/01/08 21:06:59 1.1 +++ config/libtool.m4 2000/11/24 20:00:54 @@ -428,3 +428,16 @@ dnl This is just to silence aclocal about the macro not being used ifelse([AC_DISABLE_FAST_INSTALL])dnl + +dnl check things are declared in headers to avoid warnings +dnl Note that we do not cache the results, since we want to be able +dnl to run multiple lyx_CHECK_DECL lines. +AC_DEFUN(lyx_CHECK_DECL, +[AC_MSG_CHECKING($1 is declared by header $2)] +[AC_EGREP_HEADER($1, $2, [dps_cv_declare_$1=yes], [dps_cv_declare_$1=no])] +if test "${dps_cv_declare_$1}" = "yes"; then + AC_DEFINE(HAVE_DECL_$1) + AC_MSG_RESULT(yes) +else + AC_MSG_RESULT(no) +fi) Index: src/support/tempname.C =================================================================== RCS file: /usr/local/lyx/cvsroot/lyx-devel/src/support/tempname.C,v retrieving revision 1.4 diff -u -r1.4 tempname.C --- src/support/tempname.C 2000/11/15 03:22:08 1.4 +++ src/support/tempname.C 2000/11/24 20:00:59 @@ -10,6 +10,12 @@ using std::endl; +#ifdef HAVE_MKSTEMP +#ifndef HAVE_DECL_mkstemp +extern "C" { int mkstemp(char*); }; +#endif +#endif + extern string system_tempdir; static inline Index: ChangeLog =================================================================== RCS file: /usr/local/lyx/cvsroot/lyx-devel/ChangeLog,v retrieving revision 1.699 diff -u -r1.699 ChangeLog --- ChangeLog 2000/11/22 18:46:53 1.699 +++ ChangeLog 2000/11/24 20:12:23 @@ -1,3 +1,13 @@ +2000-11-24 Kayvan A. Sylvan <[EMAIL PROTECTED]> + + * src/support/tempname.C: Add declaration of mkstemp() if + we HAVE_MKSTEMP but there is no HAVE_DECL_mkstemp. + + * acconfig.h, configure.in, config/libtool.m4: Added autoconf tests + to check for systems where mkstemp() is available but not declared + in headers. The new autoconf macro lyx_CHECK_DECL can be used + to check for declarations in headers. + 2000-11-22 Lars Gullik Bjønnes <[EMAIL PROTECTED]> * src/version.h: try the pre2 again