This is a prototype patch to drop the messing we do with __STRICT_ANSI__. I just request _GNU_SOURCE which gives us lstat() and friends back. I could do it requesting it bit by bit e.g. _SVID_SOURCE, _BSD_SOURCE, _POSIX_SOURCE, but I don't really see the point. It has been tested on Linux glibc-devel-2.1.3. I am sending it in the hope that it can be tested on platforms I don't have access to, to see if it is possible to drop the STRICT_ANSI thing. Please test it ! One thing, with the patch I get a message : direct base `noncopyable' inaccessible in `FormError' due to ambiguity for the classes inheriting noncopyable in frontends/xforms - why ? thanks john -- "They didn't know what the symbols and paradoxes meant. Instead of following the finger that points to the moon, they sat down and worshipped the finger itself. Instead of following the map, they thought it was the territory and tried to live in it. Instead of reading the menu they tried to eat it. Dig ?" - Miss Portinari
Index: acconfig.h =================================================================== RCS file: /usr/local/lyx/cvsroot/lyx-devel/acconfig.h,v retrieving revision 1.14 diff -u -r1.14 acconfig.h --- acconfig.h 2000/09/15 15:32:07 1.14 +++ acconfig.h 2000/09/25 19:38:01 @@ -44,16 +44,13 @@ #undef USE_PSPELL +/* stuff not defined in strict ANSI C */ +#undef _GNU_SOURCE + @BOTTOM@ /************************************************************ ** You should not need to change anything beyond this point */ - -/* even though -ansi might have been specified for gcc, we want all - usual prototypes. */ -#ifdef __STRICT_ANSI__ -/**/#undef __STRICT_ANSI__ -#endif #ifndef HAVE_STRCHR #define strchr(a,b) index(a,b) Index: configure.in =================================================================== RCS file: /usr/local/lyx/cvsroot/lyx-devel/configure.in,v retrieving revision 1.47 diff -u -r1.47 configure.in --- configure.in 2000/09/15 15:32:07 1.47 +++ configure.in 2000/09/25 19:38:01 @@ -80,6 +80,9 @@ AC_LIBTOOL_WIN32_DLL AM_PROG_LIBTOOL +### check for defining correct stuff for system header files +LYX_GNU_HEADERS + ### Some checks on what the C++ compiler can(not) do LYX_CXX_MUTABLE LYX_CXX_PARTIAL Index: config/lyxinclude.m4 =================================================================== RCS file: /usr/local/lyx/cvsroot/lyx-devel/config/lyxinclude.m4,v retrieving revision 1.20 diff -u -r1.20 lyxinclude.m4 --- config/lyxinclude.m4 2000/08/14 09:44:50 1.20 +++ config/lyxinclude.m4 2000/09/25 19:38:01 @@ -127,6 +127,19 @@ cross_compiling=$ac_cv_prog_cxx_cross ]) +dnl do we need to define _GNU_SOURCE +AC_DEFUN(LYX_GNU_HEADERS,[ +AC_MSG_CHECKING([if we need to define _GNU_SOURCE]) +AC_TRY_COMPILE([ +#include <sys/stat.h> +#include <unistd.h>],[ +int i = (int)S_IEXEC;], +lyx_need_gnu_source=no, +lyx_need_gnu_source=yes) + +test "$lyx_need_gnu_source" = yes && AC_DEFINE(_GNU_SOURCE) +AC_MSG_RESULT($lyx_need_gnu_source) +]) AC_DEFUN(LYX_PROG_CXX, [AC_BEFORE([$0], [AC_PROG_CXXCPP])dnl