Subject: vr3 patches on HP-UX 10 realpath conflict

From: [email-masked]
Date: Thu, 16 Jul 1998 11:09:53 -0700

I have been working with beta 18 on HP-UX 10 and have tried applying
the vr3 patches.  I've found several problems; I had a little problem
with the patch program, which may be my unfamiliarity with it.

One serious conflict I discovered, however, is that <stdlib.h>
declares a function called realpath with only two arguments when the
_INCLUDE_XOPEN_SOURCE_EXTENDED option is enabled:

#ifdef _INCLUDE_XOPEN_SOURCE_EXTENDED

/* ... */
	extern char *realpath(const char *, char *);

This is not in HP-UX 9.
The HP man page for realpath indicates: First released in Issue 4,
Version 2.  The man page describes a function the same, or similar, as
the wu-ftp realpath function.  It does not credit anybody as having
first developed realpath.

My suggested fix for HP-UX 10 is to give the three argument realpath
function a different name.  Either use it throughout or write a
two-argument realpath (or try using the HP realpath) when the third
argument is not required.

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

---

From: Gregory A Lundberg <[email-masked]>
Date: Thu, 16 Jul 1998 14:34:42 -0400 (EDT)

> 	extern char *realpath(const char *, char *);

OK, I'll put together a patch to rename realpath to wu_realpath and avoid
the name collision.

----

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

---

From: Gregory A Lundberg <[email-masked]>
Date: Fri, 17 Jul 1998 09:29:39 -0400 (EDT)

> OK, I'll put together a patch to rename realpath to wu_realpath and avoid

Try the following.

cd ~/wu-ftpd-2.4.2-beta-18
echo >> src/config/config.hpx
echo '#define realpath realpath_on_steroids' >> src/config/config.hpx
./build clean
./build hpx

----

The VR2 patches for beta17 and VR3 for beta18 need to use the realpath
function provided with the source kit rather than one (if present)
provided by the OS.  Adding the #define above to your config/config.???
should fix it.  Of the systems supported by ./build, bdi fbs lnx nbs sco
sgi and sol already use it.  The other systems may need to add the #define
to override the system function.

----