Issue 6832 - fix #elif statement
Summary: fix #elif statement
Status: VERIFIED FIXED
Alias: None
Product: OpenLDAP
Classification: Unclassified
Component: build (show other issues)
Version: 2.4.23
Hardware: All All
: --- normal
Target Milestone: ---
Assignee: OpenLDAP project
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-02-16 10:46 UTC by naota@elisp.net
Modified: 2014-08-01 21:04 UTC (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this issue.
Description naota@elisp.net 2011-02-16 10:46:28 UTC
Full_Name: Naohiro Aota
Version: 2.4.23
OS: Gentoo/FreeBSD 8.0
URL: http://elisp.net/openldap.patch
Submission from: (NULL) (125.102.92.74)


There are some #elif statements like "#elif FOOBAR", which should be "#elif
defined(FOOBAR)". These statements might cause build error like this:

i686-gentoo-freebsd8.0-gcc -O2 -pipe -march=prescott --param l1-cache-size=16
--param l1-cache-line-size=64 -mtune=prescott -D_GNU_SOURCE -I../../include     
  -I../../include   -I/usr/include/db4.8    -I/usr/include/db4.8  -c -o detach.o
detach.c
detach.c:131:7: error: missing binary operator before token "long"
gmake[2]: *** [detach.o] Error 1
gmake[2]: Leaving directory
`/usr/tmp/portage/net-nds/openldap-2.4.23/work/openldap-2.4.23/libraries/liblutil'
gmake[1]: *** [all-common] Error 1
gmake[1]: Leaving directory
`/usr/tmp/portage/net-nds/openldap-2.4.23/work/openldap-2.4.23/libraries'
gmake: *** [all-common] Error 1

Build Environment:
  Gentoo/FreeBSD 8.0
  gcc 4.4.4

URL is a address of the patch to fix the statements.
Comment 1 Howard Chu 2011-02-16 15:37:01 UTC
changed notes
changed state Open to Test
moved from Incoming to Build
Comment 2 Martin Matuska 2011-03-20 21:22:52 UTC
To provide some background information,
this problem is caused by a behaviour change of gcc version 4.4 and later.

The new behaviour documented by GCC:
http://gcc.gnu.org/gcc-4.4/porting_to.html

More information:
http://www.cyrius.com/journal/gcc/gcc-4.4-preprocessor-errors
http://gcc.gnu.org/viewcvs?view=revision&revision=136209

Comment 3 Quanah Gibson-Mount 2011-03-23 18:14:17 UTC
changed notes
changed state Test to Release
Comment 4 Quanah Gibson-Mount 2011-04-01 09:28:58 UTC
changed notes
changed state Release to Closed
Comment 5 OpenLDAP project 2014-08-01 21:04:06 UTC
fixed in HEAD
fixed in RE24