From: Jan Nieuwenhuizen Date: Sat, 4 Feb 2006 15:23:58 +0000 (+0000) Subject: * .cvsignore: Add out*, out-www, config-*. Remove lots of cruft. X-Git-Tag: release/2.7.31~4 X-Git-Url: https://git.donarmstrong.com/lilypond.git?a=commitdiff_plain;h=f302b742f6ed9ffb37abf9162618596782c3a5d6;p=lilypond.git * .cvsignore: Add out*, out-www, config-*. Remove lots of cruft. * flower/include/std-vector.hh[!HAVE_STL_DATA_METHOD]: Workaround. * config.hh.in (HAVE_STL_DATA_METHOD): Add. * stepmake/aclocal.m4 (STEPMAKE_STL_DATA_METHOD): New function. * configure.in: Use it. --- diff --git a/.cvsignore b/.cvsignore index bb83430d3a..8f0fecb20e 100644 --- a/.cvsignore +++ b/.cvsignore @@ -13,172 +13,28 @@ *.pdf *.png *.ps +*.pyc *.svg *.tely *.tex +*.twy *.txt *[0-9]pk +*configure *~ .gdbinit +.gdbinit .htaccess .lineno -1000.scsm GNUmakefile -System -ab -aclocal.m4 -add -aly -arial.pfa autom4te.cache -ay -ay.tar.gz -aybabtu.afm -b -bench.sh -bla -bla.lytex -builddir.make -c.afm -c.pfb -calls -cf2.zip -cffpats -conf32255.sh -config-g16.hh -config-g16.make -config-g164.hh -config-g164.make -config-g16nothread.hh -config-g16nothread.make -config-g16opt.hh -config-g16opt.make -config-opt.hh -config-opt.make -config-optsize.hh -config-optsize.make -config-prof.hh -config-prof.make -config-speed.hh -config-speed.make -config.hh -config.make -config.status -configure -cont -cp.out -crashes +config-*.h +config-*.make custom.py -d -dif -example-1.texstr -exp.scm -f.texstr -f.textmetrics -fcc.c -fi.py -fingpats -firefox.icns -fondu3FB3-2 -fondu_src-050825.tgz -fontconfig -fontconfig.c -foo.c -foo.make -glob -grob-array-pats -gsbug-inv -gspatch -gstest -hello -hello.utf -htpasswd -install-sh -invstrength -les-nereides.dsc -les-nereides.texstr -les-nereides.textmetrics -lib -lilymydear.zip -lilypond-2.6.0-2.7.0.diff -lilypond-internals.texi -lilypond-tools.zip -log -lppats -lute_archives -m -makefile.pango -makelily.py -mehl -mingw -morgenlied.lpm -morgenlied.texstr -munix -mxlpats -ncsb-ttf -ncsb-ttf.tar.gz -notitle.zip -o2 -ok -optpars.py -optparse.py -optparse.pyc -os -otftest.c +dummy.dep +nohup.out +*/out/* out -out-g16 -out-g164 -out-g16nothread -out-g16opt -out-opt -out-optsize -out-prof -out-speed +out-* out-www -out.ai -out.pfa -out.sk -out.spsc -p -p2 -pango -pango.c -patch -patent -pats -pic -pl.afm -polyprof -quotpats -re -s -s.py -scons.cache -setup.ini -sf.ai -sgz -share -sib.py -simple-song.twy socket-output -stat -string -sys -t -t.gz -t2.c -talk.py -test.py -test.scm -timtekst -ud -uninstalldirs -update-rhsources.sh -us -usr -ver -webdif -wrap.scm -wtk-prof -wtk-prof2 -wtk1-fugue2.scm diff --git a/ChangeLog b/ChangeLog index 6062291452..75255614c1 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,15 @@ +2006-02-04 Jan Nieuwenhuizen + + * .cvsignore: Add out*, out-www, config-*. Remove lots of cruft. + + * flower/include/std-vector.hh[!HAVE_STL_DATA_METHOD]: Workaround. + + * config.hh.in (HAVE_STL_DATA_METHOD): Add. + + * stepmake/aclocal.m4 (STEPMAKE_STL_DATA_METHOD): New function. + + * configure.in: Use it. + 2006-02-04 Han-Wen Nienhuys * scm/music-functions.scm (pitch-of-note): new function. diff --git a/config.hh.in b/config.hh.in index 19ba1403d6..6e7d0dc8db 100644 --- a/config.hh.in +++ b/config.hh.in @@ -43,6 +43,12 @@ /* define if you have snprintf */ #define HAVE_SNPRINTF 0 +/* define if you have lrint */ +#define HAVE_LRINT 0 + +/* define if you have stl data () method */ +#define HAVE_STL_DATA_METHOD 0 + /* define if you have vsnprintf */ #define HAVE_VSNPRINTF 0 diff --git a/configure.in b/configure.in index e9047ff59c..ee6816b52c 100644 --- a/configure.in +++ b/configure.in @@ -92,6 +92,7 @@ STEPMAKE_GCC(REQUIRED, 2.8) STEPMAKE_CXX(REQUIRED) STEPMAKE_GXX(REQUIRED, 3.0.5) STEPMAKE_CXXTEMPLATE +STEPMAKE_STL_DATA_METHOD STEPMAKE_LIB(REQUIRED) STEPMAKE_DLOPEN # Do not use bison 1.50 and 1.75. diff --git a/flower/include/std-vector.hh b/flower/include/std-vector.hh index e8367ae8a6..7fef97abfb 100644 --- a/flower/include/std-vector.hh +++ b/flower/include/std-vector.hh @@ -41,7 +41,6 @@ int default_compare (T *const &a, T *const &b) #if !STD_VECTOR /* Also declare vector, in the wrong way. */ -#include #include #include #endif @@ -50,7 +49,45 @@ int default_compare (T *const &a, T *const &b) #if STD_VECTOR +#include "config.hh" + +#if HAVE_STL_DATA_METHOD +#include +#else /* !HAVE_STL_DATA_METHOD */ +#define vector __vector #include +#undef vector +namespace std { + /* Interface without pointer arithmetic (iterator) semantics. */ + template + class vector : public __vector + { + public: + typedef typename __vector::iterator iterator; + typedef typename __vector::const_iterator const_iterator; + + vector () : __vector () + { + } + + vector (const_iterator b, const_iterator e) : __vector (b, e) + { + } + + T* + data () + { + return &(*this)[0]; + } + + T const* + data () const + { + return &(*this)[0]; + } + }; +} +#endif /* !HAVE_STL_DATA_METHOD */ namespace std { diff --git a/stepmake/aclocal.m4 b/stepmake/aclocal.m4 index 4df01ca3ce..8ec3c5954d 100644 --- a/stepmake/aclocal.m4 +++ b/stepmake/aclocal.m4 @@ -728,7 +728,7 @@ AC_DEFUN(STEPMAKE_INIT, [ do `make conf=CONF' to get output in ./out-CONF], [CONFIGURATION=$enableval]) - ##' + ##'`# test -n "$CONFIGURATION" && CONFIGSUFFIX="-$CONFIGURATION" CONFIGFILE=config$CONFIGSUFFIX @@ -1038,6 +1038,25 @@ AC_DEFUN(STEPMAKE_PYTHON_DEVEL, [ fi ]) +AC_DEFUN(STEPMAKE_STL_DATA_METHOD, [ + AC_LANG_PUSH(C++) + AC_CACHE_CHECK([for stl.data () method], + [stepmake_stl_data_method], + AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[ +#include +using namespace std; +vector v; +(void) v.data (); +]])], + [stepmake_stl_data_method=yes], + [stepmake_stl_data_method=no])) + if test $stepmake_stl_data_method = yes; then + AC_DEFINE(HAVE_STL_DATA_METHOD, 1, [define if stl classes have data () method]) + fi + AC_LANG_POP(C++) +]) + + AC_DEFUN(STEPMAKE_TEXMF_DIRS, [ # ugh STEPMAKE_PROGS(KPSEWHICH, kpsewhich, OPTIONAL)