Mercurial > hg > octave-lyh
changeset 4093:5a82e874999b
[project @ 2002-10-08 23:48:45 by jwe]
author | jwe |
---|---|
date | Tue, 08 Oct 2002 23:48:46 +0000 |
parents | 01f46b36e11f |
children | 3e631060ab8f |
files | ChangeLog Makeconf.in aclocal.m4 doc/ChangeLog doc/interpreter/Makefile.in liboctave/ChangeLog liboctave/getopt.h liboctave/lo-cutils.c liboctave/oct-env.cc scripts/ChangeLog scripts/Makefile.in src/ChangeLog src/Makefile.in src/lex.l src/utils.cc |
diffstat | 15 files changed, 89 insertions(+), 29 deletions(-) [+] |
line wrap: on
line diff
--- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,12 @@ +2002-10-08 John W. Eaton <jwe@bevo.che.wisc.edu> + + * aclocal.m4 (OCTAVE_PROG_NM): Do the right thing for cross compiling. + (OCTAVE_CXX_PREPENDS_UNDERSCORE): Require OCTAVE_PROG_NM. + (OCTAVE_CXX_ABI): Likewise. + + * Makeconf.in (BUILD_CC, BUILD_CFLAGS, BUILD_CXX, BUILD_CXXFLAGS): + New variables for cross compiling. + 2002-10-07 Paul Kienzle <pkienzle@users.sf.net> * configure.in: Check for raise.
--- a/Makeconf.in +++ b/Makeconf.in @@ -113,6 +113,9 @@ ALL_CFLAGS = $(INCFLAGS) $(DEFS) $(XTRA_CFLAGS) $(CFLAGS) BUG_CFLAGS = $(DEFS) $(XTRA_CFLAGS) $(CFLAGS) +BUILD_CC = $(CC) +BUILD_CFLAGS = $(CFLAGS) + DEPEND_FLAGS = @DEPEND_FLAGS@ DEPEND_EXTRA_SED_PATTERN = @DEPEND_EXTRA_SED_PATTERN@ @@ -126,6 +129,9 @@ UGLY_ALL_CXXFLAGS = $(INCFLAGS) $(UGLY_DEFS) $(XTRA_CXXFLAGS) $(CXXFLAGS) BUG_CXXFLAGS = $(DEFS) $(XTRA_CXXFLAGS) $(CXXFLAGS) +BUILD_CXX = $(CXX) +BUILD_CXXFLAGS = $(CXXFLAGS) + CPPFLAGS = @CPPFLAGS@ LD_CXX = @LD_CXX@
--- a/aclocal.m4 +++ b/aclocal.m4 @@ -510,21 +510,16 @@ dnl dnl OCTAVE_PROG_NM AC_DEFUN(OCTAVE_PROG_NM, -[if test "$cross_compiling" = yes; then - NM=nm - AC_MSG_RESULT(assuming $NM exists on $canonical_host_type host) +[AC_CHECK_PROG(NM, ${ac_tool_prefix}nm, ${ac_tool_prefix}nm, []) AC_SUBST(NM) -else - AC_CHECK_PROG(NM, nm, nm, []) - AC_SUBST(NM) -fi ]) dnl dnl See if the C++ compiler prepends an underscore to external names. dnl dnl OCTAVE_CXX_PREPENDS_UNDERSCORE -AC_DEFUN(OCTAVE_CXX_PREPENDS_UNDERSCORE, -[AC_MSG_CHECKING([whether ${CXX-g++} prepends an underscore to external names]) +AC_DEFUN(OCTAVE_CXX_PREPENDS_UNDERSCORE, [ + AC_REQUIRE([OCTAVE_PROG_NM]) + AC_MSG_CHECKING([whether ${CXX-g++} prepends an underscore to external names]) AC_CACHE_VAL(octave_cv_cxx_prepends_underscore, [octave_cv_cxx_prepends_underscore=no AC_LANG_PUSH(C++) @@ -616,8 +611,9 @@ dnl will happen when using an unsupported C++ compiler. dnl dnl OCTAVE_CXX_ABI -AC_DEFUN(OCTAVE_CXX_ABI, -[AC_MSG_CHECKING([C++ ABI version used by ${CXX}]) +AC_DEFUN(OCTAVE_CXX_ABI, [ + AC_REQUIRE([OCTAVE_PROG_NM]) + AC_MSG_CHECKING([C++ ABI version used by ${CXX}]) AC_CACHE_VAL(octave_cv_cxx_abi, [octave_cv_cxx_abi='unknown' AC_LANG_PUSH(C++)
--- a/doc/ChangeLog +++ b/doc/ChangeLog @@ -1,3 +1,11 @@ +2002-10-08 John W. Eaton <jwe@bevo.che.wisc.edu> + + * interpreter/Makefile.in (munge-texi, %.o : %.cc): + Use $(BUILD_CXX), not $(CXX). + (src-DOCSTRINGS, scripts-DOCSTRINGS): New targets. + ($(TEXIFNO)): Depend on them. + (DOCSTRINGS): Delete variable. + 2002-10-02 John W. Eaton <jwe@bevo.che.wisc.edu> * interpreter/Makefile.in (%.spell): Use $(SED), not sed.
--- a/doc/interpreter/Makefile.in +++ b/doc/interpreter/Makefile.in @@ -62,16 +62,21 @@ all: octave.info octave.dvi octave.ps octave_toc.html .PHONY: all -DOCSTRINGS = $(TOPDIR)/src/DOCSTRINGS $(TOPDIR)/scripts/DOCSTRINGS +$(TEXINFO): src-DOCSTRINGS scripts-DOCSTRINGS munge-texi -$(TEXINFO): $(DOCSTRINGS) munge-texi +%.o : %.cc + $(BUILD_CXX) -c $(INCFLAGS) -DHAVE_CONFIG_H $< -o $@ munge-texi: munge-texi.o Map-s.o - $(CXX) $(CPPFLAGS) $(ALL_CXXFLAGS) $(ALL_LDFLAGS) -o $@ $^ + $(BUILD_CXX) -o $@ $^ -# Kluge: if the DOCSTRING files are present, assume they are current. -$(DOCSTRINGS): - $(MAKE) -C $(dir $@) $(notdir $@) +src-DOCSTRINGS: + $(MAKE) -C ../../src DOCSTRINGS +.PHONY: src-DOCSTRINGS + +scripts-DOCSTRINGS: + $(MAKE) -C ../../scripts DOCSTRINGS +.PHONY: scripts-DOCSTRINGS %.texi : %.txi @echo making $@ from $<
--- a/liboctave/ChangeLog +++ b/liboctave/ChangeLog @@ -1,3 +1,16 @@ +2002-10-07 Paul Kienzle <pkienzle@users.sf.net> + + * lo-cutils.c: On non-Posix Windows systems, include winsock.h. + +2002-10-07 Paul Kienzle <pkienzle@users.sf.net> + + * oct-env.cc (octave_env::do_absolute_pathname): Recognize + absolute path names under MinGW as well. + +2002-10-07 John W. Eaton <jwe@bevo.che.wisc.edu> + + * oct-env.cc: Include <cctype> too. + 2002-10-04 John W. Eaton <jwe@bevo.che.wisc.edu> * oct-env.cc (octave_env::do_absolute_pathname): Handle Windows
--- a/liboctave/getopt.h +++ b/liboctave/getopt.h @@ -95,14 +95,7 @@ #define optional_argument 2 #if __STDC__ -#if defined(__GNU_LIBRARY__) -/* Many other libraries have conflicting prototypes for getopt, with - differences in the consts, in stdlib.h. To avoid compilation - errors, only prototype getopt for the GNU C library. */ extern int getopt (int argc, char *const *argv, const char *shortopts); -#else /* not __GNU_LIBRARY__ */ -extern int getopt (); -#endif /* not __GNU_LIBRARY__ */ extern int getopt_long (int argc, char *const *argv, const char *shortopts, const struct option *longopts, int *longind); extern int getopt_long_only (int argc, char *const *argv,
--- a/liboctave/lo-cutils.c +++ b/liboctave/lo-cutils.c @@ -56,7 +56,11 @@ return (char *) strptime (buf, format, tm); } -#if ! defined (HAVE_GETHOSTNAME) && defined (HAVE_SYS_UTSNAME_H) +#if defined (__WIN32__) && ! defined (_POSIX_VERSION) + +#include <winsock.h> + +#elif ! defined (HAVE_GETHOSTNAME) && defined (HAVE_SYS_UTSNAME_H) #include <sys/utsname.h>
--- a/liboctave/oct-env.cc +++ b/liboctave/oct-env.cc @@ -40,7 +40,9 @@ #include <config.h> #endif +#include <cctype> #include <cstdlib> + #include <string> #ifdef HAVE_UNISTD_H @@ -249,7 +251,7 @@ if (s[0] == '/') return true; -#if defined (__CYGWIN__) +#if defined (__WIN32__) if ((len == 2 && isalpha (s[0]) && s[1] == ':') || (len > 2 && isalpha (s[0]) && s[1] == ':' && is_dir_sep (s[2]))) return true;
--- a/scripts/ChangeLog +++ b/scripts/ChangeLog @@ -1,3 +1,7 @@ +2002-10-08 John W. Eaton <jwe@bevo.che.wisc.edu> + + * Makefile.in (gethelp): Use $(BUILD_CXX), not $(CXX). + 2002-09-27 Paul Kienzle <pkienzle@users.sf.net> * statistics/distributions/normal_cdf.m: Handle variance == 0.
--- a/scripts/Makefile.in +++ b/scripts/Makefile.in @@ -52,6 +52,9 @@ $(srcdir)/mkdoc $(srcdir) > $@.t mv $@.t $@ +gethelp: gethelp.cc + $(BUILD_CXX) -o $@ $^ + install install-strip uninstall clean mostlyclean distclean maintainer-clean:: @$(subdir-for-command) .PHONY: install install-strip uninstall
--- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,11 @@ +2002-10-08 John W. Eaton <jwe@bevo.che.wisc.edu> + + * Makefile.in (gendoc): Use $(BUILD_CXX), not $(CXX). + +2002-10-07 John W. Eaton <jwe@bevo.che.wisc.edu> + + * utils.cc (octave_sleep): Cast result of modf to unsigned int. + 2002-10-07 Paul Kienzle <pkienzle@users.sf.net> * sighandlers.cc (my_friendly_exit): If kill is unavailable, use
--- a/src/Makefile.in +++ b/src/Makefile.in @@ -316,7 +316,7 @@ @$(top_srcdir)/move-if-change $@-t $@ gendoc: gendoc.cc - $(CXX) -o $@ $^ + $(BUILD_CXX) -o $@ $^ ops.cc: $(OP_SRC) mkops @echo making $@ from $(OP_SRC)
--- a/src/lex.l +++ b/src/lex.l @@ -33,6 +33,13 @@ #include <string> +#ifdef HAVE_UNISTD_H +#ifdef HAVE_SYS_TYPES_H +#include <sys/types.h> +#endif +#include <unistd.h> +#endif + #include "SLStack.h" #include "cmd-edit.h"
--- a/src/utils.cc +++ b/src/utils.cc @@ -756,9 +756,11 @@ { double t; - unsigned int usec = modf (seconds, &t) * 1000000; + unsigned int usec + = static_cast <unsigned int> (modf (seconds, &t) * 1000000); - unsigned int sec = (t > UINT_MAX) ? UINT_MAX : (unsigned int) t; + unsigned int sec + = (t > UINT_MAX) ? UINT_MAX : static_cast <unsigned int> (t); octave_sleep (sec); octave_usleep (usec);