You are viewing a plain text version of this content. The canonical link for it is here.
Posted to bugs@httpd.apache.org by bu...@apache.org on 2011/12/29 00:26:39 UTC

DO NOT REPLY [Bug 52394] New: Syntax errors during compile: xlc does not accept #if #else #endif inside macro/function calls

https://issues.apache.org/bugzilla/show_bug.cgi?id=52394

             Bug #: 52394
           Summary: Syntax errors during compile: xlc does not accept #if
                    #else #endif inside macro/function calls
           Product: Apache httpd-2
           Version: 2.3.15-beta
          Platform: Other
        OS/Version: AIX
            Status: NEW
          Severity: normal
          Priority: P2
         Component: mod_ssl
        AssignedTo: bugs@httpd.apache.org
        ReportedBy: mamfelt@gmail.com
    Classification: Unclassified


Created attachment 28102
  --> https://issues.apache.org/bugzilla/attachment.cgi?id=28102
diff -c output that could be applied as a patch for ssl_engine_kernel.c

xlc does not accept #if #else and/or #endif blocks within a function call
The following code fails:
=========
        ap_log_error(APLOG_MARK, APLOG_EMERG, 0, s, APLOGNO(01910)
#ifndef OPENSSL_NO_EC
                "Oops, no RSA, DSA or ECC server certificate found "
#else
                "Oops, no RSA or DSA server certificate found "
#endif
                "for '%s:%d'?!", s->server_hostname, s->port);
========
The following code is accepted:
========
#ifndef OPENSSL_NO_EC
        ap_log_error(APLOG_MARK, APLOG_EMERG, 0, s, APLOGNO(01910)
        "Oops, no RSA, DSA or ECC server certificate found "
                "for '%s:%d'?!", s->server_hostname, s->port);
#else
        ap_log_error(APLOG_MARK, APLOG_EMERG, 0, s, APLOGNO(01910)
        "Oops, no RSA or DSA server certificate found "
                "for '%s:%d'?!", s->server_hostname, s->port);
#endif
========
tail of finishing messages during build...
        /data/prj/httpd-2.3.16-beta/srclib/apr/libtool --silent --mode=compile
cc -qlanglvl=extc89 -qlanglvl=extc99 -qHALT=E  -I/opt/aixtools/include  
-U__STR__ -D_THREAD_SAFE -D_USE_IRS -D_LARGEFILE64_SOURCE    -I.
-I/data/prj/httpd-2.3.16-beta/os/unix -I/data/prj/httpd-2.3.16-beta/include
-I/data/prj/httpd-2.3.16-beta/srclib/apr/include
-I/data/prj/httpd-2.3.16-beta/srclib/apr-util/include
-I/data/prj/httpd-2.3.16-beta/srclib/apr-util/xml/expat/lib
-I/opt/aixtools/include -I/data/prj/httpd-2.3.16-beta/modules/aaa
-I/data/prj/httpd-2.3.16-beta/modules/cache
-I/data/prj/httpd-2.3.16-beta/modules/core
-I/data/prj/httpd-2.3.16-beta/modules/database
-I/data/prj/httpd-2.3.16-beta/modules/filters
-I/data/prj/httpd-2.3.16-beta/modules/ldap -I/data/prj/httpd-2.3.16-beta/server
-I/data/prj/httpd-2.3.16-beta/modules/loggers
-I/data/prj/httpd-2.3.16-beta/modules/lua
-I/data/prj/httpd-2.3.16-beta/modules/proxy
-I/data/prj/httpd-2.3.16-beta/modules/session
-I/data/prj/httpd-2.3.16-beta/modules/ssl
-I/data/prj/httpd-2.3.16-beta/modules/test -I/data/prj/httpd-2.3.16-beta/server
-I/data/prj/httpd-2.3.16-beta/modules/arch/unix
-I/data/prj/httpd-2.3.16-beta/modules/dav/main
-I/data/prj/httpd-2.3.16-beta/modules/generators
-I/data/prj/httpd-2.3.16-beta/modules/mappers -prefer-pic -c ssl_engine_init.c
&& touch ssl_engine_init.slo
"ssl_engine_init.c", line 1105.1: 1506-191 (E) The character # is not a valid C
source character.
"ssl_engine_init.c", line 1107.1: 1506-191 (E) The character # is not a valid C
source character.
"ssl_engine_init.c", line 1109.1: 1506-191 (E) The character # is not a valid C
source character.
"ssl_engine_init.c", line 1105.2: 1506-276 (S) Syntax error: possible missing
')'?
"ssl_engine_init.c", line 1130.1: 1506-191 (E) The character # is not a valid C
source character.
"ssl_engine_init.c", line 1130.2: 1506-276 (S) Syntax error: possible missing
')'?
"ssl_engine_init.c", line 1132.2: 1506-201 (S) #else can only appear within a
#if, #elif, #ifdef or #ifndef block.
"ssl_engine_init.c", line 1133.65: 1506-275 (S) Unexpected text ')'
encountered.
"ssl_engine_init.c", line 1134.2: 1506-202 (S) #endif can only appear at the
end of a #if, #elif, #ifdef or #ifndef block.
"ssl_engine_init.c", line 1435.1: 1506-191 (E) The character # is not a valid C
source character.
"ssl_engine_init.c", line 1435.2: 1506-045 (S) Undeclared identifier endif.
"ssl_engine_init.c", line 1436.26: 1506-275 (S) Unexpected text integer
constant encountered.
"ssl_engine_init.c", line 1431.1: 1506-191 (E) The character # is not a valid C
source character.
"ssl_engine_init.c", line 1432.26: 1506-275 (S) Unexpected text integer
constant encountered.
"ssl_engine_init.c", line 1430.13: 1506-045 (S) Undeclared identifier ifdef.
"ssl_engine_init.c", line 1431.1: 1506-191 (E) The character # is not a valid C
source character.
"ssl_engine_init.c", line 1432.26: 1506-275 (S) Unexpected text integer
constant encountered.
"ssl_engine_init.c", line 1431.1: 1506-191 (E) The character # is not a valid C
source character.
"ssl_engine_init.c", line 1433.1: 1506-191 (E) The character # is not a valid C
source character.
"ssl_engine_init.c", line 1438.1: 1506-191 (E) The character # is not a valid C
source character.
"ssl_engine_init.c", line 1440.1: 1506-191 (E) The character # is not a valid C
source character.
"ssl_engine_init.c", line 1442.1: 1506-191 (E) The character # is not a valid C
source character.
"ssl_engine_init.c", line 1432.26: 1506-276 (S) Syntax error: possible missing
')'?
"ssl_engine_init.c", line 1430.13: 1506-098 (E) Missing argument(s).
"ssl_engine_init.c", line 1430.13: 1506-275 (S) Unexpected text ')'
encountered.
"ssl_engine_init.c", line 1459.1: 1506-191 (E) The character # is not a valid C
source character.
"ssl_engine_init.c", line 1459.2: 1506-276 (S) Syntax error: possible missing
')'?
"ssl_engine_init.c", line 1462.2: 1506-201 (S) #else can only appear within a
#if, #elif, #ifdef or #ifndef block.
"ssl_engine_init.c", line 1465.42: 1506-275 (S) Unexpected text ')'
encountered.
"ssl_engine_init.c", line 1466.2: 1506-202 (S) #endif can only appear at the
end of a #if, #elif, #ifdef or #ifndef block.
make: 1254-004 The error code from the last command is 1.


Stop.
make: 1254-004 The error code from the last command is 1.


Stop.
make: 1254-004 The error code from the last command is 1.


Stop.
make: 1254-004 The error code from the last command is 1.


Stop.
make: 1254-004 The error code from the last command is 1.


Stop.
=======
Attachments are diff -c differences of patched output that compiles
successfully.
Files affected:
modules/ssl/ssl_engine_init.c
modules/ssl/ssl_engine_kernel.c

-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

---------------------------------------------------------------------
To unsubscribe, e-mail: bugs-unsubscribe@httpd.apache.org
For additional commands, e-mail: bugs-help@httpd.apache.org


DO NOT REPLY [Bug 52394] Syntax errors during compile: xlc does not accept #if #else #endif inside macro/function calls

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=52394

Stefan Fritsch <sf...@sfritsch.de> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|                            |FIXED

--- Comment #2 from Stefan Fritsch <sf...@sfritsch.de> 2011-12-29 09:11:16 UTC ---
Fixed slightly differently in r1225476 and r1225477

-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

---------------------------------------------------------------------
To unsubscribe, e-mail: bugs-unsubscribe@httpd.apache.org
For additional commands, e-mail: bugs-help@httpd.apache.org


DO NOT REPLY [Bug 52394] Syntax errors during compile: xlc does not accept #if #else #endif inside macro/function calls

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=52394

--- Comment #1 from Michael Felt <ma...@gmail.com> 2011-12-28 23:27:59 UTC ---
Created attachment 28103
  --> https://issues.apache.org/bugzilla/attachment.cgi?id=28103
diff -c output that could be applied as a patch for ssl_engine_init.c

-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

---------------------------------------------------------------------
To unsubscribe, e-mail: bugs-unsubscribe@httpd.apache.org
For additional commands, e-mail: bugs-help@httpd.apache.org