Bug 614242 - C99/ANSI C++ related compile errors on HP-UX
Summary: C99/ANSI C++ related compile errors on HP-UX
Alias: None
Product: 389
Classification: Retired
Component: Directory Server
Version: 1.2.6
Hardware: All
OS: Other
Target Milestone: ---
Assignee: Rich Megginson
QA Contact: Viktor Ashirov
Depends On:
Blocks: 389_1.2.7 639035
TreeView+ depends on / blocked
Reported: 2010-07-13 22:20 UTC by Ulf Weltman
Modified: 2015-12-07 16:51 UTC (History)
1 user (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Last Closed: 2015-12-07 16:51:42 UTC

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

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@redhat.com>
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.

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