axis-c-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Mike Bristow (JIRA)" <j...@apache.org>
Subject [jira] Updated: (AXIS2C-157) !gcc compile error [PATCH]
Date Thu, 23 Nov 2006 12:34:08 GMT
     [ http://issues.apache.org/jira/browse/AXIS2C-157?page=all ]

Mike Bristow updated AXIS2C-157:
--------------------------------

    Attachment: signature.asc



Instead of saying:

#ifdef WIN32
#  define AXIS2_LOG_TRACE axis2_log_impl_log_trace
#elif defined HAVE_GNUC_VARARGS
...

you could do something like:

#ifdef HAVE_GNUC_VARARGS
# define AXIS2_LOG_TRACE(params, args ...)
#elif defined HAVE_ISO_VARARGS
# define AXIS2_LOG_TRACE(params, ...)
#elif __STDC__ && __STDC_VERSION > 199901L
# define AXIS2_LOG_TRACE(params, ...)
#elif WIN32
# define AXIS2_LOG_TRACE axis2_log_impl_log_trace
#else
# error "no implementation available for AXIS2_LOG_TRACE"
#endif

This /should/ work because a compiler that claims to be STDC, and that
claims to follow the C99 (the __STDC_VERSION test) ought to implement
ISO_VARAGS (which, I guess, the windows build system doesn't detect as
autoconf is probably not how you build things on that platform).

It's also possible that the the elif WIN32 branch could be:

#else
# define AXIS2_LOG_TRACE axis2_log_impl_log_trace
#endif

but I can't remember what axis2_log_imnpl_log_trace actually /is/.  If
it's sensible on all platforms which don't have 'vararg-like macros',
then it may be a better solution as it'll be simpler, and adds support
for people using pre-C99 vendor compilers.



-- 
Mike Bristow,          Thus PLC        Finchley, London, UK
t +44 20 8495 6177     m +44 7967 224 609     www.demon.net
f +44 870 051 9902     mike.bristow@thus.net   www.thus.net


> !gcc compile error [PATCH]
> --------------------------
>
>                 Key: AXIS2C-157
>                 URL: http://issues.apache.org/jira/browse/AXIS2C-157
>             Project: Axis2-C
>          Issue Type: Bug
>         Environment: SunOS 5.8 sun4u & cc: Sun C 5.5 Patch 112760-18 2005/06/14
> SunOS 5.9 sun4u & cc: Sun C 5.5 Patch 112760-18 2005/06/14
> SunOS 5.9 i86pc & cc: Sun C 5.8 Patch 121016-02 2006/03/31
> SunOS 5.10 sun4u & cc: Sun C 5.8 Patch 121015-02 2006/03/29
> SunOS 5.10 i86pc & cc: Sun C 5.8 Patch 121016-02 2006/03/31
> redhat-3as-ia32 & gcc version 4.0.2 20051125 (Red Hat 4.0.2-8)
> redhat-el4-i386 & gcc version 4.0.2 20051125 (Red Hat 4.0.2-8)
> redhat-3fc-i386 & gcc version 4.0.2 20051125 (Red Hat 4.0.2-8)
> redhat-fc4-i386 & gcc version 4.0.2 20051125 (Red Hat 4.0.2-8)
> redhat-fc5-i386 & gcc version 4.0.2 20051125 (Red Hat 4.0.2-8)
>            Reporter: Mike Bristow
>         Assigned To: Sanjaya Ratnaweera
>         Attachments: axis2c.patch, signature.asc
>
>
> Compilers that aren't gcc don't support GCCs extensions for varadic macros; but C99 has
support for them.   
> The attached patch does not cause a regression for RedHat platforms, but does fix a compile
error for the solaris platforms.  It may even work for other platforms as well.
> It is possible that the WIN32 clause could be safely removed with a suitable (and different)
test along the lines of 
> #ifdef __STDC__ && __STDC_VERSION >= 199901L
> but I don't have a pet windows sytem to test with.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

---------------------------------------------------------------------
To unsubscribe, e-mail: axis-c-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-c-dev-help@ws.apache.org


Mime
View raw message