06/09/2013 07:53, Pavel Sanda:
Vincent van Ravesteijn wrote:
Please reply if you know about any issues so that I won't be able to
overlook them.

#8783

Here is a patch for this one. OK?

JMarc



>From d2a2cb11e0015f05da56dbe5d6e6bbbb07d53d17 Mon Sep 17 00:00:00 2001
From: Jean-Marc Lasgouttes <lasgout...@lyx.org>
Date: Fri, 6 Sep 2013 11:12:09 +0200
Subject: [PATCH] Fix compilation on Solaris 11.1 (bug #8783)

Make sure that the configure script only checks features using the C++ compiler.

Also get rid of our last C files, since they are not compiled nor distributed anyway.
---
 configure.ac           |   11 ++++++-----
 src/support/atexit.c   |   18 ------------------
 src/support/strerror.c |   24 ------------------------
 3 files changed, 6 insertions(+), 47 deletions(-)
 delete mode 100644 src/support/atexit.c
 delete mode 100644 src/support/strerror.c

diff --git a/configure.ac b/configure.ac
index b85c4c1..75e74ac 100644
--- a/configure.ac
+++ b/configure.ac
@@ -61,11 +61,9 @@ done
 AM_PATH_PYTHON(2.4.0,, :)
 AC_PROG_RANLIB
 
-### we need to know the byte order for unicode conversions
-AC_C_BIGENDIAN
-
 ### Check for a C++ compiler
 LYX_PROG_CXX
+AC_LANG(C++)
 
 ### Objective-C compiler
 AC_PROG_OBJC
@@ -97,6 +95,9 @@ AC_CHECK_LIB(gdi32, main)
 LYX_USE_INCLUDED_BOOST
 LYX_USE_INCLUDED_MYTHES
 
+### we need to know the byte order for unicode conversions
+AC_C_BIGENDIAN
+
 # Needed for our char_type
 AC_CHECK_SIZEOF(wchar_t)
 
@@ -181,7 +182,7 @@ AC_FUNC_SELECT_ARGTYPES
 LYX_CHECK_SPELL_ENGINES
 
 lyx_client_subdir=true
-AC_LANG_PUSH(C)
+dnl AC_LANG_PUSH(C)
 dnl LIBS already contains some X extra libs that may interfere.
 save_LIBS="$LIBS"
 LIBS=
@@ -194,7 +195,7 @@ AC_CHECK_FUNCS(fcntl,
 AC_SUBST(SOCKET_LIBS,$LIBS)
 LIBS="$save_LIBS"
 AM_CONDITIONAL(BUILD_CLIENT_SUBDIR, $lyx_client_subdir)
-AC_LANG_POP(C)
+dnl AC_LANG_POP(C)
 
 lyx_win_res=false;
 case ${host} in
diff --git a/src/support/atexit.c b/src/support/atexit.c
deleted file mode 100644
index 4331809..0000000
--- a/src/support/atexit.c
+++ /dev/null
@@ -1,18 +0,0 @@
-/**
- * \file atexit.c
- * Wrapper to implement ANSI C's atexit using SunOS's on_exit.
- *
- * This function is in the public domain.  --Mike Stump.
- */
-
-#include <config.h>
-
-#ifndef NEED_on_exit
-int atexit(void (*f)())
-{
-  /* If the system doesn't provide a definition for atexit, use on_exit
-     if the system provides that.  */
-  on_exit (f, 0);
-  return 0;
-}
-#endif
diff --git a/src/support/strerror.c b/src/support/strerror.c
deleted file mode 100644
index b678dda..0000000
--- a/src/support/strerror.c
+++ /dev/null
@@ -1,24 +0,0 @@
-/*****************************************************
- * provides strerror()
- * author Stephan Witt <stephan.w...@beusen.de>
- *****************************************************/
-
-#include <config.h>
-
-/*	$Id: strerror.c,v 1.3 2000/08/04 13:12:30 lasgouttes Exp $	*/
-
-#if !defined(lint) && !defined(WITH_WARNINGS)
-static char vcid[] = "$Id: strerror.c,v 1.3 2000/08/04 13:12:30 lasgouttes Exp $";
-#endif /* lint */
-
-extern	int	sys_nerr ;
-extern	char *	sys_errlist [] ;
-
-char * strerror (int errnum)
-{
-	static	char *	errtext = "unknown errno" ;
-
-	if ( errnum < sys_nerr )
-		return sys_errlist [errnum] ;
-	return errtext ;
-}
-- 
1.7.0.4

Reply via email to