Mercurial > hg > octave-lojdl
changeset 4577:233512ebf15d
[project @ 2003-10-31 06:31:14 by jwe]
author | jwe |
---|---|
date | Fri, 31 Oct 2003 06:31:21 +0000 |
parents | f60762fa234f |
children | 88ef6f3701d2 |
files | libcruft/misc/f77-fcn.h liboctave/ChangeLog liboctave/file-ops.cc |
diffstat | 3 files changed, 21 insertions(+), 6 deletions(-) [+] |
line wrap: on
line diff
--- a/libcruft/misc/f77-fcn.h +++ b/libcruft/misc/f77-fcn.h @@ -87,13 +87,13 @@ #define F77_CHAR_ARG(x) octave_make_cray_ftn_ch_dsc (x, strlen (x)) #define F77_CONST_CHAR_ARG(x) \ octave_make_cray_const_ftn_ch_dsc (x, strlen (x)) -#define F77_CHAR_ARG2(x, l) octave_make_cray_fcd (x, l) -#define F77_CONST_CHAR_ARG2(x, l) octave_make_cray_const_fcd (x, l) +#define F77_CHAR_ARG2(x, l) octave_make_cray_ftn_ch_dsc (x, l) +#define F77_CONST_CHAR_ARG2(x, l) octave_make_cray_const_ftn_ch_dsc (x, l) #define F77_CXX_STRING_ARG(x) \ octave_make_cray_const_ftn_ch_dsc (x.c_str (), x.length ()) #define F77_CHAR_ARG_LEN(l) -#define F77_CHAR_ARG_DECL octave_cray_fcd -#define F77_CONST_CHAR_ARG_DECL octave_cray_fcd +#define F77_CHAR_ARG_DECL octave_cray_ftn_ch_dsc +#define F77_CONST_CHAR_ARG_DECL octave_cray_ftn_ch_dsc #define F77_CHAR_ARG_LEN_DECL #define F77_RET_T int #define F77_RETURN(retval) return retval;
--- a/liboctave/ChangeLog +++ b/liboctave/ChangeLog @@ -1,5 +1,9 @@ 2003-10-31 John W. Eaton <jwe@bevo.che.wisc.edu> + * file-ops.cc (file_ops::symlink): Cope with systems that expect + non-const args for symlink system call. + (file_ops::readlink): Likewise, for readlink. + * DASRT.cc (DASRT::integrate): Fix typo in Fortran function name. 2003-10-30 John W. Eaton <jwe@bevo.che.wisc.edu>
--- a/liboctave/file-ops.cc +++ b/liboctave/file-ops.cc @@ -182,7 +182,14 @@ int status = -1; #if defined (HAVE_SYMLINK) - status = ::symlink (old_name.c_str (), new_name.c_str ()); + + OCTAVE_LOCAL_BUFFER (char, old_nm, old_name.length ()); + OCTAVE_LOCAL_BUFFER (char, new_nm, new_name.length ()); + + strcpy (old_nm, old_name.c_str ()); + strcpy (new_nm, new_name.c_str ()); + + status = ::symlink (old_nm, new_nm); if (status < 0) { @@ -216,7 +223,11 @@ #if defined (HAVE_READLINK) char buf[MAXPATHLEN+1]; - status = ::readlink (path.c_str (), buf, MAXPATHLEN); + OCTAVE_LOCAL_BUFFER (char, p, path.length ()); + + strcpy (p, path.c_str ()); + + status = ::readlink (p, buf, MAXPATHLEN); if (status < 0) {