Bug 614242

Summary: C99/ANSI C++ related compile errors on HP-UX
Product: [Retired] 389 Reporter: Ulf Weltman <ulf.weltman>
Component: Directory ServerAssignee: Rich Megginson <rmeggins>
Status: CLOSED CURRENTRELEASE QA Contact: Viktor Ashirov <vashirov>
Severity: medium Docs Contact:
Priority: low    
Version: 1.2.6CC: 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:
Description Flags
fix proposal rmeggins: review+

Description Ulf Weltman 2010-07-13 22:20:54 UTC
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.

Comment 1 Ulf Weltman 2010-07-13 22:22:31 UTC
Created attachment 431615 [details]
fix proposal

Comment 2 Rich Megginson 2010-07-14 21:21:49 UTC
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

Comment 3 Noriko Hosoi 2011-07-27 00:24:46 UTC
Verified the proposed fix is used in the 9.0 source code.
Compiling ldclt.c is done with no errors nor warnings.
Mark VERIFIED.