- improve config.m4
[m6w6/ext-http] / php_http_cache_api.h
index be59f5702c82317b8e29103d2a07f9b8de7b168b..3e882c9e2fd57b6a688ce9554b72d6e79dc93f49 100644 (file)
@@ -86,8 +86,8 @@ static inline void *_http_etag_init(TSRMLS_D)
                
 #ifdef HAVE_LIBMHASH
                default:
-                       if ((mode < 0) || (mode > mhash_count()) || (!(ctx = mhash_init(mode)))) {
-                               http_error_ex(HE_ERROR, HE_RUNTIME, "Invalid ETag mode: %ld", mode);
+                       if ((mode < 0) || ((ulong)mode > mhash_count()) || (!(ctx = mhash_init(mode)))) {
+                               http_error_ex(HE_ERROR, HTTP_E_RUNTIME, "Invalid ETag mode: %ld", mode);
                        }
                break;
 #endif
@@ -140,14 +140,14 @@ static inline void _http_etag_update(void *ctx, const char *data_ptr, size_t dat
        switch (INI_INT("http.etag_mode"))
        {
                case HTTP_ETAG_SHA1:
-                       PHP_SHA1Update(ctx, data_ptr, data_len);
+                       PHP_SHA1Update(ctx, (const unsigned char *) data_ptr, data_len);
                break;
                
                case HTTP_ETAG_MD5:
 #ifndef HAVE_LIBMHASH
                default:
 #endif
-                       PHP_MD5Update(ctx, data_ptr, data_len);
+                       PHP_MD5Update(ctx, (const unsigned char *) data_ptr, data_len);
                break;
                
 #ifdef HAVE_LIBMHASH