Angus Leeming a écrit :
Abdelrazak Younes <[EMAIL PROTECTED]> writes:
Georg> I don't think I overestimate the number of files
Georg> that get added. I agree that it is not big, but:
Georg> If you have two lists to maintain this will either
Georg> not happen (again: look at development/Win32/lyx.vcproj),
Abdel> This one is not maintained because nobody use it.
Abdel> If I had a more recent version of VC, I'd used it
Abdel> for sure and maintain it. IMHO, it is just a
Abdel> matter of having one person doing it. And making
Abdel> that VC proj file up to date again is a matter
Abdel> of 5 minutes maximum.
FWIW and IMO, the maintenance problems with the Visual Studio project don't
really stem from the uptodate-ness of the .vcproj files. It's more the
guess-work involved in creating a somewhat accurate config.h.
Anyway, given that Bo is interested in this, let's encourage him to make a
proper investigation. It'll benefit him anyway in his own projects and it may be
that the rest of us are being overly pessimistic...
It would be a useful exercise to create a list of all the #defines that are
actually used by LyX (and Boost which #includes our config.h ...) and see how to
test for these things and generate a config.h using the Scons add-ons that Bo
mentioned.
Here is it (it was tedious...):
I think that only .C file in src/support directory should include
"config.h". This is mostly the case for those used macro:
#define AIKSAURUS_H_LOCATION
in src\Thesaurus.h
#define DEVEL_VERSION 1
in src\text.C
#define ENABLE_ASSERTIONS 1
in src\Bullet.C
in src\PrinterParams.C
#define ENABLE_NLS 1
in src\gettext.[Ch]
in src\messages.C
#define HAVE_IOS 1
in src\main.C
#define HAVE_LOCALE 1
in src\output_docbook.C
in src\buffer.C
#define HAVE_LOCALE_H 1
in src\gettext.C
in src\messages.C
#define HAVE_SYS_STAT_H 1
in src\lyxserver.C
in src\pch.h
#define HAVE_SYS_TIME_H 1
in src\ispell.C: maybe not useful here...
in src\pch.h: ditto
#define HAVE_UTIME_H 1
#define HAVE_SYS_UTIME_H 1
in src\buffer.C: maybe not useful here...
#define PACKAGE "LyX-svn"
in src\messages.C
#define PACKAGE_VERSION "1.5.0svn":
in src\version.C.in
#define SELECT_TYPE_ARG5 (struct timeval *):
in src/ispell.C, can this go?
#define WITH_WARNINGS 1:
used a lot.
#define SELECT_TYPE_ARG1 int
#define USE_ASPELL 1:
#define SELECT_TYPE_ARG234 (int *)
used in src\lyxfunc.C
In these __cplusplus testing is not useful. And they should be used only
in support directory directory IMHO:
extern "C" char * strerror(int n);
# include "support/os2_defines.h"
I guess the only one of the BOOST_* macro that should stay in config.h
is BOOST_USER_CONFIG. All the rest should go in a boost_config.h and
then put this in config.h:
#define BOOST_USER_CONFIG <boost_config.h>
The only one of the BOOST_* macro used is:
USE_BOOST_FORMAT: used in trunk\src\Chktex.C
Not used anywhere:
#define HAVE_ALLOCA 1
#define HAVE_ASPELL_H 1
#define HAVE_CLOSE 1
#define HAVE_DECL_FEOF_UNLOCKED 0
#define HAVE_DECL_FGETS_UNLOCKED 0
#define HAVE_DECL_GETC_UNLOCKED 0
#define HAVE_DECL_ISTREAMBUF_ITERATOR 1
#define HAVE_DECL__SNPRINTF 1
#define HAVE_DECL__SNWPRINTF 1
#define HAVE_DIRENT_H 1
#define HAVE_FWPRINTF 1
#define HAVE_GETCWD 1
#define HAVE_GETPAGESIZE 1
#define HAVE_GETPID 1
#define HAVE_ICONV 1
#define HAVE_INTMAX_T 1
#define HAVE_INTTYPES_H 1
#define HAVE_INTTYPES_H_WITH_UINTMAX 1
#define HAVE_IO_H 1
#define HAVE_ISTREAM 1
#define HAVE_KPSEWHICH 1
#define HAVE_LIBM 1
#define HAVE_LIMITS 1
#define HAVE_LIMITS_H 1
#define HAVE_LONG_DOUBLE 1
#define HAVE_LONG_LONG 1
#define HAVE_MALLOC_H 1
#define HAVE_MEMORY_H 1
#define HAVE_MKDIR 1
#define HAVE_MKTEMP 1
#define HAVE_OPEN 1
#define HAVE_OSTREAM 1
#define HAVE_PCLOSE 1
#define HAVE_POPEN 1
#define HAVE_PROCESS_H 1
#define HAVE_PUTENV 1
#define HAVE_SETLOCALE 1
#define HAVE_SNPRINTF 1
#define HAVE_SSTREAM 1
#define HAVE_STDDEF_H 1
#define HAVE_STDINT_H 1
#define HAVE_STDINT_H_WITH_UINTMAX 1
#define HAVE_STDLIB_H 1
#define HAVE_STD_COUNT 1
#define HAVE_STRCASECMP 1
#define HAVE_STRDUP 1
#define HAVE_STRERROR 1
#define HAVE_STRINGS_H 1
#define HAVE_STRING_H 1
#define HAVE_STRTOUL 1
#define HAVE_SYS_PARAM_H 1
#define HAVE__POPEN 1
#define HAVE_SYS_TYPES_H 1
#define HAVE_UINTMAX_T 1
#define HAVE_UNISTD_H 1
#define HAVE_UNSIGNED_LONG_LONG 1
#define HAVE_WCHAR_T 1
#define HAVE_WCSLEN 1
#define HAVE_WINT_T 1
#define HAVE_ZLIB_H 1
#define HAVE__CLOSE 1
#define HAVE__GETPID 1
#define HAVE__MKDIR 1
#define HAVE__OPEN 1
#define HAVE__PCLOSE 1
#define HAVE__POPEN 1
#define ICONV_CONST
#define INTDIV0_RAISES_SIGFPE 1
#define MKDIR_TAKES_ONE_ARG 1
#define MODERN_STL_STREAMS 1
#define PACKAGE_BUGREPORT "[email protected]"
#define PACKAGE_NAME "LyX"
#define PACKAGE_STRING "LyX 1.5.0svn"
#define PACKAGE_TARNAME "lyx"
#define RETSIGTYPE void
#define STDC_HEADERS 1
#define TIME_WITH_SYS_TIME 1
#define USE_WINDOWS_PACKAGING 1
#define X_DISPLAY_MISSING 1
#define _GLIBCXX_CONCEPT_CHECKS 1
#define gid_t int
#define uid_t int
int mkstemp(char*);