On Thu, 30 Sep 2010 11:42:33 +0200, "machi01" <ma...@we...> wrote:
> Dear Vaclav,
>
> thanks for your help, the code now compiles well. The version I am using is
> log4plus-1.0.4-rc10. To get the code compiled under hpux I had to apply the
> change to ndc.h line 46 and the same to line 263 as you wrote before.
>
> Another change was to be made in socketunix.cxx L 206 :
>
> socklen_t len = sizeof(struct sockaddr);
>
> had to be replaced by :
>
> int len = (int)sizeof(struct sockaddr);
I have committed a change that should fix this problem differently. The
code now works with any kind of accept() function. I have also removed
the setting of _XOPEN_SOURCE_EXTENDED inside socket-unix.cxx. Please
test the latest PRODUCTION_1_0_x branch.
I did some research and the problem appears to be that HP-UX is trying
to support too many different POSIX etc. standards, defaulting to the
oldest one. From GCC documentation:
---8<------8<------8<------8<------8<---
-munix=unix-std
Generate compiler predefines and select a startfile for the
specified UNIX standard. The choices for unix-std are `93', `95' and
`98'. `93' is supported on all HP-UX versions. `95' is available on
HP-UX 10.10 and later. `98' is available on HP-UX 11.11 and later. The
default values are `93' for HP-UX 10.00, `95' for HP-UX 10.10 though to
11.00, and `98' for HP-UX 11.11 and later.
-munix=93 provides the same predefines as GCC 3.3 and 3.4.
-munix=95 provides additional predefines for XOPEN_UNIX and
_XOPEN_SOURCE_EXTENDED, and the startfile unix95.o. -munix=98 provides
additional predefines for _XOPEN_UNIX, _XOPEN_SOURCE_EXTENDED,
_INCLUDE__STDC_A1_SOURCE and _INCLUDE_XOPEN_SOURCE_500, and the
startfile unix98.o.
It is important to note that this option changes the interfaces for
various library routines. It also affects the operational behavior of
the C library. Thus, extreme care is needed in using this option.
Library code that is intended to operate with more than one UNIX
standard must test, set and restore the variable __xpg4_extended_mask as
appropriate. Most GNU software doesn't provide this capability.
---8<------8<------8<------8<------8<---
I suggest that you also read
<http://gcc.gnu.org/bugzilla/show_bug.cgi?id=17005>, search for
"__xpg4_extended_mask".
Basically, I think that you should compile log4cplus with the aCC
<http://h21007.www2.hp.com/portal/download/files/unprot/aCxx/Online_Help/options.htm>
equivalent of GCC's -munix= option added to CXXFLAGS and CFLAGS, the
value depending on which one of the POSIX standards does your use.
I still have no idea what to do with the linker error. I think I would
need some real HP-UX shell to debug thinks on to solve it.
--
VH
|