You are viewing a plain text version of this content. The canonical link for it is here.
Posted to c-dev@axis.apache.org by "Damitha Kumarage (JIRA)" <ji...@apache.org> on 2010/06/25 22:41:49 UTC

[jira] Created: (AXIS2C-1483) broken due to AXIS2_UNZOPEN2 change in axutil_unix.h

broken due to AXIS2_UNZOPEN2 change in axutil_unix.h
----------------------------------------------------

                 Key: AXIS2C-1483
                 URL: https://issues.apache.org/jira/browse/AXIS2C-1483
             Project: Axis2-C
          Issue Type: Bug
          Components: platforms/unix
         Environment: linux
            Reporter: Damitha Kumarage


Axis2/C engine segfault when loading due to following change.
-define AXIS2_UNZOPEN2(zipfilename,ffunc) unzOpen2(zipfilename,NULL); memset(&ffunc, 0, sizeof(ffunc));
+define AXIS2_UNZOPEN2(zipfilename,ffunc) "do { unzOpen2(zipfilename,NULL); memset(&ffunc, 0, sizeof(ffunc)); } while (0)"

why do we need a while loop here?



-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


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


[jira] Updated: (AXIS2C-1483) broken due to AXIS2_UNZOPEN2 change in axutil_unix.h

Posted by "Damitha Kumarage (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/AXIS2C-1483?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Damitha Kumarage updated AXIS2C-1483:
-------------------------------------

    Description: 
Axis2/C build break when built with --with-archive=/usr/include option, due to  following change.
-define AXIS2_UNZOPEN2(zipfilename,ffunc) unzOpen2(zipfilename,NULL); memset(&ffunc, 0, sizeof(ffunc));
+define AXIS2_UNZOPEN2(zipfilename,ffunc) do { unzOpen2(zipfilename,NULL); memset(&ffunc, 0, sizeof(ffunc)); } while (0)

why do we need a while loop here?



  was:
Axis2/C build is broken due to  following change.
-define AXIS2_UNZOPEN2(zipfilename,ffunc) unzOpen2(zipfilename,NULL); memset(&ffunc, 0, sizeof(ffunc));
+define AXIS2_UNZOPEN2(zipfilename,ffunc) do { unzOpen2(zipfilename,NULL); memset(&ffunc, 0, sizeof(ffunc)); } while (0)

why do we need a while loop here?




> broken due to AXIS2_UNZOPEN2 change in axutil_unix.h
> ----------------------------------------------------
>
>                 Key: AXIS2C-1483
>                 URL: https://issues.apache.org/jira/browse/AXIS2C-1483
>             Project: Axis2-C
>          Issue Type: Bug
>          Components: platforms/unix
>         Environment: linux
>            Reporter: Damitha Kumarage
>
> Axis2/C build break when built with --with-archive=/usr/include option, due to  following change.
> -define AXIS2_UNZOPEN2(zipfilename,ffunc) unzOpen2(zipfilename,NULL); memset(&ffunc, 0, sizeof(ffunc));
> +define AXIS2_UNZOPEN2(zipfilename,ffunc) do { unzOpen2(zipfilename,NULL); memset(&ffunc, 0, sizeof(ffunc)); } while (0)
> why do we need a while loop here?

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


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


[jira] Commented: (AXIS2C-1483) broken due to AXIS2_UNZOPEN2 change in axutil_unix.h

Posted by "nadir amra (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/AXIS2C-1483?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12882750#action_12882750 ] 

nadir amra commented on AXIS2C-1483:
------------------------------------

Becaue it is inheritnly dangerouse to specify 2 statements in one define, specifially when used in an if-statement as follows:

if (xxx)
    AXIS2_UNZOPEN2(zipfilename,ffunc);



I will look at where it is used and fix it. 

> broken due to AXIS2_UNZOPEN2 change in axutil_unix.h
> ----------------------------------------------------
>
>                 Key: AXIS2C-1483
>                 URL: https://issues.apache.org/jira/browse/AXIS2C-1483
>             Project: Axis2-C
>          Issue Type: Bug
>          Components: platforms/unix
>         Environment: linux
>            Reporter: Damitha Kumarage
>
> Axis2/C build break when built with --with-archive=/usr/include option, due to  following change.
> -define AXIS2_UNZOPEN2(zipfilename,ffunc) unzOpen2(zipfilename,NULL); memset(&ffunc, 0, sizeof(ffunc));
> +define AXIS2_UNZOPEN2(zipfilename,ffunc) do { unzOpen2(zipfilename,NULL); memset(&ffunc, 0, sizeof(ffunc)); } while (0)
> why do we need a while loop here?

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


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


[jira] Commented: (AXIS2C-1483) broken due to AXIS2_UNZOPEN2 change in axutil_unix.h

Posted by "nadir amra (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/AXIS2C-1483?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12882750#action_12882750 ] 

nadir amra commented on AXIS2C-1483:
------------------------------------

Becaue it is inheritnly dangerouse to specify 2 statements in one define, specifially when used in an if-statement as follows:

if (xxx)
    AXIS2_UNZOPEN2(zipfilename,ffunc);



I will look at where it is used and fix it. 

> broken due to AXIS2_UNZOPEN2 change in axutil_unix.h
> ----------------------------------------------------
>
>                 Key: AXIS2C-1483
>                 URL: https://issues.apache.org/jira/browse/AXIS2C-1483
>             Project: Axis2-C
>          Issue Type: Bug
>          Components: platforms/unix
>         Environment: linux
>            Reporter: Damitha Kumarage
>
> Axis2/C build break when built with --with-archive=/usr/include option, due to  following change.
> -define AXIS2_UNZOPEN2(zipfilename,ffunc) unzOpen2(zipfilename,NULL); memset(&ffunc, 0, sizeof(ffunc));
> +define AXIS2_UNZOPEN2(zipfilename,ffunc) do { unzOpen2(zipfilename,NULL); memset(&ffunc, 0, sizeof(ffunc)); } while (0)
> why do we need a while loop here?

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


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


[jira] Updated: (AXIS2C-1483) broken due to AXIS2_UNZOPEN2 change in axutil_unix.h

Posted by "Damitha Kumarage (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/AXIS2C-1483?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Damitha Kumarage updated AXIS2C-1483:
-------------------------------------

    Description: 
Axis2/C build is broken due to  following change.
-define AXIS2_UNZOPEN2(zipfilename,ffunc) unzOpen2(zipfilename,NULL); memset(&ffunc, 0, sizeof(ffunc));
+define AXIS2_UNZOPEN2(zipfilename,ffunc) do { unzOpen2(zipfilename,NULL); memset(&ffunc, 0, sizeof(ffunc)); } while (0)

why do we need a while loop here?



  was:
Axis2/C engine segfault when loading due to following change.
-define AXIS2_UNZOPEN2(zipfilename,ffunc) unzOpen2(zipfilename,NULL); memset(&ffunc, 0, sizeof(ffunc));
+define AXIS2_UNZOPEN2(zipfilename,ffunc) "do { unzOpen2(zipfilename,NULL); memset(&ffunc, 0, sizeof(ffunc)); } while (0)"

why do we need a while loop here?




> broken due to AXIS2_UNZOPEN2 change in axutil_unix.h
> ----------------------------------------------------
>
>                 Key: AXIS2C-1483
>                 URL: https://issues.apache.org/jira/browse/AXIS2C-1483
>             Project: Axis2-C
>          Issue Type: Bug
>          Components: platforms/unix
>         Environment: linux
>            Reporter: Damitha Kumarage
>
> Axis2/C build is broken due to  following change.
> -define AXIS2_UNZOPEN2(zipfilename,ffunc) unzOpen2(zipfilename,NULL); memset(&ffunc, 0, sizeof(ffunc));
> +define AXIS2_UNZOPEN2(zipfilename,ffunc) do { unzOpen2(zipfilename,NULL); memset(&ffunc, 0, sizeof(ffunc)); } while (0)
> why do we need a while loop here?

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


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


[jira] Updated: (AXIS2C-1483) broken due to AXIS2_UNZOPEN2 change in axutil_unix.h

Posted by "Damitha Kumarage (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/AXIS2C-1483?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Damitha Kumarage updated AXIS2C-1483:
-------------------------------------

    Description: 
Axis2/C build break when built with --with-archive=/usr/include option, due to  following change.
-define AXIS2_UNZOPEN2(zipfilename,ffunc) unzOpen2(zipfilename,NULL); memset(&ffunc, 0, sizeof(ffunc));
+define AXIS2_UNZOPEN2(zipfilename,ffunc) do { unzOpen2(zipfilename,NULL); memset(&ffunc, 0, sizeof(ffunc)); } while (0)

why do we need a while loop here?



  was:
Axis2/C build is broken due to  following change.
-define AXIS2_UNZOPEN2(zipfilename,ffunc) unzOpen2(zipfilename,NULL); memset(&ffunc, 0, sizeof(ffunc));
+define AXIS2_UNZOPEN2(zipfilename,ffunc) do { unzOpen2(zipfilename,NULL); memset(&ffunc, 0, sizeof(ffunc)); } while (0)

why do we need a while loop here?




> broken due to AXIS2_UNZOPEN2 change in axutil_unix.h
> ----------------------------------------------------
>
>                 Key: AXIS2C-1483
>                 URL: https://issues.apache.org/jira/browse/AXIS2C-1483
>             Project: Axis2-C
>          Issue Type: Bug
>          Components: platforms/unix
>         Environment: linux
>            Reporter: Damitha Kumarage
>
> Axis2/C build break when built with --with-archive=/usr/include option, due to  following change.
> -define AXIS2_UNZOPEN2(zipfilename,ffunc) unzOpen2(zipfilename,NULL); memset(&ffunc, 0, sizeof(ffunc));
> +define AXIS2_UNZOPEN2(zipfilename,ffunc) do { unzOpen2(zipfilename,NULL); memset(&ffunc, 0, sizeof(ffunc)); } while (0)
> why do we need a while loop here?

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


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


[jira] Updated: (AXIS2C-1483) broken due to AXIS2_UNZOPEN2 change in axutil_unix.h

Posted by "Damitha Kumarage (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/AXIS2C-1483?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Damitha Kumarage updated AXIS2C-1483:
-------------------------------------

    Description: 
Axis2/C build is broken due to  following change.
-define AXIS2_UNZOPEN2(zipfilename,ffunc) unzOpen2(zipfilename,NULL); memset(&ffunc, 0, sizeof(ffunc));
+define AXIS2_UNZOPEN2(zipfilename,ffunc) do { unzOpen2(zipfilename,NULL); memset(&ffunc, 0, sizeof(ffunc)); } while (0)

why do we need a while loop here?



  was:
Axis2/C engine segfault when loading due to following change.
-define AXIS2_UNZOPEN2(zipfilename,ffunc) unzOpen2(zipfilename,NULL); memset(&ffunc, 0, sizeof(ffunc));
+define AXIS2_UNZOPEN2(zipfilename,ffunc) "do { unzOpen2(zipfilename,NULL); memset(&ffunc, 0, sizeof(ffunc)); } while (0)"

why do we need a while loop here?




> broken due to AXIS2_UNZOPEN2 change in axutil_unix.h
> ----------------------------------------------------
>
>                 Key: AXIS2C-1483
>                 URL: https://issues.apache.org/jira/browse/AXIS2C-1483
>             Project: Axis2-C
>          Issue Type: Bug
>          Components: platforms/unix
>         Environment: linux
>            Reporter: Damitha Kumarage
>
> Axis2/C build is broken due to  following change.
> -define AXIS2_UNZOPEN2(zipfilename,ffunc) unzOpen2(zipfilename,NULL); memset(&ffunc, 0, sizeof(ffunc));
> +define AXIS2_UNZOPEN2(zipfilename,ffunc) do { unzOpen2(zipfilename,NULL); memset(&ffunc, 0, sizeof(ffunc)); } while (0)
> why do we need a while loop here?

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


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


[jira] Resolved: (AXIS2C-1483) broken due to AXIS2_UNZOPEN2 change in axutil_unix.h

Posted by "Damitha Kumarage (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/AXIS2C-1483?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Damitha Kumarage resolved AXIS2C-1483.
--------------------------------------

    Fix Version/s: 1.7.0
       Resolution: Fixed

Yes having two staements in one define is dangerous. I fixed this issue by using a block statement. 

--- util/include/platforms/os400/axutil_os400.h (revision 960420)
+++ util/include/platforms/os400/axutil_os400.h (working copy)
@@ -258,7 +258,11 @@

     /** minizip functions */
 #define axis2_fill_win32_filefunc(ffunc)
-#define AXIS2_UNZOPEN2(zipfilename,ffunc) do { unzOpen2(zipfilename,NULL); memset(&ffunc, 0, sizeof(ffunc)); } while (0)
+#define AXIS2_UNZOPEN2(zipfilename, ffunc, uf) \
+    { \
+        uf = unzOpen2(zipfilename,NULL); \
+        memset(&ffunc, 0, sizeof(ffunc)); \
+    }



> broken due to AXIS2_UNZOPEN2 change in axutil_unix.h
> ----------------------------------------------------
>
>                 Key: AXIS2C-1483
>                 URL: https://issues.apache.org/jira/browse/AXIS2C-1483
>             Project: Axis2-C
>          Issue Type: Bug
>          Components: platforms/unix
>         Environment: linux
>            Reporter: Damitha Kumarage
>             Fix For: 1.7.0
>
>
> Axis2/C build break when built with --with-archive=/usr/include option, due to  following change.
> -define AXIS2_UNZOPEN2(zipfilename,ffunc) unzOpen2(zipfilename,NULL); memset(&ffunc, 0, sizeof(ffunc));
> +define AXIS2_UNZOPEN2(zipfilename,ffunc) do { unzOpen2(zipfilename,NULL); memset(&ffunc, 0, sizeof(ffunc)); } while (0)
> why do we need a while loop here?

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


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


[jira] Resolved: (AXIS2C-1483) broken due to AXIS2_UNZOPEN2 change in axutil_unix.h

Posted by "Damitha Kumarage (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/AXIS2C-1483?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Damitha Kumarage resolved AXIS2C-1483.
--------------------------------------

    Fix Version/s: 1.7.0
       Resolution: Fixed

Yes having two staements in one define is dangerous. I fixed this issue by using a block statement. 

--- util/include/platforms/os400/axutil_os400.h (revision 960420)
+++ util/include/platforms/os400/axutil_os400.h (working copy)
@@ -258,7 +258,11 @@

     /** minizip functions */
 #define axis2_fill_win32_filefunc(ffunc)
-#define AXIS2_UNZOPEN2(zipfilename,ffunc) do { unzOpen2(zipfilename,NULL); memset(&ffunc, 0, sizeof(ffunc)); } while (0)
+#define AXIS2_UNZOPEN2(zipfilename, ffunc, uf) \
+    { \
+        uf = unzOpen2(zipfilename,NULL); \
+        memset(&ffunc, 0, sizeof(ffunc)); \
+    }



> broken due to AXIS2_UNZOPEN2 change in axutil_unix.h
> ----------------------------------------------------
>
>                 Key: AXIS2C-1483
>                 URL: https://issues.apache.org/jira/browse/AXIS2C-1483
>             Project: Axis2-C
>          Issue Type: Bug
>          Components: platforms/unix
>         Environment: linux
>            Reporter: Damitha Kumarage
>             Fix For: 1.7.0
>
>
> Axis2/C build break when built with --with-archive=/usr/include option, due to  following change.
> -define AXIS2_UNZOPEN2(zipfilename,ffunc) unzOpen2(zipfilename,NULL); memset(&ffunc, 0, sizeof(ffunc));
> +define AXIS2_UNZOPEN2(zipfilename,ffunc) do { unzOpen2(zipfilename,NULL); memset(&ffunc, 0, sizeof(ffunc)); } while (0)
> why do we need a while loop here?

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


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