This is the mail archive of the
java-patches@gcc.gnu.org
mailing list for the Java project.
Re: [patch] fix HPUX-PA build on posix.cc
- From: Ranjit Mathew <rmathew at gmail dot com>
- To: Andreas Tobler <toa at pop dot agri dot ch>
- Cc: GCJ Patches <java-patches at gcc dot gnu dot org>
- Date: Sat, 01 Jul 2006 06:43:20 +0530
- Subject: Re: [patch] fix HPUX-PA build on posix.cc
- Openpgp: url=http://ranjitmathew.hostingzero.com/aa_6C114B8F.txt
- References: <44A58988.2080105@pop.agri.ch>
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Andreas Tobler wrote:
>
> this one fixes a build error on HPUX-PA.
[...]
> Dl_info addr_info;
> - ret_val = dladdr (addr, &addr_info);
> + ret_val = dladdr (const_cast<void *>(addr), &addr_info);
I am sorry for causing this build error. The reason I used
const was that the address parameter was not supposed to
to be modified by the callee. Looking at /usr/include/dlfcn.h
on my Linux box it also seemed palatable to the dladdr()
function so I went ahead with it.
By the way, we've had discussions on the utility of using
const qualifiers in C on the GCC list recently:
http://gcc.gnu.org/ml/gcc/2006-06/msg00870.html
Thanks,
Ranjit.
- --
Ranjit Mathew Email: rmathew AT gmail DOT com
Bangalore, INDIA. Web: http://rmathew.com/
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.2 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
iD8DBQFEpcwwYb1hx2wRS48RAqIEAJwPuongckFipHNSTU0bqL6tXUXlIACgl/fm
voZxoycjiX2Mt+ZP8aSeApQ=
=l8ZL
-----END PGP SIGNATURE-----