Discussion:
[omniORB] omniORB build on 64bit platform - patch
Lichszteld,Roman
2006-08-01 20:59:26 UTC
Permalink
Hi all,

Eventually I managed to fix my problem with omnicpp crashing during
compilation of idl files.

It was caused by pair of functions index/rindex in file 'cccp.c' - on 64-bit
platform they seem not to work properly...
I replaced them with recommended strchr/strrchr and now it works fine!

Here is a relevant fragment of man page:

The functions index() and rindex() are declared only in <strings.h>.
They are provided solely for portability of BSD applications, and are
not recommended for new applications where portability is important.
For portable applications, use <string.h>, strchr(), and strrchr()
instead.

I have attached a patch to fix that problem (tested on HP-UX 11.23 Itanium
with HP aC++/ANSI C B3910B A.06.10 [Mar 22 2006] compiler.)

Regards

Roman

-------------- next part --------------
A non-text attachment was scrubbed...
Name: cccp.patch
Type: application/octet-stream
Size: 4387 bytes
Desc: not available
Url : http://www.omniorb-support.com/pipermail/omniorb-list/attachments/20060801/3416da34/cccp.obj
Duncan Grisby
2006-08-08 17:25:46 UTC
Permalink
Post by Lichszteld,Roman
Eventually I managed to fix my problem with omnicpp crashing during
compilation of idl files.
It was caused by pair of functions index/rindex in file 'cccp.c' - on 64-bit
platform they seem not to work properly...
I replaced them with recommended strchr/strrchr and now it works fine!
Thanks for the patch. I've applied it to the 4.1.x development tree, so
it'll be in 4.1.0.

Cheers,

Duncan.
--
-- Duncan Grisby --
-- ***@grisby.org --
-- http://www.grisby.org --
Loading...