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

patch 7 /usr/include/utime.h check doesn't work on Ultrix 3.1 (+Fix)

1 view
Skip to first unread message

Steve Hayman

unread,
Dec 22, 1989, 4:33:35 PM12/22/89
to
Patch 7 adds code to Configure to check for /usr/include/utime.h,
on the assumption that DG/UX is the only Unix that has this.
Unfortunately, Ultrix 3.1 has a slightly incompatible file by the same name.

The Ultrix file declares
struct utimbuf
{
time_t actime;
time_t modtime;
};

and apparently the DG/UX one also declares "acusec" and "modusec" fields.
So "doio.c" won't compile under Ultrix 3.1 .

One quick fix would be to change Configure to check not only for
/usr/include/utime.h but also for "acusec" in that file, and
define two different symbols. Here's a patch for Configure,
config.h.SH and doio.c that does that. Hope it's of use to someone.

*** Configure.old Fri Dec 22 15:50:09 1989
--- Configure Fri Dec 22 15:39:44 1989
***************
*** 176,181 ****
--- 176,182 ----
i_systime=''
d_systimekernel=''
i_utime=''
+ i_utimeacusec=''
i_varargs=''
i_vfork=''
intsize=''
***************
*** 2217,2228 ****
fi

: see if this is DG/UX with a funky utime.h
echo " "
if $test -r /usr/include/utime.h ; then
i_utime="$define"
! echo "utime.h found."
else
i_utime="$undef"
echo "No utime.h found, but that's ok."
fi

--- 2218,2240 ----
fi

: see if this is DG/UX with a funky utime.h
+
+ : also make sure the file contains 'acusec', since the ultrix one does not
+ : saha...@iuvax.cs.indiana.edu
+
echo " "
if $test -r /usr/include/utime.h ; then
i_utime="$define"
! if $contains acusec /usr/include/utime.h >/dev/null 2>&1 ; then
! i_utimeacusec="$define"
! echo "utime.h found."
! else
! echo "utime.h found, but it doesn't declare 'acusec', that's ok."
! i_utimeacusec="$undef"
! fi
else
i_utime="$undef"
+ i_utimeacusec="$undef"
echo "No utime.h found, but that's ok."
fi

***************
*** 2605,2610 ****
--- 2617,2623 ----
i_systime='$i_systime'
d_systimekernel='$d_systimekernel'
i_utime='$i_utime'
+ i_utimeacusec='$i_utimeacusec'
i_varargs='$i_varargs'
i_vfork='$i_vfork'
intsize='$intsize'
*** config.h.SH.old Fri Dec 22 15:55:48 1989
--- config.h.SH Fri Dec 22 15:56:11 1989
***************
*** 544,550 ****
--- 544,558 ----
* This symbol, if defined, indicates to the C program that it should
* include utime.h (a DG/UX thingie).
*/
+ /*
+ * I_UTIMEACUSEC:
+ * This symbol, if defined, indicates that utime.h includes an
+ * "acusec" field. Ultrix also has a utime.h file but only the
+ * DG/UX one defines "acusec". saha...@iuvax.cs.indiana.edu
+ */
#$i_utime I_UTIME /**/
+ #$i_utimeacusec I_UTIMEACUSEC /**/
+

/* I_VARARGS:
* This symbol, if defined, indicates to the C program that it should
*** doio.c.old Fri Dec 22 15:50:16 1989
--- doio.c Fri Dec 22 15:40:44 1989
***************
*** 1993,2000 ****

utbuf.actime = (long)str_gnum(st[++sp]); /* time accessed */
utbuf.modtime = (long)str_gnum(st[++sp]); /* time modified */
! #ifdef I_UTIME
! utbuf.acusec = 0; /* hopefully I_UTIME implies these */
utbuf.modusec = 0;
#endif
items -= 2;
--- 1993,2000 ----

utbuf.actime = (long)str_gnum(st[++sp]); /* time accessed */
utbuf.modtime = (long)str_gnum(st[++sp]); /* time modified */
! #if defined(I_UTIME) && defined(I_UTIMEACUSEC)
! utbuf.acusec = 0; /* not all utime.h's define these */
utbuf.modusec = 0;
#endif
items -= 2;

a.e.mossberg

unread,
Dec 22, 1989, 6:25:03 PM12/22/89
to
In article <32...@iuvax.cs.indiana.edu> saha...@iuvax.cs.indiana.edu (Steve Hayman) writes:
>Patch 7 adds code to Configure to check for /usr/include/utime.h,
>on the assumption that DG/UX is the only Unix that has this.
>Unfortunately, Ultrix 3.1 has a slightly incompatible file by the same name.

This problem is also manifested under Ultrix 3.0

Thanks for the patch, I hadn't gotten around to poking through the
sources yet when the compile failed.


aem
--
a.e.mossberg / a...@mthvax.cs.miami.edu / a...@umiami.BITNET / Pahayokee Bioregion
The ACLU has stood foursquare against the recurring tides of hysteria that from
time to time threaten freedoms everywhere. - Chief Justice Earl Warren

Brian Coogan

unread,
Dec 28, 1989, 8:47:05 PM12/28/89
to
In article <32...@iuvax.cs.indiana.edu> saha...@iuvax.cs.indiana.edu (Steve Hayman) writes:
>Patch 7 adds code to Configure to check for /usr/include/utime.h,
>on the assumption that DG/UX is the only Unix that has this.

HP-UX was also bitten by this one. Isn't utime.h a System V type
thing?

Peder Chr. N|rgaard

unread,
Dec 29, 1989, 6:25:04 AM12/29/89
to
The same problem is manifest under HP/UX, and the solution offered by
Steve Hayman will work there, too.

Happy Christmas


--
Peder Chr. Norgaard **** pcnor...@daimi.dk
Computer Science Department, Aarhus University
Ny Munkegade 116, DK-8000 Aarhus C, DENMARK
phone: +45 86 12 71 88 / telefax: +45 86 13 57 25 / telex: 64767 aausci dk

William Walker

unread,
Jan 2, 1990, 12:47:02 PM1/2/90
to

which HP and which version of HP/UX. my utime.h did not give me any problems
through patchlevel 8. the only problem i have is with syscall(). HP/UX
version 7.0 is on the way, so maybe they got it right this time. *dir()
routines are still a bit flakey, haven't had the chance to track it down yet
(or get doug's dir stuff 8-)).

bill.

-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
William Walker --- wrw...@prcrs.UUCP --- 530N-3 x-2565
NO Santa Claus, I said Mickey Mouse Phone, not IBM-PC Clone. Oh well, there
isn't really THAT much difference.
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=

Brian Coogan

unread,
Jan 3, 1990, 2:38:42 AM1/3/90
to
Bill Walker <mm...@uvaarpa.HP.COM> writes in comp.lang.perl:

> which HP and which version of HP/UX. my utime.h did not give me any problems
> through patchlevel 8. the only problem i have is with syscall(). HP/UX
> version 7.0 is on the way, so maybe they got it right this time. *dir()
> routines are still a bit flakey, haven't had the chance to track it down yet
> (or get doug's dir stuff 8-)).

You didn't say which version of HP-UX you have either. The way the
patchlevel 8 Configure works, if you have a utime.h it is assumed that
you also have acusec and modusec fields in your utime structure. You
must not have a utime.h or you wouldn't have been able to compile
without fixing it! :-) Later versions of HP-UX do have the utime.h file.

If "doug's dir stuff" means Doug Gwyn's directory routines, these are
unnecessary on later versions of HP-UX, as they are provided in libc.

The syscall problem can be worked around by adding s800fix.a to the
list of required libraries and creating s800fix with:
ar xv /lib/libc.a cerror.o syscall.o
ar cv s800fix.a cerror.o syscall.o
This works around a bug in syscall.o (fixed in 7.0) on the s800 (a short
jump target was used instead of a long one).

Peder Chr. N|rgaard

unread,
Jan 3, 1990, 3:09:29 AM1/3/90
to
prcrs!wrw...@uunet.uu.net (William Walker) writes:


>which HP and which version of HP/UX. my utime.h did not give me any problems
>through patchlevel 8.

Sorry, should have mentioned: The problem is manifest on our HP 9000/3xx
workstations under HP/UX 6.5, perl patchlevel 8. The mere existence of
the /usr/include/utime.h file triggers the error. Which is very easy to
solve, as mentioned in the news from Steve Hayman <32...@iuvax.cx.indiana.edu>.

Happy New Year.

William Walker

unread,
Jan 4, 1990, 11:31:24 AM1/4/90
to

oops, that is one of the problems with working on no sleep, running screen,
and being logged into too many different machines. i didn't check the right
machinge for utime.h. apologies.

br...@hpausla.aso.hp.com writes:
|You didn't say which version of HP-UX you have either. The way the
|patchlevel 8 Configure works, if you have a utime.h it is assumed that
|you also have acusec and modusec fields in your utime structure. You
|must not have a utime.h or you wouldn't have been able to compile
|without fixing it! :-) Later versions of HP-UX do have the utime.h file.

and as for my machine and version, ==>
HP/UX 3.10
HP9000/850
64 M RAM
~180 M swap
Perl version 3, patchlevel 8

|If "doug's dir stuff" means Doug Gwyn's directory routines, these are
|unnecessary on later versions of HP-UX, as they are provided in libc.

the dir() routines problem i have is more hpux than perl related, but if you
would like to drop me a line about that one, i would be glad to have some
help tracking it down. my service rep is VERY good, i don't want this
showing bad on hp, i like their equipment and service. yes, the dir routines
are there, they just aren't behaving as expected under a few conditions. my
easiest way out is to install doug's dir routines as a temporary work-around
until i have the time to really dig into it.

thanks again to larry.
bill.

-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
William Walker --- wrw...@prcrs.UUCP --- 530N-3 (703) 556-2565

0 new messages