My compiler isn't happy again and this time I don't think it's being too 
paranoid.

cxx -std strict_ansi -DHAVE_CONFIG_H -I. -I../../../devel/src/support 
-I../../src -I../../../devel/src/support/../ -I../../../devel -I../.. 
-I../../../devel/boost -I../../../devel/src/cheaders -I/usr/local/include 
-nocleanup -msg_display_number -msg_disable 11,193,236,261,401,611 -w0 -ptr 
/usr/users/aleem/OTHERS_CODE/lyx/devel-build/lyx_cxx_repository -O2 -c -MD 
../../../devel/src/support/tempname.C
cxx: Warning: ../../../devel/src/support/tempname.C, line 34: #117-D non-void
          function "<unnamed>::make_tempfile" (declared at line 19) should
          return a value
}
^
cxx: Info: ../../../devel/src/support/tempname.C, line 19: #835-D parameter
          "templ" was never referenced
int make_tempfile(char * templ)
-------------------------^

I think that that warning should be an error:

Index: src/support/tempname.C
===================================================================
RCS file: /usr/local/lyx/cvsroot/lyx-devel/src/support/tempname.C,v
retrieving revision 1.9
diff -u -p -r1.9 tempname.C
--- src/support/tempname.C      21 Mar 2002 17:06:35 -0000      1.9
+++ src/support/tempname.C      15 Apr 2002 10:04:36 -0000
@@ -26,9 +26,7 @@ int make_tempfile(char * templ)
        ::mktemp(templ);
        return ::open(templ, O_RDWR | O_CREAT | O_EXCL, S_IRUSR | S_IWUSR);
 #else
-#ifdef WITH_WARNINGS
-#warning FIX FIX FIX
-#endif
+#error FIX FIX FIX
 #endif
 #endif
 }

This is what my config.h thinks:
/* Define as 1 if the MKSTEMP function is declared */
#define HAVE_DECL_MKSTEMP 1

/* Define if you have the `mkstemp' function. */
/* #undef HAVE_MKSTEMP */

/* Define if you have the `mktemp' function. */
/* #undef HAVE_MKTEMP */

which is rubbish because both are defined. So, what's going on?

Running configure:

checking for memmove... no
checking for memset... no
checking for strchr... (cached) yes
checking for putenv... (cached) yes
checking for setenv... (cached) yes
checking for mkfifo... no
checking for mkstemp... no
checking for mktemp... no

In configure.in we have:
AC_CHECK_FUNCS(memmove memset strchr putenv setenv mkfifo \
  mkstemp mktemp)

of these tests,  mktemp, mkstemp are to be found in stdlib.h
memccpy, memchr, memcmp, memcpy, memmove, memset are to be found in string.h

Any ideas?
Angus

Reply via email to