if define endif用法

#if defined(HAVE_ZLIB_H)
#include <zlib.h>

/* in file zlib.h, ZLIB_VERNUM is defined. */
#endif

 

#if defined(ZLIB_VERNUM) && (ZLIB_VERNUM >= 0x1204)
function1();

function2();

#define CAN_GZIP
#endif

 

#if defined (CAN_GZIP)
    z_stream strm; /* stream struct used by zlib */
    int ret; /* return value of last inflate() call */
#endif

posted @ 2011-01-10 10:47  BloodAndBone  Views(1183)  Comments(0Edit  收藏  举报