You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by fu...@apache.org on 2007/04/25 12:43:56 UTC

svn commit: r532307 - /tomcat/connectors/trunk/jk/native/common/jk_util.c

Author: fuankg
Date: Wed Apr 25 03:43:56 2007
New Revision: 532307

URL: http://svn.apache.org/viewvc?view=rev&rev=532307
Log:
make jk_stat() available for all platforms since its called now unconditional from other files.

Modified:
    tomcat/connectors/trunk/jk/native/common/jk_util.c

Modified: tomcat/connectors/trunk/jk/native/common/jk_util.c
URL: http://svn.apache.org/viewvc/tomcat/connectors/trunk/jk/native/common/jk_util.c?view=diff&rev=532307&r1=532306&r2=532307
==============================================================================
--- tomcat/connectors/trunk/jk/native/common/jk_util.c (original)
+++ tomcat/connectors/trunk/jk/native/common/jk_util.c Wed Apr 25 03:43:56 2007
@@ -1391,25 +1391,26 @@
 }
 
 
+int jk_stat(const char *f, struct stat * statbuf)
+{
+  int rc;
 /**
  * i5/OS V5R4 expect filename in ASCII for fopen but required them in EBCDIC for stat()
  */
 #ifdef AS400_UTF8
-
-int jk_stat(const char *f, struct stat * statbuf)
-{
   char *ptr;
-  int rc;
 
   ptr = (char *)malloc(strlen(f) + 1);
   jk_ascii2ebcdic((char *)f, ptr);
   rc = stat(ptr, statbuf);
   free(ptr);
+#else
+  rc = stat(f, statbuf);
+#endif
 
   return (rc);
 }
 
-#endif
 
 int jk_file_exists(const char *f)
 {



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


Re: svn commit: r532307 - /tomcat/connectors/trunk/jk/native/common/jk_util.c

Posted by Henri Gomez <he...@gmail.com>.
Fixed, thanks

2007/4/25, Guenter Knauf <fu...@apache.org>:
> Hi,
> > Well jk_stat was defined as stat in jk_util.h
>
> > #define jk_stat(a, b) stat(a, b)
>
> > but at the bad location ;(
>
> sorry, just realized that and was going to revert the change and change *.h instead...
>
> do you fix, or should I?
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: dev-help@tomcat.apache.org
>
>

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


Re: svn commit: r532307 - /tomcat/connectors/trunk/jk/native/common/jk_util.c

Posted by Guenter Knauf <fu...@apache.org>.
Hi,
> Well jk_stat was defined as stat in jk_util.h

> #define jk_stat(a, b) stat(a, b)

> but at the bad location ;(

sorry, just realized that and was going to revert the change and change *.h instead...

do you fix, or should I?

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


Re: svn commit: r532307 - /tomcat/connectors/trunk/jk/native/common/jk_util.c

Posted by Henri Gomez <he...@gmail.com>.
Well jk_stat was defined as stat in jk_util.h

#define jk_stat(a, b) stat(a, b)

but at the bad location ;(



2007/4/25, fuankg@apache.org <fu...@apache.org>:
> Author: fuankg
> Date: Wed Apr 25 03:43:56 2007
> New Revision: 532307
>
> URL: http://svn.apache.org/viewvc?view=rev&rev=532307
> Log:
> make jk_stat() available for all platforms since its called now unconditional from other files.
>
> Modified:
>     tomcat/connectors/trunk/jk/native/common/jk_util.c
>
> Modified: tomcat/connectors/trunk/jk/native/common/jk_util.c
> URL: http://svn.apache.org/viewvc/tomcat/connectors/trunk/jk/native/common/jk_util.c?view=diff&rev=532307&r1=532306&r2=532307
> ==============================================================================
> --- tomcat/connectors/trunk/jk/native/common/jk_util.c (original)
> +++ tomcat/connectors/trunk/jk/native/common/jk_util.c Wed Apr 25 03:43:56 2007
> @@ -1391,25 +1391,26 @@
>  }
>
>
> +int jk_stat(const char *f, struct stat * statbuf)
> +{
> +  int rc;
>  /**
>   * i5/OS V5R4 expect filename in ASCII for fopen but required them in EBCDIC for stat()
>   */
>  #ifdef AS400_UTF8
> -
> -int jk_stat(const char *f, struct stat * statbuf)
> -{
>    char *ptr;
> -  int rc;
>
>    ptr = (char *)malloc(strlen(f) + 1);
>    jk_ascii2ebcdic((char *)f, ptr);
>    rc = stat(ptr, statbuf);
>    free(ptr);
> +#else
> +  rc = stat(f, statbuf);
> +#endif
>
>    return (rc);
>  }
>
> -#endif
>
>  int jk_file_exists(const char *f)
>  {
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: dev-help@tomcat.apache.org
>
>

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