Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Tcl 7.6b1 & AIX 3.2.5: fCmd.test fails

0 views
Skip to first unread message

Arnold Troeger

unread,
Sep 16, 1996, 3:00:00 AM9/16/96
to

X-Disclaimer: Opinions expressed here are my own and not UNOCAL's

I've just compiled and linked tcl 7.6b1 for AIX 3.2.5. It's compiled
and linked successfully, but it fails on all of the fCmd.test tests.
I upgraded to this version of tcl from tcl 7.5p1 because tcl 7.5 fails
the io.test on this operating system. Strangely, tcl 7.5 passes the
fCmd.test tests :-/. Has anyone seen this problem? How did you
address it?
--
Arnold Troeger Louisiana/Gulf Business Unit
Phone: (318)-295-6752 4021 Ambassador Caffery
Email: Arnold....@lafayette.unocal.com Lafayette, LA 70503

------------------------------------------------------------------------

"Microsoft Windows: for when your machine is just too fast"


Deron E. Meranda

unread,
Sep 18, 1996, 3:00:00 AM9/18/96
to

Arnold Troeger wrote in "Tcl 7.6b1 & AIX 3.2.5: fCmd.test fails":

> I've just compiled and linked tcl 7.6b1 for AIX 3.2.5. It's compiled
> and linked successfully, but it fails on all of the fCmd.test tests.
> ... Has anyone seen this problem? How did you address it?

I don't know if yours is the *same* problem, but here's mine...

I also encountered this problem on an "HP9000 series 800" running
HP-UX 9.04. I have configured tcl 7.6b1 to use shared libraries and
am compiling it with gcc 2.7.2. I'm also convinced that this problem
also exists under HP-UX 10.01 as well, but I haven't tried it for sure.

The problem is in the file "unix/tclUnixFCmd.c" in the function
CopyFileAtts(). This function makes use of the utimes() call to
set the file access/modification timestamp. However, this function
does not exist under HP-UX. Instead, there is an equivalent
function called utime() [without the 's']. Unfortunately, when
using shared libraries, the unresolved function is not reported
until run-time, when it produces a nice core dump!

There are also two other comments which are specific to HP-UX.
1. The "#ifdef HPUX" construct does not work unless you
provide a "-DHPUX" on the compiler command line. The
correct test symbol appears to be __hpux__, at least
under gcc.
2. The HP-UX operating system allows files to have
additional security information (ACL's) on them
in addition to the traditional user/group/other
file permissions. This function should also try to
copy this information as well. If anyone is interrested
in the code to do this, let me know an I'll post it.

Now on to the changes...
The changes are minor and involve two files. However, the
correct patches should probably involve updating the
autoconfigure templates to check for the existance of the
utimes() vs. utime() call to begin with. Therefore, I'll
explain my changes rather than provide diff output.

In file "unix/tclUnixPort.h" add the following lines
anywhere...

#ifdef HPUX
# include <utime.h>
#endif

In the file "unix/tclUnixFCmd.c", modify the function CopyFileAtts
as follows:

From
struct timeval tval[2];
To
#ifdef HPUX
struct utimbuf tval;
#else
struct timeval tval[2];
#endif

From
tval[0].tv_sec = ...
To
#ifdef HPUX
tval.actime = statBufPtr->st_atime;
tval.modtime = statBufPtr->st_mtime;
if (utime(dst, & tval)) {
return TCL_ERROR;
}
#else
tval[0].tv_sec = ... ---the same as above
...
return TCL_ERROR;
}
#endif


Please email me with any questions. Note, I plan on doing an
HP-UX 10.20 port in a few weeks as soon as I receive the
CD-ROMS from HP. 10.20 is the "newest" version of HP-UX, just
released late this summer.
--
Mr. Deron E. Meranda Sr. Technical Staff Member/System
Administrator
email #1: <dmer...@acm.org> MedPlus, Inc.; 8805 Governor's Hill Drive
or #2: <dmer...@iac.net> Cincinnati, Ohio 45249, USA
PGP Encryption Key: finger #2 WWW Home Page: http://www.iac.net/~dmeranda

0 new messages