Subject: nonaligned data with VR5 patch on HP-UX 10

From: [email-masked]
Date: Wed, 26 Aug 1998 12:44:18 -0700

I have been working with 2.4.2 beta 18 with the VR patches through VR5
on HP-UX 10.  In access.c the following statements cause alignment
problems:
    defumask = (mode_t) strtoul(ARG0, NULL, 0);
    umask (defumask);

The error messages I get from the link phase are of the form:
/usr/ccs/bin/ld: (Warning) STW instruction from file access.o(0x15e0)
accesses nonaligned data - check alignment options.

defumask is declared as extern int.
The problem is that, for HP-UX 10, mode_t is unsigned short (16 bits)
and int is 32 bits.  I haven't been able to determine where defumask
is declared.

Something else I noted in routevector.c;
In the following, I believe ulong is supposed to by u_long:
    static v_paddr *find_passive_port_entry(ulong port);
In other places in the file, u_long is used and, at least with the
configuration I have, ulong is not a typedef and causes a compile error.

-- 
Roger Wells
Sr. Project Engineer, Network Usage Measurement
[email-masked]

---

From: Gregory A Lundberg <[email-masked]>
Date: Wed, 26 Aug 1998 16:03:03 -0400 (EDT)

> and int is 32 bits.  I haven't been able to determine where defumask

In ftpd.c as a mode_t try changing it to unsigned long and loosing the
cast.  Also, let me know if casting it mode_t in the call to umask().

> configuration I have, ulong is not a typedef and causes a compile error.

Definite typo.  Strange I don't get the error here since it's obviously
wrong.

----

Gregory A Lundberg		Senior Partner, VRnet Company
1441 Elmdale Drive              [email-masked]
Kettering, OH 45409-1615 USA    1-800-809-2195