Bug 614242
| Summary: | C99/ANSI C++ related compile errors on HP-UX | ||||||
|---|---|---|---|---|---|---|---|
| Product: | [Retired] 389 | Reporter: | Ulf Weltman <ulf.weltman> | ||||
| Component: | Directory Server | Assignee: | Rich Megginson <rmeggins> | ||||
| Status: | CLOSED CURRENTRELEASE | QA Contact: | Viktor Ashirov <vashirov> | ||||
| Severity: | medium | Docs Contact: | |||||
| Priority: | low | ||||||
| Version: | 1.2.6 | CC: | nhosoi | ||||
| Target Milestone: | --- | ||||||
| Target Release: | --- | ||||||
| Hardware: | All | ||||||
| OS: | Other | ||||||
| Whiteboard: | |||||||
| Fixed In Version: | Doc Type: | Bug Fix | |||||
| Doc Text: | Story Points: | --- | |||||
| Clone Of: | Environment: | ||||||
| Last Closed: | 2015-12-07 16:51:42 UTC | Type: | --- | ||||
| Regression: | --- | Mount Type: | --- | ||||
| Documentation: | --- | CRM: | |||||
| Verified Versions: | Category: | --- | |||||
| oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |||||
| Cloudforms Team: | --- | Target Upstream Version: | |||||
| Embargoed: | |||||||
| Bug Depends On: | |||||||
| Bug Blocks: | 576869, 639035 | ||||||
| Attachments: |
|
||||||
Created attachment 431615 [details]
fix proposal
To ssh://git.fedorahosted.org/git/389/ds.git b7a93e6..2bfbe59 master -> master commit 2bfbe594a2c5593fd1ae695c118be94939651264 Author: Rich Megginson <rmeggins> Date: Wed Jul 14 15:19:01 2010 -0600 Verified the proposed fix is used in the 9.0 source code. Compiling ldclt.c is done with no errors nor warnings. Mark VERIFIED. |
In lib/ldaputil/vtable.c, a global static struct is declared and initialized to {}. I see gcc allows this, and aCC does also but only with -AA ("newly supported ANSI C++ Standard features"). In ldap/servers/slapd/tools/ldclt/ldclt.c, an array size is set using a variable, which I think is legal in C99. Since the size is not computed, and this is the only place C99 is taken advantage of, this can be changed to a #define constant. However, if you're moving towards taking advantage of C99, then I would instead add the -AC99 compiler flag for HP-UX.