Bug 614242 - C99/ANSI C++ related compile errors on HP-UX
C99/ANSI C++ related compile errors on HP-UX
Status: CLOSED CURRENTRELEASE
Product: 389
Classification: Community
Component: Directory Server (Show other bugs)
1.2.6
All Other
low Severity medium
: ---
: ---
Assigned To: Rich Megginson
Viktor Ashirov
:
Depends On:
Blocks: 389_1.2.7 639035
  Show dependency treegraph
 
Reported: 2010-07-13 18:20 EDT by Ulf Weltman
Modified: 2015-12-07 11:51 EST (History)
1 user (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2015-12-07 11:51:42 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
fix proposal (2.24 KB, patch)
2010-07-13 18:22 EDT, Ulf Weltman
rmeggins: review+
Details | Diff

  None (edit)
Description Ulf Weltman 2010-07-13 18:20:54 EDT
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 18:22:31 EDT
Created attachment 431615 [details]
fix proposal
Comment 2 Rich Megginson 2010-07-14 17:21:49 EDT
To ssh://git.fedorahosted.org/git/389/ds.git
   b7a93e6..2bfbe59  master -> master
commit 2bfbe594a2c5593fd1ae695c118be94939651264
Author: Rich Megginson <rmeggins@redhat.com>
Date:   Wed Jul 14 15:19:01 2010 -0600
Comment 3 Noriko Hosoi 2011-07-26 20:24:46 EDT
Verified the proposed fix is used in the 9.0 source code.
Compiling ldclt.c is done with no errors nor warnings.
Mark VERIFIED.

Note You need to log in before you can comment on or make changes to this bug.