# HG changeset patch # User jwe # Date 1022218198 0 # Node ID 8a5596d6f7c40913cdeff1e4dd0aad9015ffe574 # Parent dc970f5941ee4001fe1f86240ea362d18e1cc4c7 [project @ 2002-05-24 05:29:57 by jwe] diff -r dc970f5941ee -r 8a5596d6f7c4 ChangeLog --- a/ChangeLog Thu May 23 20:28:56 2002 +0000 +++ b/ChangeLog Fri May 24 05:29:58 2002 +0000 @@ -1,3 +1,11 @@ +2002-05-24 John W. Eaton + + * configure.in: Maybe add -fno-coalesce-templates to XTRA_CXXFLAGS + on darwin systems. + (SH_LDFLAGS): Set this on darwin systems. + (RDYNAMIC_FLAG): Never set this to -rdynamic on darwin systems. + (UGLY_DEFS): Cope with broken sed or shell quoting on darwin systems. + 2002-05-16 John W. Eaton * aclocal.m4 (OCTAVE_CXX_ISO_COMPLIANT_LIBRARY): Omit cwctype. diff -r dc970f5941ee -r 8a5596d6f7c4 configure.in --- a/configure.in Thu May 23 20:28:56 2002 +0000 +++ b/configure.in Fri May 24 05:29:58 2002 +0000 @@ -22,7 +22,7 @@ ### 02111-1307, USA. AC_INIT -AC_REVISION($Revision: 1.358 $) +AC_REVISION($Revision: 1.359 $) AC_PREREQ(2.52) AC_CONFIG_SRCDIR([src/octave.cc]) AC_CONFIG_HEADER(config.h) @@ -290,6 +290,13 @@ ### We do our own template instantiation for specific compilers. if test "$cxx_auto_instantiate_templates" = no; then + case "$canonical_host_type" in + *-*-darwin*) + OCTAVE_CXX_FLAG(-fno-coalesce-templates, [ + XTRA_CXXFLAGS="$XTRA_CXXFLAGS -fno-coalesce-templates" + AC_MSG_RESULT([adding -fno-coalesce-templates to XTRA_CXXFLAGS])]) + ;; + esac OCTAVE_CXX_FLAG(-fno-implicit-templates, [ XTRA_CXXFLAGS="$XTRA_CXXFLAGS -fno-implicit-templates" AC_MSG_RESULT([adding -fno-implicit-templates to XTRA_CXXFLAGS])]) @@ -636,6 +643,9 @@ SONAME_FLAGS='-Xlinker -soname -Xlinker $@' RLD_FLAG='-Xlinker -rpath -Xlinker $(octlibdir)' ;; + *-*-darwin*) + SH_LDFLAGS='-bundle -bundle_loader $(bindir)/octave' + ;; *-*-linux* | *-*-gnu*) SONAME_FLAGS='-Xlinker -soname -Xlinker $@' RLD_FLAG='-Xlinker -rpath -Xlinker $(octlibdir)' @@ -888,7 +898,13 @@ ;; esac if $WITH_DL; then - OCTAVE_CXX_FLAG(-rdynamic, [RDYNAMIC_FLAG=-rdynamic]) + case "$canonical_host_type" in + *-*-darwin*) + ;; + *) + OCTAVE_CXX_FLAG(-rdynamic, [RDYNAMIC_FLAG=-rdynamic]) + ;; + esac AC_DEFINE(WITH_DL, 1, [Define if using dlopen/dlsym.]) fi else @@ -1122,7 +1138,19 @@ ### UGLY_DEFS for that. AC_OUTPUT_MAKE_DEFS -UGLY_DEFS=`echo $DEFS | sed 's,\\",\\\\\\\\\\\\\\\\\\",g'` + + +dnl Maybe this should really be conditional on "broken sed", or +dnl "broken shell backslash quoting" or somesuch. +dnl +case "$canonical_host_type" in + *-*-darwin*) + UGLY_DEFS=`echo $DEFS | sed 's,\\",\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\",g'` + ;; + *) + UGLY_DEFS=`echo $DEFS | sed 's,\\",\\\\\\\\\\\\\\\\\\",g'` + ;; +esac AC_MSG_RESULT([defining UGLY_DEFS to be $UGLY_DEFS]) AC_SUBST(UGLY_DEFS) diff -r dc970f5941ee -r 8a5596d6f7c4 src/ChangeLog --- a/src/ChangeLog Thu May 23 20:28:56 2002 +0000 +++ b/src/ChangeLog Fri May 24 05:29:58 2002 +0000 @@ -1,3 +1,14 @@ +2002-05-24 John W. Eaton + + * load-save.cc (hdf5_import_multidim, hdf5_check_attr, + hdf5_callback_data, hdf5_read_next_data, read_hdf5_data, + add_hdf5_data): Use 0, not NULL in calls to HDF routines. + + * oct-procbuf.cc (octave_procbuf::open): Use NULL, not 0 as last + arg in call to execl.xo + + * debug.cc (get_user_function): Initialise dbg_fcn to 0, not NULL. + 2002-05-23 John W. Eaton * DLD-FUNCTIONS/lsode.cc (LSODE_options::da_set_opt_mf, diff -r dc970f5941ee -r 8a5596d6f7c4 src/debug.cc --- a/src/debug.cc Thu May 23 20:28:56 2002 +0000 +++ b/src/debug.cc Fri May 24 05:29:58 2002 +0000 @@ -52,7 +52,7 @@ static octave_user_function * get_user_function (std::string str = "") { - octave_user_function *dbg_fcn = NULL; + octave_user_function *dbg_fcn = 0; if (str.compare ("")) { diff -r dc970f5941ee -r 8a5596d6f7c4 src/load-save.cc --- a/src/load-save.cc Thu May 23 20:28:56 2002 +0000 +++ b/src/load-save.cc Fri May 24 05:29:58 2002 +0000 @@ -1185,7 +1185,7 @@ nc = dims[0]; // octave uses column-major & HDF5 uses row-major nr = dims[1]; - hid_t mem_space_id = H5Screate_simple (2, dims, NULL); + hid_t mem_space_id = H5Screate_simple (2, dims, 0); if (mem_space_id < 0) return -1; @@ -1194,7 +1194,7 @@ return -1; if (H5Sselect_hyperslab (space_id, H5S_SELECT_SET, - start, NULL, count, NULL) < 0) + start, 0, count, 0) < 0) { H5Sclose (mem_space_id); return -1; @@ -1269,7 +1269,7 @@ // reporting function: H5Eget_auto (&err_func, &err_func_data); - H5Eset_auto (NULL, NULL); + H5Eset_auto (0, 0); hid_t attr_id = H5Aopen_name (loc_id, attr_name); @@ -1675,7 +1675,7 @@ bool is_list = hdf5_check_attr (subgroup_id, "OCTAVE_LIST"); hdf5_callback_data dsub; - dsub.name = dsub.doc = (char*) NULL; + dsub.name = dsub.doc = (char*) 0; dsub.global = 0; dsub.complex_type = d->complex_type; dsub.range_type = d->range_type; @@ -1733,7 +1733,7 @@ if (retval > 0) { // get documentation string, if any: - int comment_length = H5Gget_comment (group_id, name, 0, NULL); + int comment_length = H5Gget_comment (group_id, name, 0, 0); if (comment_length > 1) { @@ -1748,7 +1748,7 @@ strcpy (d->doc, name); } else - d->doc = (char *) NULL; + d->doc = (char *) 0; // copy name (actually, vname): d->name = new char [strlen (vname) + 1]; @@ -1804,9 +1804,9 @@ hdf5_ifstream& hs = (hdf5_ifstream&) is; hdf5_callback_data d; - d.name = (char *) NULL; + d.name = (char *) 0; d.global = 0; - d.doc = (char *) NULL; + d.doc = (char *) 0; d.complex_type = hdf5_make_complex_type (H5T_NATIVE_DOUBLE); d.range_type = hdf5_make_range_type (H5T_NATIVE_DOUBLE); d.import = import; @@ -3654,7 +3654,7 @@ goto error_cleanup; dims[0] = nr; - space_id = H5Screate_simple (nr > 0 ? 1 : 0, dims, (hsize_t*) NULL); + space_id = H5Screate_simple (nr > 0 ? 1 : 0, dims, (hsize_t*) 0); if (space_id < 0) goto error_cleanup; @@ -3681,7 +3681,7 @@ } else if (tc.is_range ()) { - space_id = H5Screate_simple (0, dims, (hsize_t*) NULL); + space_id = H5Screate_simple (0, dims, (hsize_t*) 0); if (space_id < 0) goto error_cleanup; @@ -3706,7 +3706,7 @@ } else if (tc.is_real_scalar ()) { - space_id = H5Screate_simple (0, dims, (hsize_t*) NULL); + space_id = H5Screate_simple (0, dims, (hsize_t*) 0); if (space_id < 0) goto error_cleanup; data_id = H5Dcreate (loc_id, name.c_str (), @@ -3725,7 +3725,7 @@ dims[1] = m.rows (); // Octave uses column-major, while dims[0] = m.columns (); // HDF5 uses row-major ordering - space_id = H5Screate_simple (dims[1] > 1 ?2:1, dims, (hsize_t*) NULL); + space_id = H5Screate_simple (dims[1] > 1 ?2:1, dims, (hsize_t*) 0); if (space_id < 0) goto error_cleanup; @@ -3765,7 +3765,7 @@ } else if (tc.is_complex_scalar ()) { - space_id = H5Screate_simple (0, dims, (hsize_t*) NULL); + space_id = H5Screate_simple (0, dims, (hsize_t*) 0); if (space_id < 0) goto error_cleanup; @@ -3790,7 +3790,7 @@ dims[1] = m.rows (); // Octave uses column-major, while dims[0] = m.columns (); // HDF5 uses row-major ordering - space_id = H5Screate_simple (dims[1] > 1 ?2:1, dims, (hsize_t*) NULL); + space_id = H5Screate_simple (dims[1] > 1 ?2:1, dims, (hsize_t*) 0); if (space_id < 0) goto error_cleanup; diff -r dc970f5941ee -r 8a5596d6f7c4 src/oct-procbuf.cc --- a/src/oct-procbuf.cc Thu May 23 20:28:56 2002 +0000 +++ b/src/oct-procbuf.cc Fri May 24 05:29:58 2002 +0000 @@ -110,7 +110,7 @@ octave_procbuf_list = octave_procbuf_list->next; } - execl ("/bin/sh", "sh", "-c", command, NULL); + execl ("/bin/sh", "sh", "-c", command, 0); exit (127); }