Github user zwoop commented on a diff in the pull request:

    https://github.com/apache/trafficserver/pull/1408#discussion_r99174413
  
    --- Diff: iocore/cache/Cache.cc ---
    @@ -1041,12 +1041,12 @@ CacheProcessor::cacheInitialized()
           case CACHE_COMPRESSION_FASTLZ:
             break;
           case CACHE_COMPRESSION_LIBZ:
    -#if !TS_HAS_LIBZ
    +#ifndef HAVE_ZLIB_H
    --- End diff --
    
    So, while I'm generally OK with this (I think), I'm slightly concerned that 
we don't have a universal pattern for the #if vs #ifdef. In general, I think we 
ought to prefer #if over $ifdef's, assuming it's defined to "1". This helps 
avoid the problem where #define foo 0  is actually "defined", but is off.
    
    I know that we have plenty of cases where we do #ifndef / #ifdef, but 
unless there are other reasons to use that here, I think we should stick to #if 
when possible for these boolean types. Ideally, we'd later change this to be 
consistent as well.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---

Reply via email to