You are viewing a plain text version of this content. The canonical link for it is here.
Posted to proton@qpid.apache.org by "Andrew Stitcher (JIRA)" <ji...@apache.org> on 2012/12/05 23:15:58 UTC

[jira] [Commented] (PROTON-121) Platform specific code is mixed in with platform independent code

    [ https://issues.apache.org/jira/browse/PROTON-121?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13510835#comment-13510835 ] 

Andrew Stitcher commented on PROTON-121:
----------------------------------------

A good (perhaps the only) example of this is the use of ntohl() in the engine code. ntohl() is part of the BSD sockets API and not defined in ANSI C at all.
                
> Platform specific code is mixed in with platform independent code
> -----------------------------------------------------------------
>
>                 Key: PROTON-121
>                 URL: https://issues.apache.org/jira/browse/PROTON-121
>             Project: Qpid Proton
>          Issue Type: Bug
>          Components: proton-c
>            Reporter: Andrew Stitcher
>
> the function pn_error_from errno() is platform specific and so should not be in error.c which is (everywhere else) purely platform independent.
> It should be moved to a platform (POSIX) specific file (perhaps a file with only this single function).
> [The clue for this is the #define POSIX_C_SOURCE at the top of error.c]

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira